blender.git
8 years agoFirst attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).
Bastien Montagne [Fri, 24 May 2013 10:16:07 +0000 (10:16 +0000)]
First attempt to handle openexr/ilmbase 2.0 in install_deps.sh (linux builds).

Only activated for Deb-like distro for now, only tested with testing/amd64. Notes :
* Had to add a hell of patches to ilmbase/openexr/oiio cmake files (some are real, stupid bugs fixing [like files missing in lists or wrong linking order], others are "enhancements" [like being able to compile both static and dyn libs for openexr]).
* Unfortunately, I could not manage to keep oiio static (can't compile osl later, as it does not link all deps of oiio, tiff, jpeg, png, etc.). I’ll try to fix this later, but for now, you'll have to do as with boost (ldconfig).

I won't say here what I think about not having any (reliable) way to really link a static lib into another one... :/

Will test and enable other distro in following day(s), I do not *expect* much difficulties here.

8 years agofix for building on osx with recent freestyle bugfix.
Campbell Barton [Fri, 24 May 2013 10:15:20 +0000 (10:15 +0000)]
fix for building on osx with recent freestyle bugfix.

8 years agoBring back "Local" as second orientation choice after "Global", as in previuos "manua...
Bastien Montagne [Fri, 24 May 2013 10:05:25 +0000 (10:05 +0000)]
Bring back "Local" as second orientation choice after "Global", as in previuos "manual" menu. Pointed out by sebastian_k on IRC, thanks.

8 years agoweight tools: added more selection types to invert operator
Gaia Clary [Fri, 24 May 2013 09:30:13 +0000 (09:30 +0000)]
weight tools: added more selection types to invert operator

8 years agoFix #35493: Blender crash when rendering in terminal mode
Sergey Sharybin [Fri, 24 May 2013 07:56:32 +0000 (07:56 +0000)]
Fix #35493: Blender crash when rendering in terminal mode

Use the same window manager for freestyle bmain as
real bmain uses. This is needed because freestyle's
bmain could be used to tag scenes for update, which
implies call of ED_render_scene_update in some cases
and that function requires proper windoew manager
to present.

Alternative would be to make render scene update does
nothing if there's no window manager, but we wanted
freestyle to be applied in rendered viewport once and
think current change is what we'll need to support
freestyle in viewport.

But a bit further, perhaps that'd make sense to not
register ED_render_scene_update as a scene update
callback when in background mode?

8 years agofix own error in r56649, caused normal calculation to fail, reported as [#35448]...
Campbell Barton [Fri, 24 May 2013 06:50:15 +0000 (06:50 +0000)]
fix own error in r56649, caused normal calculation to fail, reported as [#35448], also quiet float/double warning.

8 years agodisable auto indent when pasting text into the python console.
Campbell Barton [Fri, 24 May 2013 01:04:37 +0000 (01:04 +0000)]
disable auto indent when pasting text into the python console.

8 years agofix [#35478] Spatial Noise crashes Blender on Render
Campbell Barton [Fri, 24 May 2013 00:30:22 +0000 (00:30 +0000)]
fix [#35478] Spatial Noise crashes Blender on Render

8 years agofix own regression with ortho-camera adding points reported as [#35462]
Campbell Barton [Fri, 24 May 2013 00:01:20 +0000 (00:01 +0000)]
fix own regression with ortho-camera adding points reported as [#35462]

8 years agoFollow up to previous commit. Non tiled mask wouldn't work on airbrushes
Antony Riakiotakis [Thu, 23 May 2013 21:37:18 +0000 (21:37 +0000)]
Follow up to previous commit. Non tiled mask wouldn't work on airbrushes

8 years agofix [#35488] Toggle "Show All Layers"
Campbell Barton [Thu, 23 May 2013 21:24:56 +0000 (21:24 +0000)]
fix [#35488] Toggle "Show All Layers"

8 years agoremove v3d.modeselect, reduce size of other vars in v3d.
Campbell Barton [Thu, 23 May 2013 21:14:17 +0000 (21:14 +0000)]
remove v3d.modeselect, reduce size of other vars in v3d.

8 years agoFix #35426, masking works wrong in projection painting. When we don't
Antony Riakiotakis [Thu, 23 May 2013 21:02:51 +0000 (21:02 +0000)]
Fix #35426, masking works wrong in projection painting. When we don't
use tiling, we need to sample the mask texture when determining the
pixel masking.

8 years agostyle cleanup: also remove unused var
Campbell Barton [Thu, 23 May 2013 20:20:24 +0000 (20:20 +0000)]
style cleanup: also remove unused var

8 years agoCleaned up draw_selected_name() to avoid redundant BLI_snprintf() calls
Gaia Clary [Thu, 23 May 2013 20:02:53 +0000 (20:02 +0000)]
Cleaned up draw_selected_name() to avoid redundant BLI_snprintf() calls

8 years agoFix stack corruptions in special cases
Sergey Sharybin [Thu, 23 May 2013 18:19:50 +0000 (18:19 +0000)]
Fix stack corruptions in special cases

Issue was caused by wrong array length used
for result of name_uiprefix_id, which shall
actually be 1 byte bugger than MAX_ID_NAME.

Reported by Sebastian Koenig in IRC.

8 years agoMade display of object : bone : shapes unique for weight painting and armature posing
Gaia Clary [Thu, 23 May 2013 18:01:43 +0000 (18:01 +0000)]
Made display of object : bone : shapes unique for weight painting and armature posing

8 years agoCycles / Toon BSDF:
Thomas Dinges [Thu, 23 May 2013 17:45:20 +0000 (17:45 +0000)]
Cycles / Toon BSDF:
* Added a toon bsdf node to Cycles. This was already available as OSL only closure, but is now available inside the SVM backed as well, for CPU and GPU rendering.
* There are 2 variations available, diffuse and glossy toon, selectable via a menu inside the node.

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/Shaders#Toon

Example render & blend file:
http://www.pasteall.org/pic/show.php?id=51970
http://www.pasteall.org/blend/21579

8 years agoImproved display of active bone (in 3DView) when weight painting a mesh Object
Gaia Clary [Thu, 23 May 2013 16:45:12 +0000 (16:45 +0000)]
Improved display of active bone (in 3DView) when weight painting a mesh Object

8 years agoAdded display of active bone (in 3DView) when weight painting a mesh Object
Gaia Clary [Thu, 23 May 2013 16:24:36 +0000 (16:24 +0000)]
Added display of active bone (in 3DView) when weight painting a mesh Object

8 years agoBug fix, IRC report.
Ton Roosendaal [Thu, 23 May 2013 16:01:25 +0000 (16:01 +0000)]
Bug fix, IRC report.

Mesh with very strange topology makes loop-select (ALT+select) crash.
Missing NULL check for do-while loop that can return NULL.

For Campbell: here's the file to check: http://www.pasteall.org/blend/21576

8 years agoBug fix #35481
Ton Roosendaal [Thu, 23 May 2013 15:10:36 +0000 (15:10 +0000)]
Bug fix #35481

Browsing screens via menu disabled screen editing (area divider drag) and made
popup menu hanging (select same editor for example).

Caused by bug fix #35434, commit gets rewinded, and report reopened.

8 years agoMasks api improvements
Sergey Sharybin [Thu, 23 May 2013 10:50:55 +0000 (10:50 +0000)]
Masks api improvements

- Added MaskLayer.splines.new (which creates single spline
  and returns pointer to it).
- Added MaskLayer.splines.remove() to remove given spline.
- Added MaskSpline.points.new() which creates new point
  in the origin and returns pointer to it.
- Added MaskSpline.points.remove() to remove given point.

8 years agoSupport for bridge tool subdivisions, smoothing and shape along the profile.
Campbell Barton [Thu, 23 May 2013 06:19:04 +0000 (06:19 +0000)]
Support for bridge tool subdivisions, smoothing and shape along the profile.
also added the underlying subdivision as a standalone operator in the edge menu, named: subdivide edge-ring.
http://www.graphicall.org/ftp/ideasman42/bridge_subd.png

8 years agofix/workaround for problem with osx permissions.
Campbell Barton [Thu, 23 May 2013 03:35:57 +0000 (03:35 +0000)]
fix/workaround for problem with osx permissions.

8 years agoFix #35449: image sequences to drive e.g. particle length or used in modifiers
Brecht Van Lommel [Wed, 22 May 2013 22:17:07 +0000 (22:17 +0000)]
Fix #35449: image sequences to drive e.g. particle length or used in modifiers
were no properly updating when rendering animations.

The render engine was only updating the image user current frame on images used
by material textures. Now moved the function that updates all from the editors
to blenkernel level and do it on all frame changes.

8 years agoWeight tools: Clean added additional selection options in operator Panel
Gaia Clary [Wed, 22 May 2013 22:03:14 +0000 (22:03 +0000)]
Weight tools: Clean added additional selection options in operator Panel

8 years agowrong list member size for memory setting(was too short)
Gaia Clary [Wed, 22 May 2013 20:46:48 +0000 (20:46 +0000)]
wrong list member size for memory setting(was too short)

8 years agoFix #35459: global texture coordinates not working with GLSL shaders. Got broken
Brecht Van Lommel [Wed, 22 May 2013 20:18:17 +0000 (20:18 +0000)]
Fix #35459: global texture coordinates not working with GLSL shaders. Got broken
in shader uniform binding optimizations in revision 55527.

8 years agoFix #35469: image editor smear and soften paint tools not working correct for
Brecht Van Lommel [Wed, 22 May 2013 20:06:50 +0000 (20:06 +0000)]
Fix #35469: image editor smear and soften paint tools not working correct for
float images, was not taking premul/straight convention into account properly.

8 years agoTemporary fix for [#35467] wrong lines with panoramic camera.
Tamito Kajiyama [Wed, 22 May 2013 19:21:42 +0000 (19:21 +0000)]
Temporary fix for [#35467] wrong lines with panoramic camera.
A warning message is shown when the panoramic camera is combined with Freestyle.

8 years agoTexture Nodes:
Thomas Dinges [Wed, 22 May 2013 17:24:52 +0000 (17:24 +0000)]
Texture Nodes:
* Use node size presets as well, some nodes were too small and also too limited in max size.

8 years agoDe-duplicate zero resolution check in marker add operators.
Sergey Sharybin [Wed, 22 May 2013 06:28:59 +0000 (06:28 +0000)]
De-duplicate zero resolution check in marker add operators.

8 years agoFix #35458: SIGSEGV ( crash ) in imagewraposa()
Sergey Sharybin [Wed, 22 May 2013 06:22:28 +0000 (06:22 +0000)]
Fix #35458: SIGSEGV ( crash ) in imagewraposa()

Was missing a NULL-check.

8 years agoFix #35461: Marker gets initialized to arbitrary position
Sergey Sharybin [Wed, 22 May 2013 06:06:22 +0000 (06:06 +0000)]
Fix #35461: Marker gets initialized to arbitrary position

Use center of currently visible frame part instead of
center of the whole frame for position of marker which
is adding from toolbox.

Used separate operator for this to keep operators more
atomic and not confuse with lots of conflicting properties.

8 years agoutility bmesh functions, for edge loop creation, optionally pass array BM_edge_split_...
Campbell Barton [Wed, 22 May 2013 06:00:26 +0000 (06:00 +0000)]
utility bmesh functions, for edge loop creation, optionally pass array BM_edge_split_n() to get verts created.

8 years agoMark toggling and create missing and non-save properties for brush selection
Sergey Sharybin [Wed, 22 May 2013 05:41:39 +0000 (05:41 +0000)]
Mark toggling and create missing and non-save properties for brush selection

Re-using this properties were rather confusing -- selecting mask brush once
lead to changes in behavior of other brushes hotkeys.

8 years agoFix for a crash due to de-referencing of a StrokeVertex Python wrapper object.
Tamito Kajiyama [Tue, 21 May 2013 23:11:25 +0000 (23:11 +0000)]
Fix for a crash due to de-referencing of a StrokeVertex Python wrapper object.
Problem report by flokkievids in the BA Freestyle thread, thanks!

8 years agoAdded new method Stroke.remove_all_vertices() for removing all vertices from the...
Tamito Kajiyama [Tue, 21 May 2013 22:59:44 +0000 (22:59 +0000)]
Added new method Stroke.remove_all_vertices() for removing all vertices from the stroke.
Patch from flokkievids in the BA Freestyle thread, thanks!

8 years agoShader Nodes:
Thomas Dinges [Tue, 21 May 2013 20:21:46 +0000 (20:21 +0000)]
Shader Nodes:
* Use unified node sizes, as already was done with compositor nodes. Only Mapping node uses a custom size. This way we don't have too small nodes on creation anymore.
* Don't show Script Category for Blender Internal nodes.

8 years agoSmoke: Remove accidental leftover code from gSoC Smoke + my Smoke code merge.
Daniel Genrich [Tue, 21 May 2013 19:52:22 +0000 (19:52 +0000)]
Smoke: Remove accidental leftover code from gSoC Smoke + my Smoke code merge.

Thanks to Miika for pointing this issue out and fixing it.

8 years agoFix: Smoke simulations of very high resolutions often produced weird results, as...
Miika Hamalainen [Tue, 21 May 2013 19:20:48 +0000 (19:20 +0000)]
Fix: Smoke simulations of very high resolutions often produced weird results, as if smoke was colliding in an invisible wall.

This was caused by a "hack" Daniel Genrich introduced in his moving obstacles commit in r46050. I suppose it was originally added to prevent issues with too fast moving obstacles, but now it ended up limiting maximum velocity of higher resolution simulations.

Here is an comparision of 184 resolution simulation (simulation area limited by adaptive domain):
https://www.miikah.org/blender/smoke_with_pressure_limit_hack.png
https://www.miikah.org/blender/smoke_without_pressure_limit_hack.png

I now reverted that hack until a better solution is found. Daniel, can you check this out? Pressure was limited to maximum of dt * dx (= dt / res) which doesn't make sense to limit pressure based on grid resolution. Maybe better to limit with a constant factor instead?

8 years agoFix: Smoke adaptive domain applied velocity in wrong unit space causing high velociti...
Miika Hamalainen [Tue, 21 May 2013 18:59:46 +0000 (18:59 +0000)]
Fix: Smoke adaptive domain applied velocity in wrong unit space causing high velocities never apply additional margin ahead the fluid.

Also skip new flow velocity because thats not accurate enough to be of any use in there.

8 years agoFix: Smoke simulator produced slightly different results on every run if openmp was...
Miika Hamalainen [Tue, 21 May 2013 18:57:19 +0000 (18:57 +0000)]
Fix: Smoke simulator produced slightly different results on every run if openmp was enabled.

This was a typical threading issue. Move that particular function out of the parallel block.

8 years agoOSX/scons: use ditto --arch <arch> instead of cp, to thin out unused architecture...
Jens Verwiebe [Tue, 21 May 2013 16:44:39 +0000 (16:44 +0000)]
OSX/scons: use ditto --arch <arch> instead of cp, to thin out unused architecture on the fly

8 years agoFix #35232: Marker right-click misbehavior on adding
Sergey Sharybin [Tue, 21 May 2013 14:44:50 +0000 (14:44 +0000)]
Fix #35232: Marker right-click misbehavior on adding

Made it so Add Marker button from toolbox will place
marker in the middle of the frame.

8 years agoCode cleanup / Cycles:
Thomas Dinges [Tue, 21 May 2013 13:22:11 +0000 (13:22 +0000)]
Code cleanup / Cycles:
* Use M_2PI_F in more places and do multiplication instead of division in gradient texture.

8 years agoCode cleanup / Cycles:
Thomas Dinges [Tue, 21 May 2013 13:15:27 +0000 (13:15 +0000)]
Code cleanup / Cycles:
* Re-use already defined Westin closure class.

8 years agoFix #35443: Animation player doesn't play some movie formats
Sergey Sharybin [Tue, 21 May 2013 12:18:35 +0000 (12:18 +0000)]
Fix #35443: Animation player doesn't play some movie formats

Need to initialize FFmpeg for animation player.

This is a bit confusing, but the only way to do this
properly and clear is to call IMB_ffmpeg_init from
playback_mode command line callback.

This is because this callback is blocking and
"usual" FFmpeg initializetion (which happens after
command line parsing) was never called.

Could be switched to separate FFmpeg initializtion
and debug level set but let's keep simple for now.

8 years agoFluid simulation manual number of threads option now doesn't set the number
Brecht Van Lommel [Tue, 21 May 2013 11:37:42 +0000 (11:37 +0000)]
Fluid simulation manual number of threads option now doesn't set the number
of threads to the number of cores when the fluid is created. Rather it is now
set to 0 which means "use the number of threads specified for the scene".

8 years agoFix compiler warnings with westin OSL code.
Brecht Van Lommel [Tue, 21 May 2013 10:13:47 +0000 (10:13 +0000)]
Fix compiler warnings with westin OSL code.

8 years agoFix to show numpad . instead of NDOF fit as first shortcut key in menus.
Brecht Van Lommel [Tue, 21 May 2013 10:13:45 +0000 (10:13 +0000)]
Fix to show numpad . instead of NDOF fit as first shortcut key in menus.

8 years agoRelated to #35452: show warning when unwrapping object with negative scale, same
Brecht Van Lommel [Tue, 21 May 2013 10:13:44 +0000 (10:13 +0000)]
Related to #35452: show warning when unwrapping object with negative scale, same
as we already do for non-uniform scale.

8 years agoFix build error after removing return value from MEM_freeN.
Brecht Van Lommel [Tue, 21 May 2013 10:13:42 +0000 (10:13 +0000)]
Fix build error after removing return value from MEM_freeN.

8 years agocode cleanup: remove callbacks only added to wrap MEM_freeN
Campbell Barton [Tue, 21 May 2013 08:45:10 +0000 (08:45 +0000)]
code cleanup: remove callbacks only added to wrap MEM_freeN

8 years agoremove return value from MEM_freeN, it wasn't used anywhere and was cast to a differe...
Campbell Barton [Tue, 21 May 2013 07:37:59 +0000 (07:37 +0000)]
remove return value from MEM_freeN, it wasn't used anywhere and was cast to a different function signature. (which evidently works but error prone).

8 years agofix own bug [#35451] Extrude -> Grab -> Cancel -> Crash
Campbell Barton [Tue, 21 May 2013 05:01:14 +0000 (05:01 +0000)]
fix own bug [#35451] Extrude -> Grab -> Cancel -> Crash

8 years agocode cleanup: scons - binreloc include was copied all over the place for no reason...
Campbell Barton [Mon, 20 May 2013 18:55:08 +0000 (18:55 +0000)]
code cleanup: scons - binreloc include was copied all over the place for no reason, -pthread too.

8 years agocode cleanup: split scons includes onto multiple lines, reduce chance of include...
Campbell Barton [Mon, 20 May 2013 18:42:28 +0000 (18:42 +0000)]
code cleanup: split scons includes onto multiple lines, reduce chance of include conflicts later on.

8 years agoFix: smoke noise tile was saved in Blender executable directory, which is often write...
Miika Hamalainen [Mon, 20 May 2013 17:48:16 +0000 (17:48 +0000)]
Fix: smoke noise tile was saved in Blender executable directory, which is often write protected on modern systems.

This caused high resolution smoke to always regenerate new tile when domain was reinitialized, slowing down especially adaptive domain simulations. Now noise tile is saved in Blender temp directory instead.

8 years agocode cleanup: replace PARALLEL define with _OPENMP
Campbell Barton [Mon, 20 May 2013 16:15:16 +0000 (16:15 +0000)]
code cleanup: replace PARALLEL define with _OPENMP

8 years agoCycles / Wireframe node:
Thomas Dinges [Mon, 20 May 2013 15:58:37 +0000 (15:58 +0000)]
Cycles / Wireframe node:
* Added a wireframe node (Input category) to get access to Mesh wireframe data.
The thickness can be controlled via a "Size" parameter, and is available in world units (default) and screen pixel size.
* Only the triangulated mesh is available now, quads is for later.

Documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes/More#Wireframe

Render and Example file:
http://www.pasteall.org/pic/show.php?id=51731
http://www.pasteall.org/blend/21510

8 years agoMath Node:
Thomas Dinges [Mon, 20 May 2013 14:38:47 +0000 (14:38 +0000)]
Math Node:
* Added a Modulo operation to the math node, available in Compositor, Shader and Texture Nodes.

8 years agono need to add own define for openmp.
Campbell Barton [Mon, 20 May 2013 14:38:43 +0000 (14:38 +0000)]
no need to add own define for openmp.

8 years agoCmake / Fluids:
Thomas Dinges [Mon, 20 May 2013 14:00:19 +0000 (14:00 +0000)]
Cmake / Fluids:
* Possible fix for Fluid threads UI not being shown with cmake builds.

8 years agocode cleanup: rename bmesh operator files to be more consistent
Campbell Barton [Mon, 20 May 2013 07:38:11 +0000 (07:38 +0000)]
code cleanup: rename bmesh operator files to be more consistent

8 years agofix [#35434] Segmentation fault switching screen layout from python
Campbell Barton [Mon, 20 May 2013 05:06:52 +0000 (05:06 +0000)]
fix [#35434] Segmentation fault switching screen layout from python

8 years agoCode Cleanup / Cycles:
Thomas Dinges [Mon, 20 May 2013 00:26:48 +0000 (00:26 +0000)]
Code Cleanup / Cycles:
* Remove an unused parameter from Checker texture and correct a typo in license header.

8 years agocode cleanup: remove unneeded elements in uv NearestHit.
Campbell Barton [Sun, 19 May 2013 18:05:34 +0000 (18:05 +0000)]
code cleanup: remove unneeded elements in uv NearestHit.

8 years agocode cleanup: bmesh/uv
Campbell Barton [Sun, 19 May 2013 17:45:42 +0000 (17:45 +0000)]
code cleanup: bmesh/uv
- uv_mouse_select() move from BLI_array to alloca
- was unnecessarily looping over faces for an index lookup when an array is already created.

8 years agocode cleanup: remove some kludge from uv loop select
Campbell Barton [Sun, 19 May 2013 17:20:10 +0000 (17:20 +0000)]
code cleanup: remove some kludge from uv loop select

8 years agocode cleanup: uv_find_nearest_vert
Campbell Barton [Sun, 19 May 2013 16:52:44 +0000 (16:52 +0000)]
code cleanup: uv_find_nearest_vert
was doing unneeded lookups on face uv's when the adjacent uv's are known.

8 years agoremove WITH_AVX_CPU, also used add_definitions incorrectly.
Campbell Barton [Sun, 19 May 2013 16:47:41 +0000 (16:47 +0000)]
remove WITH_AVX_CPU, also used add_definitions incorrectly.
single cflags can be added manually and don't need their own options.

8 years agostyle cleanup
Campbell Barton [Sun, 19 May 2013 15:11:25 +0000 (15:11 +0000)]
style cleanup

8 years agocode cleanup: simplify fast_ray_nearest_hit()
Campbell Barton [Sun, 19 May 2013 15:03:36 +0000 (15:03 +0000)]
code cleanup: simplify fast_ray_nearest_hit()

8 years agorevert (ifdef) r54745. which enbabled alpha in the GL buffer.
Campbell Barton [Sun, 19 May 2013 11:39:22 +0000 (11:39 +0000)]
revert (ifdef) r54745. which enbabled alpha in the GL buffer.
looks to be the cause of bug [#35415]

we can make this optional.

8 years agofix memory corruption: allocated memory space did not match the needed space
Gaia Clary [Sun, 19 May 2013 09:45:53 +0000 (09:45 +0000)]
fix memory corruption: allocated memory space did not match the needed space

8 years agofix for mistake in r56903
Campbell Barton [Sun, 19 May 2013 08:46:17 +0000 (08:46 +0000)]
fix for mistake in r56903

8 years agoFix for last fix, compile error in smoke code.
Brecht Van Lommel [Sun, 19 May 2013 04:12:00 +0000 (04:12 +0000)]
Fix for last fix, compile error in smoke code.

8 years agoFix #35407: different particle behavior compared to 2.66, reverted part of 56073.
Brecht Van Lommel [Sun, 19 May 2013 04:07:01 +0000 (04:07 +0000)]
Fix #35407: different particle behavior compared to 2.66, reverted part of 56073.

8 years agoBGE: Applying patch [#35416] "Missing python properties on ActionActuator: layer...
Mitchell Stokes [Sun, 19 May 2013 03:15:50 +0000 (03:15 +0000)]
BGE: Applying patch [#35416] "Missing python properties on ActionActuator: layer, layerWeight" from Florian Bantner (scheintodx).

8 years agoFix for [#35245] Freestyle getting stuck on view map creation + memory leaks.
Tamito Kajiyama [Sun, 19 May 2013 00:56:40 +0000 (00:56 +0000)]
Fix for [#35245] Freestyle getting stuck on view map creation + memory leaks.

There were two issues:

- Line visibility computations are very slow in the case of the provided .blend file, which gave
an impression that the rendering process got stuck.  The slowness can be explained by the present
data structures used for the line visibility computations, together with the specific mesh distribution
of the test scene.  At the moment Freestyle uses a regular grid in the 2D image coordinate system
to divide tris/quads into small groups in order to accelerate the line visibility computations.
On the other hand, the test scene is populated a big plane (made of one quad) and a moderately
detailed mesh object (22K tris).  The scale of the latter mesh is animated from nearly zero to
about 0.2 to make the object show up over time.  When the scale is nearly equal to zero, all the
tris concentrate in one grid cell, so essentially there is no performance gain from the grid data
structure optimized for speed.  It looks like a better grid data structure (possibly based on
adaptive grid refinement) is necessary to genuinely address the identified performance issue.  For now
the progress bar of Blender is employed to better inform users of the amount of work done in the line
visibility computations.

- A crash was caused by an excessive memory allocation request.  The X and Y dimensions of the grid
data structure are determined based on the average area of mesh faces in the given scene.  When the big
plane in the test scene is excluded from the rendering, the average area is almost zero (on the order
of 1e-5).  As a result of this extremely small average area, the X and Y dimensions were set to a very
large number, causing a fatal memory allocation error.  The present revision has introduced a hard
upper limit to the dimensions of the grid data structure to avoid this kind of numerical instability.

8 years agoCycles:
Thomas Dinges [Sat, 18 May 2013 22:40:21 +0000 (22:40 +0000)]
Cycles:
* Fix OSL compilation for scene_intersect(), when __Hair__ was disabled.

8 years agoOptimizations for dyntopo
Campbell Barton [Sat, 18 May 2013 19:18:55 +0000 (19:18 +0000)]
Optimizations for dyntopo
- creating faces was unnecessarily checking if they already existed.
- deleting a face did edge-lookups, when the edges are already available from the face-loops.

8 years agoFix crash due to shared paint cursor function. It is necessary to check
Antony Riakiotakis [Sat, 18 May 2013 15:51:40 +0000 (15:51 +0000)]
Fix crash due to shared paint cursor function. It is necessary to check
if we really are in sculpt mode context since the active object may be
in sculpt mode while cursor is in the 2d paint editor.

8 years agoFix for #35373, calling any paint operator from operator search menu
Antony Riakiotakis [Sat, 18 May 2013 15:24:25 +0000 (15:24 +0000)]
Fix for #35373, calling any paint operator from operator search menu
with mouse crashes blender.

Issue here is that paint operator invocation, immediately calls modal,
which checks if event is the same as initialization event plus keyup.
Since using the mouse on amenu calls the operator on mouse button up,
the operator ended immediately and that cause immediate cleanup and
crash,

Worked around this by forbidding the operator to finish on first modal
call (which is expected by all the asserts on invoke anyway). This
prevents the crash but requires an extra up event to end.

Also, ported part of Jason Wilkins' patch to stroke code to allow for
stroke sampling to be done before a dab is first performed and as soon
as the stroke begins

8 years agoCycles / OSL:
Thomas Dinges [Sat, 18 May 2013 14:36:03 +0000 (14:36 +0000)]
Cycles / OSL:
* Added Westin Sheen and Westin Backscatter closures for testing, useful for Cloth like effects.

Only available via OSL, added an example OSL shader to the Templates (Text Editor).

8 years agoComment out coordinates mapping made in rev55469
Sergey Sharybin [Sat, 18 May 2013 12:21:01 +0000 (12:21 +0000)]
Comment out coordinates mapping made in rev55469

Such mapping only worked foe compositor output node
(with some issues btw) and failed dramatically for
nodes like previews and viewers.

For now let's behave the same way as border+crop
worked in 2.66 for until proper feature support
is ready (which could take some time).

Fixes #35313: object and ID anti-aliased masks get messed up
              when using border render + crop

8 years agostyle cleanup
Campbell Barton [Sat, 18 May 2013 11:37:49 +0000 (11:37 +0000)]
style cleanup

8 years agoPainting / Sculpting: more tweaks to pressure sensitivity
Brecht Van Lommel [Sat, 18 May 2013 11:25:24 +0000 (11:25 +0000)]
Painting / Sculpting: more tweaks to pressure sensitivity

* Also do pressure interpolation for brush size and spacing.
* Do smoothing of pressure when smooth stroke and sample average is enabled.
* Revert the OS X specific pressure change to pressure ^ 2.5, for low pressure
  values like 0.05 it makes the pressure 100x lower, which is problematic. If
  we need to adjust the pressure curve it should be done for all platforms.

Still weak:

* Pressure of first touch on tablet is difficult to control, usually it's low
  which makes the stroke start out small or soft, but other times not. Finer
  event capturing at ghost level would help, along with pressure changes without
  mouse movement, but this may also need different paint stroke logic.
* Brush radius is rounded to integers, this gives noticeable stepping.
* Brush falloff is not antialiased, gives noticeable aliasing for small brush
  sizes which was always a problem, but is more common with size pressure control.

8 years agoCode cleanup / Cycles:
Thomas Dinges [Sat, 18 May 2013 11:04:29 +0000 (11:04 +0000)]
Code cleanup / Cycles:
* Simplify shaperadius() function a bit to avoid castings.
* Style cleanup 1.f -> 1.0f, to follow rest of Cycles code.

8 years agoFix #35390: sequencer end frame of preview range was not drawing correct.
Brecht Van Lommel [Sat, 18 May 2013 10:24:38 +0000 (10:24 +0000)]
Fix #35390: sequencer end frame of preview range was not drawing correct.

8 years agoFix #35404: crash in file save with python code that accesses mesh from panel.
Brecht Van Lommel [Sat, 18 May 2013 10:24:34 +0000 (10:24 +0000)]
Fix #35404: crash in file save with python code that accesses mesh from panel.

On file save the mesh gets loads from the editmesh but the derived mesh caches
wer not cleared. This usually happens through the depsgraph but it needs to be
done manually here. Most changes are some refactoring to deduplicate derived
mesh freeing code.

8 years agoStroke code:
Antony Riakiotakis [Sat, 18 May 2013 09:44:30 +0000 (09:44 +0000)]
Stroke code:

* Fix crash on 2d painting when no active object is present (NULL
pointer dereference in cursor drawing)
* Skip conditional on space_stroke function, since this is already
checked for on higher level.
* Interpolate pressure on spaced strokes.

8 years agobump to version '2.67a'
Campbell Barton [Sat, 18 May 2013 08:47:34 +0000 (08:47 +0000)]
bump to version '2.67a'

8 years agorigidbody: Add missig notifiers for add/remove operators
Sergej Reich [Fri, 17 May 2013 18:34:13 +0000 (18:34 +0000)]
rigidbody: Add missig notifiers for add/remove operators

Fixes [#35403] Highlight not updating instantly when removing from Rigid body

8 years agoSmoke simulator: Add flow subframes and ability to set custom particle size.
Miika Hamalainen [Fri, 17 May 2013 17:45:37 +0000 (17:45 +0000)]
Smoke simulator: Add flow subframes and ability to set custom particle size.

Previously it was nearly impossible to have fast moving objects emitting smoke or they would just leave behind a row of smoke poofs instead of continious stream of smoke. Now it's possible to set number of subframes for each smoke flow.

Another new thing is ability to set size of smoke flow particles instead of using closest smoke cell. This also works with my earlier "full sample" commit, so no more blocky particles either. :)

For more info check my blog post: http://www.miikahweb.com/en/blog/2013/05/17/blender-smoke-subframes

This commit also includes couple of fixes I spotted while testing:
* Fix: dissolve was applied at different time for low res and high res simulations.
* Fix: full sample setting didn't get copied with domain.

8 years agoMore work on 3d view render:
Ton Roosendaal [Fri, 17 May 2013 16:46:59 +0000 (16:46 +0000)]
More work on 3d view render:

- reverted fix for bug 32537 (error report drawing after thread job didn't show)

  This solves very bad 3d view render updates while using transform, it was
  getting into an eternal feedback loop for dependencies. (jobs sending mousemoves
  causing jobs to end, causing mousemoves, causing etc).

- The render-update code was not going over all windows, but over every screen to
  send signals (also the invisble ones)

8 years agoFix for #35390 fix: sequencer scene start/end still did not display when they are...
Brecht Van Lommel [Fri, 17 May 2013 16:37:47 +0000 (16:37 +0000)]
Fix for #35390 fix: sequencer scene start/end still did not display when they are equal.

8 years agofix for crash with toggle-drag on a popup (when the popup is closed while dragging).
Campbell Barton [Fri, 17 May 2013 13:54:44 +0000 (13:54 +0000)]
fix for crash with toggle-drag on a popup (when the popup is closed while dragging).