7 years agoMerging r58266 through r58279 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Mon, 15 Jul 2013 18:48:34 +0000 (18:48 +0000)]
Merging r58266 through r58279 from trunk into soc-2013-depsgraph_mt

7 years agoMade armatures evaluation safe(r) for threading
Sergey Sharybin [Mon, 15 Jul 2013 18:46:19 +0000 (18:46 +0000)]
Made armatures evaluation safe(r) for threading

Apparently, some routines in armature deformation code
were using static arrays. This is probably just an
optimization thing, but it's very bad for threading.

Now made it so bbone matrices array is allocating in
callee function stack. This required exposing
MAX_BBONE_SUBDIV to an external API, This is not so
much crappy from code side, and it shall be the same
fast as before.

7 years agoMake lattice deform safe for threading
Sergey Sharybin [Mon, 15 Jul 2013 18:46:15 +0000 (18:46 +0000)]
Make lattice deform safe for threading

Lattice deformation used to store some runtime data
inside of lattice datablock itself. It's something
which is REALLY bad. Ideally DNA shouldn't contain
and runtime data.

For now solved it in a way that initialization of
lattice deform will create a structure which contains
lattice object for which deformation is calculating
and that runtime data which used to be stored in
lattice datablock itself.

It works really fine for mesh deform modifier, but
there's still runtime data stored in particle system
DNA, It didn't look something easy to be solved, so
leaving this as-is for now.

7 years agoMake GPU buffers allocation/freeing safe for threading
Sergey Sharybin [Mon, 15 Jul 2013 18:46:08 +0000 (18:46 +0000)]
Make GPU buffers allocation/freeing safe for threading

Code in GPU_buffers_free was already trying to be safe
for threading, by skipping OGL calls there, but in fact
it was still buggy.

Namely, freeing was doing buffers shift in a cycle, and
if two threads will call this function shifting will go

Now made it so GPU_buffers_alloc and GPU_buffers_free
are using mutex lock, so they're completely safe for
threading. Same goes to gpu_buffer_setup function.

It required minor functions reshuffle, so there're no
locks happening from locked thread, but it's all very
straightforward change.

7 years agoFix #36058: Displace Modifier errors using a baked Image and displace baking inconsis...
Sergey Sharybin [Mon, 15 Jul 2013 14:47:58 +0000 (14:47 +0000)]
Fix #36058: Displace Modifier errors using a baked Image and displace baking inconsistency between 2.67/2.68RC and previous versions

This was in fact really nasty bug, caused by multitex_nodes
function using global variable R (which is a copy of current
renderer). this variable is not initialized to anything
meaningful for until first rendering (preview or final)

Since multitex_nodes might be used outside of render pipeline,
made it so whether CM is on or off as an argument to functions
multitex_ext_safe and multitex_ext. Now multitex_nodes() is
only shall be used for stuff happening from render pipeline!

Also needed to make some changes to other places, so all the
usages of texture sampling knows for the fact whether CM is
on or off.

And one more change is related on behavior of dispalcement,
wave, warp, weightvg modifiers and smoke. They'll be always
using CM off since texture is used for influence, not for

It's rather bigger patch, but it's mostly straightforward
changes, which we really need to be done.

Reviewed by Brecht, thanks!

7 years agoFix #36127: 10 bit DPX render would crash when doing rendering animations from
Brecht Van Lommel [Mon, 15 Jul 2013 14:33:19 +0000 (14:33 +0000)]
Fix #36127: 10 bit DPX render would crash when doing rendering animations from
the UI on OS X.

The problem is due to a large variable on the stack, and pthreads have a smaller
stack size than the main thread by default. On Linux the pthread stack size seems
to be 2MB, OS X 512KB and Windows 256KB - 512KB.

7 years agofix for sequence strips being given non utf8 names, where the filepath wasn't utf8.
Campbell Barton [Mon, 15 Jul 2013 11:26:43 +0000 (11:26 +0000)]
fix for sequence strips being given non utf8 names, where the filepath wasn't utf8.
also correct bad assumption in BKE_image_load_exists() that all paths are relative to the current blend file.

7 years agoMerging r58196 through r58265 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Mon, 15 Jul 2013 11:25:56 +0000 (11:25 +0000)]
Merging r58196 through r58265 from trunk into soc-2013-depsgraph_mt

7 years agoFix #36139: cycles not taking texture spacing settings into account for
Brecht Van Lommel [Mon, 15 Jul 2013 11:11:36 +0000 (11:11 +0000)]
Fix #36139: cycles not taking texture spacing settings into account for
generated coordinates on text objects.

7 years agofix: #36122 Collada import - Keyframes offset after recording and playing
Gaia Clary [Mon, 15 Jul 2013 11:01:23 +0000 (11:01 +0000)]
fix: #36122 Collada import - Keyframes offset after recording and playing

7 years agoCollada miport: Report 'unknown animation class' only when relevant
Gaia Clary [Mon, 15 Jul 2013 10:50:04 +0000 (10:50 +0000)]
Collada miport: Report 'unknown animation class' only when relevant

7 years agoFix #36145: Error in inverting channels in the UV/Image Editor
Sergey Sharybin [Mon, 15 Jul 2013 10:44:17 +0000 (10:44 +0000)]
Fix #36145: Error in inverting channels in the UV/Image Editor

Issue was caused by operator redo saving values for previous
inverted channels, meaning the same channels will be inverted
next time operator runs.

Don't think it's useful to save operator values here, since
you don;t have visual feedback about which channels were
inverted. So marked all this properties as SKIP_SAVE. Gives
much more predictable results.

7 years agocorrect placement of debug memset() for DEBUG_STRSIZE
Campbell Barton [Mon, 15 Jul 2013 09:10:51 +0000 (09:10 +0000)]
correct placement of debug memset() for DEBUG_STRSIZE

7 years agoprevious commit r58256, had error in editmode (somehow it worked in most tests still).
Campbell Barton [Mon, 15 Jul 2013 09:03:28 +0000 (09:03 +0000)]
previous commit r58256, had error in editmode (somehow it worked in most tests still).
also don't decrement active indices below zero (also a problem in 2.67).

7 years agoclang/cmake - quiet warnings for external libs and reference moto as a system include.
Campbell Barton [Mon, 15 Jul 2013 08:26:16 +0000 (08:26 +0000)]
clang/cmake - quiet warnings for external libs and reference moto as a system include.

7 years agoFix #36124: VSE - Input Color doesn't invalidate cache properly for movies
Sergey Sharybin [Mon, 15 Jul 2013 07:58:15 +0000 (07:58 +0000)]
Fix #36124: VSE - Input Color doesn't invalidate cache properly for movies

Animation structure holds some buffers inside,
so for proper cache invalidation we need to
re-open the animation.

7 years agofix for error (-1 index into array) when removing customdata layers with no data...
Campbell Barton [Mon, 15 Jul 2013 06:29:09 +0000 (06:29 +0000)]
fix for error (-1 index into array) when removing customdata layers with no data, delete_customdata_layer was using layer data pointer to check weather to adjust index values (but both pointers can be NULL). Remove this code and do in customdata.c

7 years agofix for bad lengths being passed to string functions.
Campbell Barton [Mon, 15 Jul 2013 05:11:14 +0000 (05:11 +0000)]
fix for bad lengths being passed to string functions.

7 years agofix for error in string copy
Campbell Barton [Mon, 15 Jul 2013 05:09:06 +0000 (05:09 +0000)]
fix for error in string copy
- BLI_strncpy_wchar_from_utf8 wasn't NULL terminating the destination string, caused uninitialized memory use in BPY_python_start().
- BLI_strncpy_wchar_as_utf8 could write one byte past the buffer bounds.

7 years agodebug option (off by default), for BLI_string to help find incorrect sizes being...
Campbell Barton [Mon, 15 Jul 2013 03:54:57 +0000 (03:54 +0000)]
debug option (off by default), for BLI_string to help find incorrect sizes being passed in (enable in source files only)

7 years agoallow deselection when bones BONE_UNSELECTABLE flag is set (lasso/box/circle select)
Campbell Barton [Mon, 15 Jul 2013 02:03:31 +0000 (02:03 +0000)]
allow deselection when bones BONE_UNSELECTABLE flag is set (lasso/box/circle select)

7 years agofix [#36128] Not deselect all bone when I press the A button in edit mode
Campbell Barton [Mon, 15 Jul 2013 01:47:01 +0000 (01:47 +0000)]
fix [#36128] Not deselect all bone when I press the A button in edit mode

7 years agofix [#36107] Moving origin of instanced objects doesn't work properly
Campbell Barton [Mon, 15 Jul 2013 01:34:59 +0000 (01:34 +0000)]
fix [#36107] Moving origin of instanced objects doesn't work properly

now use the active object first if its selected, this means when multiple instances are selected, using the active object gives a predictable outcome.

7 years agofix for own regression, face index ranges still need checking in some places.
Campbell Barton [Sun, 14 Jul 2013 23:41:33 +0000 (23:41 +0000)]
fix for own regression, face index ranges still need checking in some places.

7 years agofix regression [#36141] Crash with skin and remesh modifier in edit mode.
Campbell Barton [Sun, 14 Jul 2013 23:27:47 +0000 (23:27 +0000)]
fix regression [#36141] Crash with skin and remesh modifier in edit mode.

7 years agoreplace strncpy with BLI_strncpy for cases we expect the string to be NULL terminated.
Campbell Barton [Sun, 14 Jul 2013 22:08:56 +0000 (22:08 +0000)]
replace strncpy with BLI_strncpy for cases we expect the string to be NULL terminated.

7 years ago== libredcode / licence cleanup ==
Peter Schlaile [Sun, 14 Jul 2013 20:38:55 +0000 (20:38 +0000)]
== libredcode / licence cleanup ==

Changed libredcode to GNU GPL v2 or later to make it more compatible
with additional libraries added to blender.

7 years agofix: #36060 Collada Import: animated armature+mesh problem
Gaia Clary [Sun, 14 Jul 2013 17:21:12 +0000 (17:21 +0000)]
fix: #36060 Collada Import: animated armature+mesh problem

7 years agoRemoved unused paramter from ArmatureImporter:add_joint()
Gaia Clary [Sun, 14 Jul 2013 16:24:42 +0000 (16:24 +0000)]
Removed unused paramter from ArmatureImporter:add_joint()

7 years agoFix a few issues found by coverity code scan in cycles code, nothing that caused
Brecht Van Lommel [Sun, 14 Jul 2013 13:19:57 +0000 (13:19 +0000)]
Fix a few issues found by coverity code scan in cycles code, nothing that caused
an actual bug as far as I can tell.

7 years agofix for case where negative index was used when rendering particles with UV's, also...
Campbell Barton [Sun, 14 Jul 2013 13:18:05 +0000 (13:18 +0000)]
fix for case where negative index was used when rendering particles with UV's, also removed redundant array check.

7 years agoFix some unnecessary memory allocation slowness in cycles mesh export.
Brecht Van Lommel [Sun, 14 Jul 2013 12:51:41 +0000 (12:51 +0000)]
Fix some unnecessary memory allocation slowness in cycles mesh export.

7 years agominor: commented fallthrough
Gaia Clary [Sun, 14 Jul 2013 12:30:05 +0000 (12:30 +0000)]
minor: commented fallthrough

7 years agorecent changes to particle normal orientation change behavior in a way you might...
Campbell Barton [Sun, 14 Jul 2013 10:57:43 +0000 (10:57 +0000)]
recent changes to particle normal orientation change behavior in a way you might not want (even though in general I think its an improvement).
split this into 2 options, added 'Normal-Tangent' orientation that makes the mesh orient towards the tangent, otherwise it uses Z-Up as before.

7 years agofix [#36135] File name of previously saved render result no longer remembered
Campbell Barton [Sun, 14 Jul 2013 09:57:03 +0000 (09:57 +0000)]
fix [#36135] File name of previously saved render result no longer remembered

in fact the problem was caused by own previous fix/improvement for a different case, now this works as follows...

- render uses last-saved name, falls back to 'untitled' in blend file path.
- non render uses id-name always, saves into dir of last-saved image, fall back to blend file path.

7 years agofix relating to [#36093] Stationary Particle system - particle Y axis fails to follow...
Campbell Barton [Sun, 14 Jul 2013 07:27:44 +0000 (07:27 +0000)]
fix relating to [#36093] Stationary Particle system - particle Y axis fails to follow emitter object rotation

With deformations and on a simple cube you could get axis flipping with normal-particle alignment.
now use the normal & tangent to create the orientation to give a stable matrix that wont flip.

7 years agofix: #34823 Collada: nodes exporting world matrices
Gaia Clary [Sun, 14 Jul 2013 00:34:21 +0000 (00:34 +0000)]
fix: #34823 Collada: nodes exporting world matrices

7 years agoFix for [#35482] 2.67 freestyle line visibility computation bug.
Tamito Kajiyama [Sat, 13 Jul 2013 19:33:25 +0000 (19:33 +0000)]
Fix for [#35482] 2.67 freestyle line visibility computation bug.

The reported line visibility issue was caused by a wrong calculation of a 2D
bounding box (so-called "proscenium face" in Freestyle) in the case of a
spherical grid data structure used for a perspective camera.  The problem was
resulting from the proscenium computation based on two corners (min and max)
of the 3D bounding box of imported mesh data.  Aware of the spherical coordinate
transformation involving non-linear (arctangent) functions, now the proscenium
is computed by taking in account all the eight corners of the 3D bounding box.

Also added minor code changes to facilitate future debugging.

7 years agofix for bad NULL check in bmo_connect_pair, also remove duplicate checks in if statem...
Campbell Barton [Sat, 13 Jul 2013 16:25:47 +0000 (16:25 +0000)]
fix for bad NULL check in bmo_connect_pair, also remove duplicate checks in if statements and redundant initialization vars.

7 years agofix for more errors with switch missing break
Campbell Barton [Sat, 13 Jul 2013 14:44:04 +0000 (14:44 +0000)]
fix for more errors with switch missing break
- boids random option was falling through to average.
- (NC_OBJECT | ND_DRAW) notifier was falling through to ND_SHADING button preview updates.

7 years agofix for missing break statements in switch, some key shortcuts and notifiers were...
Campbell Barton [Sat, 13 Jul 2013 14:21:36 +0000 (14:21 +0000)]
fix for missing break statements in switch, some key shortcuts and notifiers were falling through when its obviously incorrect to do so.

7 years agocorrect bad allocation sizes, unwrap was over-allocating, makesdna was under allocating.
Campbell Barton [Sat, 13 Jul 2013 14:19:57 +0000 (14:19 +0000)]
correct bad allocation sizes, unwrap was over-allocating, makesdna was under allocating.

7 years agoremove NULL checks on fixed size arrays, also was calling BLI_testextensie_glob every...
Campbell Barton [Sat, 13 Jul 2013 14:16:59 +0000 (14:16 +0000)]
remove NULL checks on fixed size arrays, also was calling BLI_testextensie_glob every time in the file selector with a blank string.

7 years agofix for 2 bugs in animation playback
Campbell Barton [Sat, 13 Jul 2013 12:58:00 +0000 (12:58 +0000)]
fix for 2 bugs in animation playback
- reading bmp images was failing (needed to increase the size of the header to 64 bytes)
- the dnd image was being incorrectly checked (was always returning true even when none was used).

7 years agofix for missing break with compositor levels (blue passed through to luminance)
Campbell Barton [Sat, 13 Jul 2013 12:14:04 +0000 (12:14 +0000)]
fix for missing break with compositor levels (blue passed through to luminance)

7 years agofix for orthogonalize_m3,4, missing break statements in switch.
Campbell Barton [Sat, 13 Jul 2013 06:54:44 +0000 (06:54 +0000)]
fix for orthogonalize_m3,4, missing break statements in switch.

7 years agoremove redundant null checks and avoid divide by zero in driver evaluation
Campbell Barton [Sat, 13 Jul 2013 05:53:14 +0000 (05:53 +0000)]
remove redundant null checks and avoid divide by zero in driver evaluation

7 years agofix errors in code
Campbell Barton [Sat, 13 Jul 2013 05:50:35 +0000 (05:50 +0000)]
fix errors in code
- BKE_mball_center_median(), didn't work.
- clip_refresh was removing handlers from wrong space.
- new_modifier, replace strcpy with BLI_strncpy

7 years agofix for misc errors
Campbell Barton [Sat, 13 Jul 2013 05:46:48 +0000 (05:46 +0000)]
fix for misc errors
- reference to out of scope stack var
- freeing fixes size array (never allocated)
- add matching va_end for va_start

7 years agofix bad uses of sizeof() with memory allocation.
Campbell Barton [Sat, 13 Jul 2013 05:43:35 +0000 (05:43 +0000)]
fix bad uses of sizeof() with memory allocation.

7 years agoFix #35470: crash rendering from the terminal in some cases due to render info
Brecht Van Lommel [Fri, 12 Jul 2013 20:31:30 +0000 (20:31 +0000)]
Fix #35470: crash rendering from the terminal in some cases due to render info
text threading issue.

7 years agoFix #35586: add an option to the Z Combine compositing node to disable the Z
Brecht Van Lommel [Fri, 12 Jul 2013 20:15:22 +0000 (20:15 +0000)]
Fix #35586: add an option to the Z Combine compositing node to disable the Z
buffer antialiasing that was restored in 2.67 after it was missing in the new
compositor implementation.

This option tends to make results worse rather then better for Cycles renders,
but is useful for Blender internal. Their Z-buffers look quite different for
antialiasing, and I'd rather not change either.

7 years agoFix #35827: object selection through camera view not working in some cases.
Brecht Van Lommel [Fri, 12 Jul 2013 19:32:36 +0000 (19:32 +0000)]
Fix #35827: object selection through camera view not working in some cases.

The problem was that when the camera is selected, the transform manipulator
is located exactly at the camera view location, and this was blocking selection
of other objects with some OpenGL implementations.

7 years agoFix #36115: dynamic paint not showing correct result after file load or undo.
Brecht Van Lommel [Fri, 12 Jul 2013 16:33:37 +0000 (16:33 +0000)]
Fix #36115: dynamic paint not showing correct result after file load or undo.

7 years agoRelated to #36115: show in render info text when 3D view layer or camera overrides
Brecht Van Lommel [Fri, 12 Jul 2013 16:33:30 +0000 (16:33 +0000)]
Related to #36115: show in render info text when 3D view layer or camera overrides
scene settings when pressing F12 over a 3D view.

7 years agoMoved code for calculating local_matrix to BKE funtion for reuse
Gaia Clary [Fri, 12 Jul 2013 12:58:01 +0000 (12:58 +0000)]
Moved code for calculating local_matrix to BKE funtion for reuse

7 years agofix [#36109] UI softlock when first property of an operator is String
Campbell Barton [Fri, 12 Jul 2013 12:11:21 +0000 (12:11 +0000)]
fix [#36109] UI softlock when first property of an operator is String
disable editing a string on operator UI popups, causes feedback loop

7 years agoMerging r58194 through r58195 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Fri, 12 Jul 2013 11:31:15 +0000 (11:31 +0000)]
Merging r58194 through r58195 from trunk into soc-2013-depsgraph_mt

7 years agoGet rid of global originmat matrix from object.c
Sergey Sharybin [Fri, 12 Jul 2013 11:18:34 +0000 (11:18 +0000)]
Get rid of global originmat matrix from object.c

This matrix was used to store the space the object is in,
which then was accessed by snapping code. No reason to
keep it as a global variable (which isn't safe for threading,
unlikely it'll give issues now, but it's easy to avoid
issues early here).

Now made it so BKE_object_where_is_calc_ex will get an
optional parameter originmat and set this matrix in

Original patch by self, minor changes by Campbell, thanks!

7 years agoMerging r58166 through r58193 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Fri, 12 Jul 2013 09:13:15 +0000 (09:13 +0000)]
Merging r58166 through r58193 from trunk into soc-2013-depsgraph_mt

7 years agofix [#36093] Stationary Particle system - particle Y axis fails to follow emitter...
Campbell Barton [Fri, 12 Jul 2013 08:41:27 +0000 (08:41 +0000)]
fix [#36093] Stationary Particle system - particle Y axis fails to follow emitter object rotation

7 years agoExpose exec callback to an operator
Sergey Sharybin [Fri, 12 Jul 2013 08:31:39 +0000 (08:31 +0000)]
Expose exec callback to an operator

Internally it was only invoke callback set for an
operator template. This invoke was setting such
properties as mouse_x and mouse_y and was calling
an exec function.

This meant that t seemed to be really easy to
use operator from by giving a mouse
positions, but in fact it wasn't possible (because
it requires exec callback)

This commit sets operator's template exec callback,
which makes it possible using from

7 years agofix for crash with texture-baking caused by recent changes to render-database initial...
Campbell Barton [Fri, 12 Jul 2013 05:42:16 +0000 (05:42 +0000)]
fix for crash with texture-baking caused by recent changes to render-database initialization, running bake 3 times would crash.

7 years agofix [#36106] Defining the Loopcut number with the keyboard is limited to 130
Campbell Barton [Fri, 12 Jul 2013 01:33:42 +0000 (01:33 +0000)]
fix [#36106] Defining the Loopcut number with the keyboard is limited to 130
mousewheel value is now clamped too and raised the limit to 500.

7 years agooptimize interp_weights_poly_v2(), well tested, was calculating the area twice as...
Campbell Barton [Fri, 12 Jul 2013 00:18:27 +0000 (00:18 +0000)]
optimize interp_weights_poly_v2(), well tested, was calculating the area twice as much as was needed.

7 years agoUI / Cycles:
Thomas Dinges [Fri, 12 Jul 2013 00:08:55 +0000 (00:08 +0000)]
UI / Cycles:
* Make it more clear for the user what affects 3D View and Final render.
* Static / Dynamic BVH only affects viewport, BVH Cache only final. (see BlenderSync::get_scene_params)

7 years agoFix for Bug #35695: Freestyle produces extra line across an object with pointed areas.
Tamito Kajiyama [Thu, 11 Jul 2013 17:25:18 +0000 (17:25 +0000)]
Fix for Bug #35695: Freestyle produces extra line across an object with pointed areas.

The cause of inconsistent edge connectivity in the view map (documented in the commit
log of revision 58006) was identified and fixed.  The problem was that when a ViewEdge
was split at a cusp vertex (ViewMapBuilder::computeCusps()), the ViewVertex at one end
of a newly created ViewEdge in ViewMap::InsertViewVertex() was not properly updated to
take account of edge connectivity changes.

7 years agofix [#36105] Bevel UV Flicker
Campbell Barton [Thu, 11 Jul 2013 15:57:22 +0000 (15:57 +0000)]
fix [#36105] Bevel UV Flicker
interp_weights_poly_v2/3 functions used much too small an epsilon value, caused flickering.

7 years agoutility function for printing arbitrary sizes vectors.
Campbell Barton [Thu, 11 Jul 2013 15:32:26 +0000 (15:32 +0000)]
utility function for printing arbitrary sizes vectors.

7 years agofix [#36100] bevel lost selection
Campbell Barton [Thu, 11 Jul 2013 14:21:50 +0000 (14:21 +0000)]
fix [#36100] bevel lost selection
interpolating loop was copying face attributes including selection, checked all users of this function and its safe to remove the call (which is bad to begin with).

7 years agoFix bevel when there is a gap in faces around vertex.
Howard Trickey [Thu, 11 Jul 2013 13:29:52 +0000 (13:29 +0000)]
Fix bevel when there is a gap in faces around vertex.
Fixes bug #35927 (Vertex Bevel bug) but even edge
bevel didn't work on the example there. Problem
was with forming the proper ccw ordering of edges
around the bevel.
Also appears to fix bug #35582 (Bevel, weird results).

7 years agoadd BM_elem_attrs_copy_ex() which can take a flag arg to define which flags should...
Campbell Barton [Thu, 11 Jul 2013 12:43:34 +0000 (12:43 +0000)]
add BM_elem_attrs_copy_ex() which can take a flag arg to define which flags should be copied. (mainly to be able to avoid copying selection/hidden state)

7 years agoFix #36091: external render engines like Luxrender don't work well with the save
Brecht Van Lommel [Thu, 11 Jul 2013 12:22:29 +0000 (12:22 +0000)]
Fix #36091: external render engines like Luxrender don't work well with the save
buffers option, it requires specific tile sizes and if they don't match what
OpenEXR expects file saving can get stuck.

Now I've made support for his optional, with a bl_use_save_buffers property for
RenderEngine, set to False by default.

7 years agofix [#36099] Undo crashes on an armature with ID-Properties
Campbell Barton [Thu, 11 Jul 2013 11:38:28 +0000 (11:38 +0000)]
fix [#36099] Undo crashes on an armature with ID-Properties
armatures undo state now stores ID-properties.

7 years agoCode cleanup: de-duplicate display list minmax routines
Sergey Sharybin [Thu, 11 Jul 2013 11:29:45 +0000 (11:29 +0000)]
Code cleanup: de-duplicate display list minmax routines

7 years agoAdded an operator to match texture space to object's bounding box
Sergey Sharybin [Thu, 11 Jul 2013 11:05:56 +0000 (11:05 +0000)]
Added an operator to match texture space to object's bounding box

This operator could be useful after recent changes to how curve's
texture space is calculated.

7 years agoMove curve's boundbox and texspace calculation out of modifier stack
Sergey Sharybin [Thu, 11 Jul 2013 10:45:01 +0000 (10:45 +0000)]
Move curve's boundbox and texspace calculation out of modifier stack

There were several issues with how bounding box and texture space
are calculated:

- This was done at the same time as applying modifiers, meaning if
  several objects are sharing the same curve datablock, bounding
  box and texture space will be calculated multiple times.

  Further, allocating bounding box wasn't safe for threading.

- Bounding box and texture space were evaluated after pre-tessellation
  modifiers are applied. This means Curve-level data is actually
  depends on object data, and it's really bad because different
  objects could have different modifiers and this leads to
  conflicts (curve's data depends on object evaluation order)
  and doesn't behave in a predictable way.

This commit moves bounding box and texture space evaluation from
modifier stack to own utility functions, just like it's was done
for meshes.

This makes curve objects update thread-safe, but gives some
limitations as well. Namely, with such approach it's not so
clear how to preserve the same behavior of texture space:
before this change texture space and bounding box would match
bevelled curve as accurate as possible.

Old behavior was nice for quick texturing -- in most cases you
don;t need to modify texture space at all. But texture space
was depending on render/preview settings which could easily lead
to situations, when final result would be far different from
preview one.

Now we're using CV points coordinates and their radius to approximate
the bounding box. This doesn't give the same exact texture space,
but it helps a lot keeping texture space in a nice predictable way.

We could make approximation smarter in the future or add operator
like "match texture space to object's bounding box".

7 years agoMake fonts safe(r) for threading
Sergey Sharybin [Thu, 11 Jul 2013 09:15:19 +0000 (09:15 +0000)]
Make fonts safe(r) for threading

Getting vfont data wasn't safe for threading, because it
was modifying font data which is in bmain and could be
shared by multiple objects.

For now made it so getting vfont uses critical section,
meaning vfont->data is initializing from inside a locked

7 years agofix for bridge tool where the 2 loops overlap (typical use for scanfill), however...
Campbell Barton [Thu, 11 Jul 2013 08:37:30 +0000 (08:37 +0000)]
fix for bridge tool where the 2 loops overlap (typical use for scanfill), however its nice to support with bridge too since it can do subdivisions, handles customdata and fills in quads.

7 years agoMerging r58148 through r58165 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Thu, 11 Jul 2013 08:25:37 +0000 (08:25 +0000)]
Merging r58148 through r58165 from trunk into soc-2013-depsgraph_mt

7 years agofix [#36090] Blender displays strange symbol in edge length
Campbell Barton [Thu, 11 Jul 2013 05:11:10 +0000 (05:11 +0000)]
fix [#36090] Blender displays strange symbol in edge length

7 years agofix [#36089] crash when using a tiff without TIFFTAG_EXTRASAMPLES
Campbell Barton [Thu, 11 Jul 2013 04:38:47 +0000 (04:38 +0000)]
fix [#36089] crash when using a tiff without TIFFTAG_EXTRASAMPLES

7 years agofix for problem with edge slide where it would stop shapekey modifier from being...
Campbell Barton [Thu, 11 Jul 2013 04:24:36 +0000 (04:24 +0000)]
fix for problem with edge slide where it would stop shapekey modifier from being applied (because of added vertices),
now, instead of making hidden copies of faces, the faces are copied into a temp bmesh.

also remove a hash that was being created and not used (old code).

7 years agobm_loop_interp_mdisps was doing multiple lookups in the same pointer in a nested...
Campbell Barton [Thu, 11 Jul 2013 01:28:27 +0000 (01:28 +0000)]
bm_loop_interp_mdisps was doing multiple lookups in the same pointer in a nested loop. only need one, also avoid multiple layer lookups with mdisp calculation/smoothing

7 years agoFix #36053: slow GPU render with panorama camera + depth of field.
Brecht Van Lommel [Wed, 10 Jul 2013 17:25:52 +0000 (17:25 +0000)]
Fix #36053: slow GPU render with panorama camera + depth of field.

7 years agoFix #36082: animation playback not working after rendering of background scenes and
Brecht Van Lommel [Wed, 10 Jul 2013 16:46:13 +0000 (16:46 +0000)]
Fix #36082: animation playback not working after rendering of background scenes and
multiple render layer nodes. Also fixes issue with database free with vector blur
after recent thread safety changes.

7 years agoTag object-data level boundbox as invalid rather than freeing it
Sergey Sharybin [Wed, 10 Jul 2013 14:26:31 +0000 (14:26 +0000)]
Tag object-data level boundbox as invalid rather than freeing it

Object update used to free object-data level bounding box to trigger
it's re-calculation in the future. Such a freeing performed from
object update isn't thread-safe because mesh could be shared between
multiple objects.

Rather than freeing bounding box, tag it's as invalid, this is safe
from threading point of view and also prevents unnecessary memory

Object-level bounding box is still reallocating, but think we could
change this easily in the future as well.

7 years agoBM_mesh_clear was setting toolflags incorrectly, also no meed to calloc when shrinkin...
Campbell Barton [Wed, 10 Jul 2013 13:06:31 +0000 (13:06 +0000)]
BM_mesh_clear was setting toolflags incorrectly, also no meed to calloc when shrinking toolflags array.

7 years agoskip duplicating faces for edge slide unless its used, this causes update problems...
Campbell Barton [Wed, 10 Jul 2013 12:37:15 +0000 (12:37 +0000)]
skip duplicating faces for edge slide unless its used, this causes update problems for shape keys at the moment, Ill check on that but no need to run in most cases.

7 years agono need to copy mat4x4 -> 3x3 in mat4_to_scale
Campbell Barton [Wed, 10 Jul 2013 12:12:58 +0000 (12:12 +0000)]
no need to copy mat4x4 -> 3x3 in mat4_to_scale

7 years agoRemove unused bounding box from MetaBall
Sergey Sharybin [Wed, 10 Jul 2013 11:36:52 +0000 (11:36 +0000)]
Remove unused bounding box from MetaBall

7 years agoGet rid of confusing usage of cu->bb in BKE_object_minmax
Sergey Sharybin [Wed, 10 Jul 2013 11:36:47 +0000 (11:36 +0000)]
Get rid of confusing usage of cu->bb in BKE_object_minmax

Curve-type objects now always does have object'level
bounding box, meaning cu->bb wouldn't evenr used in

So zapping this confusing check for whether ob->bb
exists, which is always truth. Makes it easier to
follow what cu->bb is for and what ob->bb is for.

7 years agoFix #36080: fix cycles crash with certain group node setups, accessing freed
Brecht Van Lommel [Wed, 10 Jul 2013 10:50:19 +0000 (10:50 +0000)]
Fix #36080: fix cycles crash with certain group node setups, accessing freed

7 years agoMerging r58144 through r58147 form trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Wed, 10 Jul 2013 10:31:59 +0000 (10:31 +0000)]
Merging r58144 through r58147 form trunk into soc-2013-depsgraph_mt

7 years agoFix #36076: Metaballs as particles with particle texture (size influence) crashes...
Sergey Sharybin [Wed, 10 Jul 2013 10:24:06 +0000 (10:24 +0000)]
Fix #36076: Metaballs as particles with particle texture (size influence) crashes Blender

Issue was caused by size influence affecting on object's matrix, which
is nice by it's own. But mball code was using ob->size to check whether
it's zero-sized object or not, but then was using ob->obmat to scale
the meta elements.

This lead to situation when zero-sized elements were trying to tessellate,
which is for sure a really bad idea.

7 years agopatch [#36078] Fixes joining behavior for curves and armatures (when active object...
Campbell Barton [Wed, 10 Jul 2013 09:55:10 +0000 (09:55 +0000)]
patch [#36078] Fixes joining behavior for curves and armatures (when active object not selected).

7 years agoremove reference to wrong python version in comments & pedantic style edit.
Campbell Barton [Wed, 10 Jul 2013 09:40:49 +0000 (09:40 +0000)]
remove reference to wrong python version in comments & pedantic style edit.

7 years agoMerging r58125 through r58143 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Wed, 10 Jul 2013 09:13:45 +0000 (09:13 +0000)]
Merging r58125 through r58143 from trunk into soc-2013-depsgraph_mt

7 years agofix for possible bug with compilers that dont have boolean support.
Campbell Barton [Wed, 10 Jul 2013 08:01:06 +0000 (08:01 +0000)]
fix for possible bug with compilers that dont have boolean support.

7 years agofix [#36065] UI labels are shown in the theme color for unselected list items
Campbell Barton [Wed, 10 Jul 2013 08:00:00 +0000 (08:00 +0000)]
fix [#36065] UI labels are shown in the theme color for unselected list items