Commit Graph

38422 Commits

Author SHA1 Message Date
75a2b5ee35 add attributes to ghash and edgehash functions. 2013-09-01 22:47:44 +00:00
7ad59c4e2c fix odd (intentional) behavior with vertex parent,
curve children of a triangle vertex parent would only display their relationship line to the first vertex. (confusing)

also added OB_TYPE_SUPPORT_PARVERT macro.
2013-09-01 22:38:41 +00:00
4c7ded98bc support for vertex parenting in object mode for object types which support it (mesh, lattice, curve, surface)
previously this had to be done one by one.

both single and triagle vertex parents can be made, selected based on distance to the verts.

Developer notes:
- looks like this was old TODO, enums existed but weren't used.
- only meshes currently support using.
- added BKE_object_as_kdtree(), may come in handy for similar cases.
2013-09-01 22:01:21 +00:00
6bab1d408f Cleanup!
Also fixed a nasty (but inofensive for now) stuff, we had both MOD_UVPROJECT_MAX and MOD_UVPROJECT_MAXPROJECTORS (the former used in RNA code, the later in modifier code)! Kept MOD_UVPROJECT_MAXPROJECTORS.
2013-09-01 21:49:35 +00:00
36065ee4f4 use strict flags for kdtree, and replace ints with unsigned ints where possible.
also replace callocs with mallocs since zeroing memory can be avoided.
2013-09-01 20:17:56 +00:00
77e86dce2a Fix [#36479] Particle instance Modifier random position snaps objects to 0 position
Most work (tracking bug) done by Anthony Edlin, many thanks!

Great example of why having duplicate code is never a good idea... ;)
2013-09-01 15:31:09 +00:00
b18f77abfd OSX/gcc4.6+: fix compiling, -Wconversion causes ann weeror in gcc's own stdio.h else 2013-09-01 15:03:44 +00:00
35b61a7512 Move GCC attributes into a centraized defines
Instead of having ifdef __GNUC__ all over the headers
to use special compiler's hints use a special file where
all things like this are concentrated.

Makes code easier to follow and allows to manage special
attributes in more efficient way.

Thanks Campbell for review!
2013-09-01 15:01:15 +00:00
901dea87a1 Tag unused arg as unused. 2013-09-01 15:01:03 +00:00
09674d3c38 Remove some unneeded type conversions. 2013-09-01 14:32:51 +00:00
Lukas Toenne
2b6d2bf322 Patch #36622, by Henrik Aarnio: Fit backdrop image to the area dimensions.
A new operator to alter the backdrop zoom level so that it fits fully within the node editor area, and centers the image.
Shortcut alt-home, as home is used for fitting stuff into the view everywhere.
2013-09-01 09:50:56 +00:00
fe427f0561 kd-tree,
- replace numbers with defines for allocation increments and default array size.
- move array reallocation into a static function (deduplicate 2x).

also fix own mistake with uninitialized slop-space var in memory printing statistics.
2013-09-01 08:58:46 +00:00
3c193c825b Mingw/Windows Compiling Fix:
In file included from source\blender\compositor\operations\COM_PlaneTrackMaskOperation.cpp:31:0:
source\blender\blenlib/BLI_jitter.h:36:65: error: expected ',' or '...' before numeric constant
source\blender\blenlib/BLI_jitter.h:37:65: error: expected ',' or '...' before numeric constant


It appears that an include used in COM_PlaneTrackMaskOperation.cpp brings in some Windows header file, which in turn defines rad/rad1/rad2 as some numeric constants.
2013-09-01 05:55:50 +00:00
7176cbf466 Mingw Compiling Fix - Conversion from int to unsigned char...
Apparently mingw/gcc is too stupid to recognise that the values
in alphatest will only be used if they're within the range of 
unsigned char (i.e. 0 <= x < 255) when this is done using a ternary
operator. Then again, it's quite hard for humans to immediately
parse what is going on here either! Converting this clever code
back to a more obvious form that mere mortals (and compilers it 
seems) can handle with ease ;)
2013-09-01 05:36:29 +00:00
9d04a61f36 use strict flags for lasso, boxpack, gsqueue and quadric's.
for lasso also use unsigned ints rather then shorts for the path length.
2013-09-01 03:43:10 +00:00
098cf90956 use strict flags for scanfill, also replace shorts with unsigned shorts and ints/bools in some cases. 2013-09-01 03:37:45 +00:00
2924a02a35 move strict compiler checks into a header so its easier to manage in one place (pragmas were copied around).
also enable more strict warnings for BLF (which had some incorrect casts).
2013-09-01 00:46:04 +00:00
5c569d227b patch [#35928] View roll operator
from Kevin Mackay (yakca), with my own additions to make it modal (though there are no keys bound to modal roll by default).
2013-08-31 08:18:08 +00:00
208b068c3f text spacing was using DPI rather then the size of the text.
characters could draw outside the selection when the text was scaled up.
2013-08-31 05:09:52 +00:00
fd90e17130 text drawing glitche - highlight line was offset slightly from selection. 2013-08-31 05:00:40 +00:00
d685b18c2f remove calls to CTX_wm_region(C) when the region is already known.
also remove unused toggle vars in uiHandleButtonData
2013-08-31 04:22:55 +00:00
3d0e56e8d9 fix for ui glitch, pressing backspace over a button to reset to the default value didnt work for the uilist text button (others too), missing redraw. 2013-08-31 04:11:50 +00:00
8e46cf637c tweak mempool loop comparisons when we know there is no chance for skipping past the last value.
also correct typo.
2013-08-31 02:12:31 +00:00
11c988ba00 Simplify line/plane intersection, add line_plane_factor_v3().
Remove no_flip option for isect_line_plane_v3(), its quite specific and only used for ED_view3d_win_to_3d().
2013-08-31 02:06:23 +00:00
60ff60dcdc RenderEngine API: add viewport draw utility functions to bind a GLSL fragment
shader for converting colors from linear to display space, based on the scene
color management settings.

if engine.support_display_space_shader(scene): # test graphics card support
	engine.bind_display_space_shader(scene)
	# draw pixels ..
	engine.unbind_display_space_shader()
2013-08-30 23:49:35 +00:00
f477c0e535 remove unnecessary check in BLI_mempool_iterstep and add doxygen comments to mempool. 2013-08-30 22:04:37 +00:00
b8547074e1 mempool internal change, use unsigned ints where possible (less overhead),
also quiet compiler warning for BLI_LINKSTACK_FREE macro.
2013-08-30 21:32:57 +00:00
b1c36529aa Fix #36609: glsl materials with reroute nodes not working correct. 2013-08-30 17:18:15 +00:00
e8605f9df9 quiet compiler warnings 2013-08-30 16:52:54 +00:00
86f8470a5d Some knife fixes. Avoids duplicating verts; better handling of cut-through ortho.
Now cut lines detect vertices that they pass (almost) exactly over
and snap to them, to avoid making verts vert close to other ones.

Added radius arg to BKE_bmbvh_ray_cast so that can detect an obscuring
face when the ray might otherwise go exactly between two triangles.
Needed an isect_line_tri_epsilon function for similar reason.

Fixes last part of bug #35002. Other knife bugs still present but
getting this commit in now before continuing bug fixing.
2013-08-30 16:34:44 +00:00
03a8b4f180 Cleanup, bitflags as bitshift ops, and some formating... 2013-08-30 13:24:16 +00:00
de8dbe36a0 execute bisect immediately (without starting modal input) if the plane is already set or if there is no 3d view available. 2013-08-30 12:48:39 +00:00
658e72f47d minor ui edits
- move addon refresh button into header
- uilist, use icon for sorting by name (gives more room for name, icon is used in fileselector for same purpose).
- rename orderby to sort in rna and flag names.
- simplify BKE_nurb_handle_calc_simple
2013-08-30 11:49:35 +00:00
3db1e1eb72 Followup for rev59629.
Condition in pose mode seemd to be inverted, which made it so
pose mode could not be entered.
2013-08-30 10:20:31 +00:00
21d670e11e Fix [#36600]: Smoke subframes not working with initial velocity 2013-08-30 09:59:49 +00:00
9ccf84926d Fix #36605: Segfault when border selecting markers in the "graph" mode when no track is active 2013-08-30 09:11:47 +00:00
16a36f320f Fix #36602: crash with freestyle and full sample render of empty render layer. 2013-08-29 20:53:29 +00:00
02773c7f28 don't show screen-space-line start/end points in operator redo panel. 2013-08-29 19:02:07 +00:00
07994d6f50 mesh bisect can now be defined with mouse input
(using cursor + numeric values was too clumsy for defining orientation).

once the cut is done numeric input still works as before
2013-08-29 18:45:04 +00:00
973e317461 correct own error r59619 (changes made to patch, adding handle recalculation which is needed after splitting). 2013-08-29 14:52:36 +00:00
1e613ba9c4 Fix building under windows after r59631 (grr, sorry :/ ). 2013-08-29 13:50:40 +00:00
7e73620a98 Support transformation around 2D cursor in movie clip editor. 2013-08-29 13:04:12 +00:00
113997a03c Last uiList patch (for now!): filtering and reordering of shown elements.
Thanks to Brecht for the reviews. :)

This commit adds a show/hide extension below each uiList, containing by default an option to filter and/or reorder items by name (and to reverse those filtering and reordering).

Each derived uiList class in Python can define more specific filtering by implementing callbacks: the draw_filter() function to draw options in UI, and the filter_items() function to effectively filter/reorder items.

Note: the advanced options for vgroups shown as "proof od concept" in patches do not go in trunk for now, we have to find a better way to get those vgroups info for UI code, we can't afford to loop over each vertex here!

And doc (release notes and uiList example) is still to be updated, will do this in next days.
2013-08-29 12:55:31 +00:00
291ad172a1 follow up on r59628, setting modes now ensures that other modes exit first,
this was only done in some cases before and it was possible to enable weightpaint+sculpt at the same time when enabling sculpt by directly running the mode switching operator.

add generic function to ensure a compatible mode before entering the new mode (added to each operators exec function)
2013-08-29 10:34:09 +00:00
1b8da326ba fix [#34462] Crash when switching modes via mix of TAB and spacebar menu 2013-08-29 08:57:12 +00:00
f6527043d9 fix for glitch where the text editor could be clamped to scroll above line 1 (would flicker on scroll). 2013-08-29 08:13:32 +00:00
bd2f6c5907 default blend file name setting (untitled.blend) length check wasn't correct, move to generic function BLI_ensure_filename(). 2013-08-29 05:34:58 +00:00
567e13b2bb don't replace the extension with '.blend' in save code since the file selector already ensures this,
needed so python scripts can save as temp filenames.
2013-08-29 04:26:40 +00:00
4d83f957b5 fix [#36570] Changing the filename of a image strip doesnt refresh sequencer
was casting a StripElem as a Sequencer struct.
2013-08-29 04:08:44 +00:00
f934581a78 edits to curve operator
- remove delete-all option (users can just select all and delete as with all other modes).
- remove CALLOC_STRUCT_N macro.
- CURVE_OT_delete define a dynamic enum rather then a custom invoke menu function.
2013-08-29 03:14:36 +00:00