8 years agoCycles / Blackbody node:
Thomas Dinges [Mon, 15 Jul 2013 04:38:35 +0000 (04:38 +0000)]
Cycles / Blackbody node:
* Fix the weird results with 800-804.3 Kelvin in SVM. This was an offset issue with the lookup table, made the table slightly larger now (from 954 to 956) which gives a small gap between the R/G/B components.
* Use Luminance also for values below 800 Kelvin, for consistency.

8 years agoCycles / Vector Transform node:
Thomas Dinges [Sun, 14 Jul 2013 22:02:40 +0000 (22:02 +0000)]
Cycles / Vector Transform node:
* Code cleanup, to avoid case-sensitive checks for OSL.

8 years agoMerged revision(s) 58226-58240 from trunk/blender into soc-2013-dingto.
Thomas Dinges [Sun, 14 Jul 2013 16:54:20 +0000 (16:54 +0000)]
Merged revision(s) 58226-58240 from trunk/blender into soc-2013-dingto.

8 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()

8 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.

8 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.

8 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.

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

8 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.

8 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.

8 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.

8 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

8 years agoMerged revision(s) 58093-58225 from trunk/blender into soc-2013-dingto.
Thomas Dinges [Sat, 13 Jul 2013 23:52:43 +0000 (23:52 +0000)]
Merged revision(s) 58093-58225 from trunk/blender into soc-2013-dingto.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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).

8 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)

8 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.

8 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

8 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

8 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

8 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.

8 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.

8 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.

8 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.

8 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.

8 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.

8 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

8 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

8 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!

8 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

8 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

8 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.

8 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.

8 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.

8 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)

8 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.

8 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.

8 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.

8 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).

8 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).

8 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)

8 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.

8 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.

8 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.

8 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

8 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

8 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).

8 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

8 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.

8 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.

8 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.

8 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.

8 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

8 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

8 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.

8 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).

8 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.

8 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.

8 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

8 years agoFix #36041, Chroma key broken. Compositor node was using wrong socket index to link...
Lukas Toenne [Wed, 10 Jul 2013 07:23:55 +0000 (07:23 +0000)]
Fix #36041, Chroma key broken. Compositor node was using wrong socket index to link the output of the RGBToYCC operation to the chroma matte input.

This mistake happens over and over, it's just not clear what the index arguments in these relink functions mean ... We really need to clean up that interface.

8 years agofix [#36079] Use Modifier Stack Crash with Particles
Campbell Barton [Wed, 10 Jul 2013 05:46:45 +0000 (05:46 +0000)]
fix [#36079] Use Modifier Stack Crash with Particles

8 years agoadd asserts for passing in bad index values to DM_get_***_data, CustomData_get()
Campbell Barton [Wed, 10 Jul 2013 05:38:36 +0000 (05:38 +0000)]
add asserts for passing in bad index values to DM_get_***_data, CustomData_get()

8 years agofix for particle lasso-select inverting the selection.
Campbell Barton [Wed, 10 Jul 2013 05:01:49 +0000 (05:01 +0000)]
fix for particle lasso-select inverting the selection.

8 years agofix [#35406] Hair puff brush bug
Campbell Barton [Wed, 10 Jul 2013 04:54:14 +0000 (04:54 +0000)]
fix [#35406] Hair puff brush bug
- puff was interpolating hair that made longer strands cirl up.
- also fixed problem with puff-volume option, it was over-accumulating so unselected parts of the hair would have too much offset applied.

8 years agodraw loopcut display on the deformed mesh when in editmode.
Campbell Barton [Wed, 10 Jul 2013 02:05:16 +0000 (02:05 +0000)]
draw loopcut display on the deformed mesh when in editmode.

8 years agofix [#35948] Toggle-Draw AutoKeyframe Bug
Campbell Barton [Wed, 10 Jul 2013 01:13:24 +0000 (01:13 +0000)]
fix [#35948] Toggle-Draw AutoKeyframe Bug

8 years agoFix #36075: editing shading nodes could still crash blender internal rendered
Brecht Van Lommel [Wed, 10 Jul 2013 01:05:56 +0000 (01:05 +0000)]
Fix #36075: editing shading nodes could still crash blender internal rendered
draw mode. This happens because it uses node data structures in threads, now
it does same as preview render, which is to immediately stop the render thread
when e.g. deleting nodes.

8 years agofix [#36073] Changing list items misses undo push
Campbell Barton [Tue, 9 Jul 2013 23:40:53 +0000 (23:40 +0000)]
fix [#36073] Changing list items misses undo push

8 years agoFix for bug #36009: Rendered ortho view messes up Freestyle lines in 3D viewport.
Tamito Kajiyama [Tue, 9 Jul 2013 23:25:02 +0000 (23:25 +0000)]
Fix for bug #36009: Rendered ortho view messes up Freestyle lines in 3D viewport.

Clipping start is negative when the viewport preview is used with the orthographic view,
while Freestyle assumes that imported mesh data are in the camera coordinate system
with the view point located at origin.  The present solution is to adjust the clipping
start/end and introduce a Z-axis offset for mesh vertices so as to satisfy the assumption.

8 years agoFix missing cycles viewport update when changing manual texture space
Brecht Van Lommel [Tue, 9 Jul 2013 22:27:18 +0000 (22:27 +0000)]
Fix missing cycles viewport update when changing manual texture space
location or size in the properties editor.

8 years agoPartial revert of rev58110
Sergey Sharybin [Tue, 9 Jul 2013 18:38:33 +0000 (18:38 +0000)]
Partial revert of rev58110

There's one thing we didn't foresee from the beginning,
which is apparently TLS is only available in OSX starting
from version 10.7, and we still do support of 10.6.

After recent Brecht's changes about locked viewport
while initializing BI render this TLS is not needed
in trunk anymore. So reverting this chunk of base
iteration to use static variable. But leaving all the
other static variables warped into context still, it
should help a bit in the future refactor.

Real fix would be to have some kind of graph context
evaluation structure which would be passing to update
routines (which will solve threaded mballs update) and
making depsgraph responsible for getting a motherball.
But this is all for GSoC project.

8 years agofix [#36004] Vertex parent on curve point results in blank 'parent_type' on child...
Campbell Barton [Tue, 9 Jul 2013 13:50:22 +0000 (13:50 +0000)]
fix [#36004] Vertex parent on curve point results in blank 'parent_type' on child object

8 years agoFix blender environment map texture looking different on the first render with
Brecht Van Lommel [Tue, 9 Jul 2013 13:47:19 +0000 (13:47 +0000)]
Fix blender environment map texture looking different on the first render with
an image file, the image extend is set automatically when render starts but not
when the image was never loaded yet.

8 years agofix [#36055] Edge/Face Info display on wrong position with key frames
Campbell Barton [Tue, 9 Jul 2013 12:59:31 +0000 (12:59 +0000)]
fix [#36055] Edge/Face Info display on wrong position with key frames
display editmesh stats with deform modifiers.

8 years agoFix #36030: datablock drag and drop to buttons not working with a certain number
Brecht Van Lommel [Tue, 9 Jul 2013 11:31:49 +0000 (11:31 +0000)]
Fix #36030: datablock drag and drop to buttons not working with a certain number
of objects in the scene.

8 years agoFix #36050, backdrop not working. The compositor backdrop requires a restart of the...
Lukas Toenne [Tue, 9 Jul 2013 09:10:42 +0000 (09:10 +0000)]
Fix #36050, backdrop not working. The compositor backdrop requires a restart of the compositing job, which does not happen if just enabling backdrop after adding a viewer node. To fix this added the appropriate notifiers in a update callback for the show_backdrop property.

8 years agoadd checks in paintface_flush_flags for faces which have no original index values...
Campbell Barton [Tue, 9 Jul 2013 08:25:30 +0000 (08:25 +0000)]
add checks in paintface_flush_flags for faces which have no original index values. (could give out of bounds writes)

8 years agoFixed more threading issues with metaballs
Sergey Sharybin [Tue, 9 Jul 2013 08:23:01 +0000 (08:23 +0000)]
Fixed more threading issues with metaballs

This time issue was caused by static variables used in
BKE_scene_base_iter_next function.

Change is not so much ultimate actually, but didn't
find more clear solution for now. So the changes are:

- Wrap almost all the static variables into own context-
  like structure, which is owned by the callee function
  and getting passed to the iteration function.

- Recursion detection wasn't possible with such approach,
  so recursion detection still uses static in_next_object
  variable, but which is now stored in thread local
  storage (TLS, or thread variable if this names are more
  clear for you).

This makes code thread-safe, but for sure final solution
shall be completely different. Ideally, dependency graph
shall be possible to answer on question "which object is
a motherball for this metaball". This will avoid iterating
via all the bases, objects and duplis just to get needed

Further, metaball evaluation ideally will use the same
kind of depsgraph filtering, which will get result for
question like "which objects belongs to this group of

But this ideal things are to be solved in Joshua's and
mind GSoC projects.

Tested on linux (gcc and clang) and windows (msvc2008),
hopefully no compilation error will happen.

Thanks to Brecht for reviewing the change and getting
feedback for other possible ways we've dicussed!

8 years agofix [#36039] Texture paint bug with face selection on subdivided object
Campbell Barton [Tue, 9 Jul 2013 08:17:14 +0000 (08:17 +0000)]
fix [#36039] Texture paint bug with face selection on subdivided object
original patch by Antony Riakiotakis, made some edits to only check origindex when needed.

8 years agofix for error in vertex_group_vert_select_unlocked_poll, check for non existing group...
Campbell Barton [Tue, 9 Jul 2013 07:50:16 +0000 (07:50 +0000)]
fix for error in vertex_group_vert_select_unlocked_poll, check for non existing group wasn't right.

8 years agofix error where if you tried to bridge an odd number of loops after bridging pairs...
Campbell Barton [Tue, 9 Jul 2013 06:34:54 +0000 (06:34 +0000)]
fix error where if you tried to bridge an odd number of loops after bridging pairs, there was no way to change the options.
eventually I think the operator api should support this but for now return finished.

8 years agofix [#36066] crash when Tab out text object
Campbell Barton [Tue, 9 Jul 2013 06:21:45 +0000 (06:21 +0000)]
fix [#36066] crash when Tab out text object
the way Curve.len is used at the moment is really stupid, calculate string size on save for now, but should really store the length in bytes and total number of characters.

8 years agofix [#36008] Can't set values higher than 1.0 in HSV colour picker (But can in RGB...
Campbell Barton [Tue, 9 Jul 2013 04:00:56 +0000 (04:00 +0000)]
fix [#36008] Can't set values higher than 1.0 in HSV colour picker (But can in RGB) - also some strange behavior

8 years agofix for own error in normal-recalc r58077, initial face flipping wasn't checking...
Campbell Barton [Tue, 9 Jul 2013 01:18:15 +0000 (01:18 +0000)]
fix for own error in normal-recalc r58077, initial face flipping wasn't checking against face-island center.

8 years ago* Fix GLSL shader for Light Path node after ray depth addition.
Thomas Dinges [Tue, 9 Jul 2013 01:05:04 +0000 (01:05 +0000)]
* Fix GLSL shader for Light Path node after ray depth addition.

8 years agoMerged revision(s) 58059-58092 from trunk/blender into soc-2013-dingto.
Thomas Dinges [Tue, 9 Jul 2013 00:58:25 +0000 (00:58 +0000)]
Merged revision(s) 58059-58092 from trunk/blender into soc-2013-dingto.

8 years agoCycles / Ray Depth:
Thomas Dinges [Tue, 9 Jul 2013 00:18:13 +0000 (00:18 +0000)]
Cycles / Ray Depth:
* Added a Ray Depth output to the Light Path node, which returns the current ray bounce (0, 1, 2, 3...)
* This can be used to use different shaders for direct and indirect lighting and artificial effects.

* Here we use the output to apply a different shader to the third bounce. As in this example, you can use Math Nodes (Greater Than / Less Than) if you want to use values outside of the 0/1 range.

* Here we restrict the maximum bounce on a per shader basis for the left sphere. This way it looks like we would only have 1 max bounce set in the scene "Light paths" panel.
This can be used to e.g. improve performance for objects far from the camera, which do not need full GI.

Technical notes:
* Implemented for both integrators and SVM/OSL.
* This is done by passing state.bounce to the shader_setup_from_* functions.
* Note: We don't pass state.bounce to kernel_shader_evaluate() and therefore shader_setup_from_displacement() method doesn't set the value, this is outside the path trace loop. Maybe a ToDo?

8 years agominor improvements
Campbell Barton [Tue, 9 Jul 2013 00:13:17 +0000 (00:13 +0000)]
minor improvements
- calc normals only check flag when needed.
- keymap, dont get name unless its needed.
- keymap, avoid property lookup.
- idprop debug print, include pointer, helpful for troubleshooting.

8 years agofix [#35806] Unable to check "Correct UVs" option in "Loop Cut and Slide" (Keymap...
Campbell Barton [Tue, 9 Jul 2013 00:08:18 +0000 (00:08 +0000)]
fix [#35806] Unable to check "Correct UVs" option in "Loop Cut and Slide" (Keymap Editor)

8 years agoFix #36064: cycles direct/indirect light passes with materials that have zero
Brecht Van Lommel [Mon, 8 Jul 2013 23:31:45 +0000 (23:31 +0000)]
Fix #36064: cycles direct/indirect light passes with materials that have zero
RGB color components gave non-grey results when you might no expect it.

What happens is that some of the color channels are zero in the direct light
pass because their channel is zero in the color pass. The direct light pass is
defined as lighting divided by the color pass, and we can't divide by zero. We
do a division after all samples are added together to ensure that multiplication
in the compositor gives the exact combined pass even with antialiasing, DoF, ..

Found a simple tweak here, instead of setting such channels to zero it will set
it to the average of other non-zero color channels, which makes the results look
like the expected grey.

8 years agomove keymap ui into modules, its not loaded on startup anymore.
Campbell Barton [Mon, 8 Jul 2013 22:57:51 +0000 (22:57 +0000)]
move keymap ui into modules, its not loaded on startup anymore.

8 years agoFix #35969: blender internal and cycles not updating mesh while in edit mode.
Brecht Van Lommel [Mon, 8 Jul 2013 22:41:14 +0000 (22:41 +0000)]
Fix #35969: blender internal and cycles not updating mesh while in edit mode.
Patch for blender internal made by Campbell.

8 years agoFix #36063: cycles 3D viewport was incorrectly influenced by blender internal
Brecht Van Lommel [Mon, 8 Jul 2013 22:41:12 +0000 (22:41 +0000)]
Fix #36063: cycles 3D viewport was incorrectly influenced by blender internal
material halo settings.

8 years agoFix #35979, #35937, #35739: undo crashes and missing updates with blender
Brecht Van Lommel [Mon, 8 Jul 2013 22:26:10 +0000 (22:26 +0000)]
Fix #35979, #35937, #35739: undo crashes and missing updates with blender
internal viewport rendering. Lots of tweaks here, mainly:

* Stop 3D viewport render and free database before undo.
* Accumulate update flags rather than replace them each time it rerenders, to
  avoid previous updates getting lost.
* Don't check against Render struct view parameters for changes, those are set
  in the job thread which might not run before the next update call.

8 years agoFix #36059: region overlap did not show scopes overlapping in the image editor.
Brecht Van Lommel [Mon, 8 Jul 2013 18:27:32 +0000 (18:27 +0000)]
Fix #36059: region overlap did not show scopes overlapping in the image editor.
It's only enabled for some particular regions, this one makes sense to show.