7 years agoCorrect assert for RNA IDProps
Campbell Barton [Mon, 7 Apr 2014 09:51:43 +0000 (19:51 +1000)]
Correct assert for RNA IDProps

7 years agoCode cleanup: remove unused functions and convert int -> bool
Campbell Barton [Mon, 7 Apr 2014 07:00:08 +0000 (17:00 +1000)]
Code cleanup: remove unused functions and convert int -> bool

7 years agoCode cleanup: project gpencil in float coords & delete outdated comments
Campbell Barton [Mon, 7 Apr 2014 05:21:01 +0000 (15:21 +1000)]
Code cleanup: project gpencil in float coords & delete outdated comments

7 years agoDyntopo: minor speedups with bmesh use.
Campbell Barton [Mon, 7 Apr 2014 03:48:36 +0000 (13:48 +1000)]
Dyntopo: minor speedups with bmesh use.

7 years agoDyntopo: avoid mask layer lookups while adding/removing verts
Campbell Barton [Mon, 7 Apr 2014 03:05:39 +0000 (13:05 +1000)]
Dyntopo: avoid mask layer lookups while adding/removing verts

7 years agoMempool: use define for used freeword and correct define
Campbell Barton [Mon, 7 Apr 2014 02:52:23 +0000 (12:52 +1000)]
Mempool: use define for used freeword and correct define

7 years agoMempool: minor optimization to building free pointer list
Campbell Barton [Mon, 7 Apr 2014 02:34:13 +0000 (12:34 +1000)]
Mempool: minor optimization to building free pointer list

7 years agoMempool: fix own error in recent commit
Campbell Barton [Mon, 7 Apr 2014 01:45:36 +0000 (11:45 +1000)]
Mempool: fix own error in recent commit

chunks must be added in order for iteration.

7 years agoFix building for Windows.
Antony Riakiotakis [Mon, 7 Apr 2014 01:18:03 +0000 (04:18 +0300)]
Fix building for Windows.

7 years agoBGE: Multi-threading animation updates and skinning.
Mitchell Stokes [Sun, 6 Apr 2014 23:30:59 +0000 (16:30 -0700)]
BGE: Multi-threading animation updates and skinning.

This required BL_ArmatureObject to have tighter control over armatures and poses.
Also, (Blender) armature objects are now copied instead of shared between
BL_ArmatureObjects to avoid race conditions. Also, due to the armature copy,
shape key drivers need a bit of extra fiddling to get the correct armature copy.

Initially OpenMP was used for threading, but then BLI_task was used due to being
less compiler dependent.

This commit also places time spent on skinning updates in the Animation
profiler category (was previously under the Rasterizer category).

7 years agoTodo T36849: support XDG thumbnail management standard
Campbell Barton [Sun, 6 Apr 2014 22:42:08 +0000 (08:42 +1000)]
Todo T36849: support XDG thumbnail management standard

7 years agoblenderplayer - Reviewed some command line options and the respective help
brita [Sun, 6 Apr 2014 21:17:31 +0000 (14:17 -0700)]
blenderplayer - Reviewed some command line options and the respective help

Doubts: are written as comments in the code
Current Problems:
 - stereo modes sometimes have different names and are ordered differently everywhere (blender properties panel names and tooltips, blenderplayer cmndline)
 - dome mode as several options, but can only take one at a time, like -D mode bla -D tilt X -D ...
 - gameoptions are also given one at a time, like above, but with an assignment -g option = X  . This is inconsistent.
 - gameoptions need to be reviewed and docummented
 - parent to window (-i) is useful for what? (there is no wiki on this either)
 - there is no support for verbose options like --help (blender itself supports it)

Reviewers: dfelinto, moguri


Differential Revision:

7 years agoBetter code for (bone axis + roll) to mat
Bastien Montagne [Sun, 6 Apr 2014 17:15:17 +0000 (19:15 +0200)]
Better code for (bone axis + roll) to mat

See T39470 and D436. Code by @tippisum, with some minor edits by @mont29.

Tested with various rigs, including Rigify, CGcookie flex rig, and gooseberry/pataz caterpillar.

Riggers, please test it, no change expected in behaviour.

Reviewers: aligorith

CC: tippisum
Differential Revision:

7 years tweaks to support new LLVM-3.4.
Bastien Montagne [Sun, 6 Apr 2014 15:50:50 +0000 (17:50 +0200)] tweaks to support new LLVM-3.4.

Issue is, looks like Debian testing's graphic backend now uses LLVM-3.4,
which conflicts with 3.3 in Blender and makes it crash.

So add support to handle 3.4, by both allowing to force a specific version for some libs,
and switching back to head of official repo for OSL.

7 years agoFix T39479: Transform mouse constraint fails in some situations.
Bastien Montagne [Sun, 6 Apr 2014 09:11:56 +0000 (11:11 +0200)]
Fix T39479: Transform mouse constraint fails in some situations.

Some more float precision issue...

7 years agoMove LIKELY/UNLIKELY into header
Campbell Barton [Sun, 6 Apr 2014 07:25:50 +0000 (17:25 +1000)]
Move LIKELY/UNLIKELY into header

7 years agoGuarded Alloc: use UNLIKELY for debug memset
Campbell Barton [Sun, 6 Apr 2014 02:57:20 +0000 (12:57 +1000)]
Guarded Alloc: use UNLIKELY for debug memset

7 years agoFix error when enabling Mist pass but there was no world. Can't find mist settings...
Pablo Vazquez [Sat, 5 Apr 2014 20:52:06 +0000 (17:52 -0300)]
Fix error when enabling Mist pass but there was no world. Can't find mist settings, so check for World first.

7 years agoFix issue for OPENCL problem on Macosx 10.9.2
Monique Dewanchand [Sat, 5 Apr 2014 19:33:44 +0000 (21:33 +0200)]
Fix issue for OPENCL problem on Macosx 10.9.2

7 years agoFix sculpt brushes stuck to drag dot or anchored mode
Antony Riakiotakis [Sat, 5 Apr 2014 17:30:47 +0000 (20:30 +0300)]
Fix sculpt brushes stuck to drag dot or anchored mode

Was own mistake after RNA enu refactoring.

7 years agoRNA: optimization to avoid malloc for iterators.
Brecht Van Lommel [Sat, 5 Apr 2014 12:36:18 +0000 (14:36 +0200)]
RNA: optimization to avoid malloc for iterators.

This mostly helps making Cycles scene synchronization a bit faster.

7 years agoFix for auto detect homogeneous volume with OSL, forgot to include this file in last...
Brecht Van Lommel [Fri, 4 Apr 2014 11:20:46 +0000 (13:20 +0200)]
Fix for auto detect homogeneous volume with OSL, forgot to include this file in last commit.

7 years agoMath Lib: add power of 2 min/max for unsigned ints
Campbell Barton [Sat, 5 Apr 2014 10:39:46 +0000 (21:39 +1100)]
Math Lib: add power of 2 min/max for unsigned ints

7 years agoFix T39606, SSS and Volume nodes were showing warning, even if CPU was used.
Thomas Dinges [Sat, 5 Apr 2014 10:49:04 +0000 (12:49 +0200)]
Fix T39606, SSS and Volume nodes were showing warning, even if CPU was used.

7 years agoCycles UI: Refactor cpu checks into a use_cpu() function.
Thomas Dinges [Sat, 5 Apr 2014 10:31:59 +0000 (12:31 +0200)]
Cycles UI: Refactor cpu checks into a use_cpu() function.

7 years agoDyntopo: minor optimizations for edge queue
Campbell Barton [Sat, 5 Apr 2014 05:30:55 +0000 (16:30 +1100)]
Dyntopo: minor optimizations for edge queue

7 years agoRemove redundant call to CustomData_get_offset
Campbell Barton [Sat, 5 Apr 2014 01:32:25 +0000 (12:32 +1100)]
Remove redundant call to CustomData_get_offset

7 years agoOptimize mempool: round chunk size to powers of 2, account for slop-space
Campbell Barton [Sat, 5 Apr 2014 01:09:36 +0000 (12:09 +1100)]
Optimize mempool: round chunk size to powers of 2, account for slop-space

This helps to reduce memory fragmentation.

7 years agoMempool: remove BLI_MEMPOOL_SYSMALLOC, MEM_* allocs are more efficient now
Campbell Barton [Fri, 4 Apr 2014 23:57:32 +0000 (10:57 +1100)]
Mempool: remove BLI_MEMPOOL_SYSMALLOC, MEM_* allocs are more efficient now

7 years agoSolve issue with dyntopo collapse.
Antony Riakiotakis [Fri, 4 Apr 2014 23:31:10 +0000 (02:31 +0300)]
Solve issue with dyntopo collapse.

It was possible to delete a masked vertex during collapsing. Looks like
this is one of the causes for hangs during masked flood filling.

7 years agoOptimize mempool: replace double linked list with single for memory chunks
Campbell Barton [Fri, 4 Apr 2014 22:48:14 +0000 (09:48 +1100)]
Optimize mempool: replace double linked list with single for memory chunks

7 years agoGreat, now Debian Jessie as well can cause libyaml-cpp version mismatch... Update...
Bastien Montagne [Fri, 4 Apr 2014 20:45:23 +0000 (22:45 +0200)]
Great, now Debian Jessie as well can cause libyaml-cpp version mismatch... Update warning message!

7 years agoSome stupid systems give limited powers to sudo... So add a --no-sudo option disablin...
Bastien Montagne [Fri, 4 Apr 2014 20:36:28 +0000 (22:36 +0200)]
Some stupid systems give limited powers to sudo... So add a --no-sudo option disabling usage of sudo!

Note in this case, script becomes more or less useless, just spit out names of packages to install...

Requested by Dalai Felinto over IRC.

7 years agoMissing file in commit 12302011d6207a60b24d0cae71a88df0384bc5da.
Tamito Kajiyama [Fri, 4 Apr 2014 08:01:48 +0000 (17:01 +0900)]
Missing file in commit 12302011d6207a60b24d0cae71a88df0384bc5da.

7 years agoFreestyle: Removed SVertex _curvatureFredo and _directionFredo and their getter/sette...
Tamito Kajiyama [Fri, 4 Apr 2014 08:01:10 +0000 (17:01 +0900)]
Freestyle: Removed SVertex _curvatureFredo and _directionFredo and their getter/setter methods..

These data elements are undocumented and of little use.  For now they are commented out
in the implementation in favor of less memory consumption, and a very limited support for
these data components in the Python API was just removed (should be easy to recover).

7 years agoFreestyle: Fix for class definitions of 0D/1D functions (functors).
Tamito Kajiyama [Fri, 4 Apr 2014 07:34:49 +0000 (16:34 +0900)]
Freestyle: Fix for class definitions of 0D/1D functions (functors).

Symbol 'real' is an alias of double and is subject to future change, while the interface of
0D/1D functions is part of the stable Freestyle Python API.  So all occurrences of this type
in the class definitions were replaced with double.

7 years agoFix for typos in array size
Sergey Sharybin [Fri, 4 Apr 2014 12:03:17 +0000 (18:03 +0600)]
Fix for typos in array size

7 years agoFix for mask slide operators didn't work with LMB selection
Sergey Sharybin [Fri, 4 Apr 2014 11:23:45 +0000 (17:23 +0600)]
Fix for mask slide operators didn't work with LMB selection

7 years agoMask spline slide didn't respect auto-key
Sergey Sharybin [Fri, 4 Apr 2014 11:19:36 +0000 (17:19 +0600)]
Mask spline slide didn't respect auto-key

7 years agoMask spline slide: holding Ctrl will make handles free
Sergey Sharybin [Fri, 4 Apr 2014 11:08:09 +0000 (17:08 +0600)]
Mask spline slide: holding Ctrl will make handles free

7 years agoScons/cycles: fix header distribution for geom
Jens Verwiebe [Fri, 4 Apr 2014 11:07:23 +0000 (13:07 +0200)]
Scons/cycles: fix header distribution for geom

7 years agoFollowup to the previous commit: forgot to tweak handle type
Sergey Sharybin [Fri, 4 Apr 2014 10:49:50 +0000 (16:49 +0600)]
Followup to the previous commit: forgot to tweak handle type

7 years agoMask spline segment slide improvement
Sergey Sharybin [Fri, 4 Apr 2014 10:43:20 +0000 (16:43 +0600)]
Mask spline segment slide improvement

This implements weighted slide of second handle, just the
same exact way as it works in Gimp.

7 years agoOptimization for mempool initial chunk allocation
Campbell Barton [Fri, 4 Apr 2014 10:20:17 +0000 (21:20 +1100)]
Optimization for mempool initial chunk allocation

Almost all pools allocated 2 chunks on initialization,
every element needed to be added to the free-list which
would never be used for small pools.

Now allocate only one, gives minor speedup for some bmesh operations.

7 years agoMask point slide: clean-up of SlidePointData structure
Sergey Sharybin [Fri, 4 Apr 2014 09:11:39 +0000 (15:11 +0600)]
Mask point slide: clean-up of SlidePointData structure

7 years agoMaks point slide: get rid of jump when you press shift
Sergey Sharybin [Fri, 4 Apr 2014 09:03:14 +0000 (15:03 +0600)]
Maks point slide: get rid of jump when you press shift

7 years agoMask point slide: remove commented out code
Sergey Sharybin [Fri, 4 Apr 2014 08:36:41 +0000 (14:36 +0600)]
Mask point slide: remove commented out code

The code wasn't needed for quite a while already, so
let's get rid of it.

7 years agoMask curvature slide: reduce jumps on slide
Sergey Sharybin [Fri, 4 Apr 2014 08:34:11 +0000 (14:34 +0600)]
Mask curvature slide: reduce jumps on slide

Also correct wrong logic around tweaking handles type.

7 years agoFix crash happening in DAG_pose_sort() due to threading issues
Sergey Sharybin [Fri, 4 Apr 2014 06:42:35 +0000 (12:42 +0600)]
Fix crash happening in DAG_pose_sort() due to threading issues

This function used ugly hack with static variable which was
preventing some type checks in DAG nodes. Using this variable
form multiple threads is not considered safe, apparently.

Solved by moving this variable inside the DAGForest structure.
so it's global for the graph now, but different graphs does not
run into conflicts.

This required passing the forest to some functions, which doesn't
look so much nice, but don't want to spend time on making this
code look beautiful because it is really to be replaced by the
new dependency graph.

This is really bad bug actually which is must go to 'a'.

7 years agoCode cleanup: no need to use calloc when memory is initialized after
Campbell Barton [Fri, 4 Apr 2014 03:26:01 +0000 (14:26 +1100)]
Code cleanup: no need to use calloc when memory is initialized after

also replace AT with __func__ since AT expands the full pathname

7 years agoCloth: replace EdgeHash with EdgeSet
Campbell Barton [Fri, 4 Apr 2014 03:15:57 +0000 (14:15 +1100)]
Cloth: replace EdgeHash with EdgeSet

7 years agoClicking outside menus wasn't closing when opened from non menu popups
Campbell Barton [Thu, 3 Apr 2014 20:32:31 +0000 (07:32 +1100)]
Clicking outside menus wasn't closing when opened from non menu popups

7 years agoCycles: Disable Branched Path on all GPUs for now, until we separate the cubins.
Thomas Dinges [Thu, 3 Apr 2014 20:18:11 +0000 (22:18 +0200)]
Cycles: Disable Branched Path on all GPUs for now, until we separate the cubins.

SM_20 fails now as well, reported by Zanqdo in IRC.

7 years agoCycles volume: detect homogeneous volume automatically in common cases.
Brecht Van Lommel [Thu, 3 Apr 2014 20:04:39 +0000 (22:04 +0200)]
Cycles volume: detect homogeneous volume automatically in common cases.

In practice this means that if you don't connect a texture to your volume nodes
it will figure that out and render the node faster, rather than you having to
specify it manually.

Main weakness is custom OSL nodes where we have to assume it is heterogeneous
because we don't know what kind of data the node accesses.

7 years agoCycles: SSE optimization for Voronoi cells texture
Sv. Lockal [Thu, 3 Apr 2014 19:34:53 +0000 (23:34 +0400)]
Cycles: SSE optimization for Voronoi cells texture

Gives 5-6% speedup for Caterpillar_PatazStudio.blend.

Reviewed By: brecht, dingto

Differential Revision:

7 years agoI18N: add missing lines
Sv. Lockal [Thu, 3 Apr 2014 18:49:27 +0000 (22:49 +0400)]
I18N: add missing lines

Reviewed By: mont29

Differential Revision:

7 years agoCycles: avoid 1.0f/(1.0f/x) divisions, which msvc (only) can't optimize.
Sv. Lockal [Thu, 3 Apr 2014 18:08:53 +0000 (22:08 +0400)]
Cycles: avoid 1.0f/(1.0f/x) divisions, which msvc (only) can't optimize.

This makes bmw scene in msvc 12 builds 6% faster.
It also gives a minor speedup for SSE hair in all compilers.

7 years agoFix T39577: cycles issue mixing anisotropic BSDFs with branched path tracer.
Brecht Van Lommel [Thu, 3 Apr 2014 13:51:43 +0000 (15:51 +0200)]
Fix T39577: cycles issue mixing anisotropic BSDFs with branched path tracer.

7 years agoSlide mask spline segment to define it's curvature
Sergey Sharybin [Thu, 3 Apr 2014 12:15:04 +0000 (18:15 +0600)]
Slide mask spline segment to define it's curvature

This actually implements the idea used in Gimp which is grabbing
an arbitrary point on the spline and dragging it, ensuring spline
goes over this point. This is really useful way to tweak spline

Currently only affects on a closest handle, meaning no weighting
on changes for both handles which are adjacent to the same segment
will happen just yet,

Another limitation is that currently such a slide is a big jumpy
when you start sliding. This is because projection is not used
to calculate u value because projection used to fail a lot for
me here and didn't find a nice solution for this yet. But this is
to be improved for sure!

7 years agoFix T37509: regression in smart-uv island orientation
Campbell Barton [Thu, 3 Apr 2014 11:03:53 +0000 (22:03 +1100)]
Fix T37509: regression in smart-uv island orientation

7 years agoOptimize BLI_convexhull_aabb_fit_hull_2d, avoid atan2, sin, cos
Campbell Barton [Thu, 3 Apr 2014 10:47:03 +0000 (21:47 +1100)]
Optimize BLI_convexhull_aabb_fit_hull_2d, avoid atan2, sin, cos

add utility functions for using a 2d unit vector as a rotation matrix
mul_v2_v2_cw & mul_v2_v2_ccw

7 years agoFix for T39537 wasn't complete, buttons in popups remained unset.
Campbell Barton [Thu, 3 Apr 2014 09:49:40 +0000 (20:49 +1100)]
Fix for T39537 wasn't complete, buttons in popups remained unset.

7 years agoFix T39567: simple deform modifier error
Campbell Barton [Thu, 3 Apr 2014 07:57:37 +0000 (18:57 +1100)]
Fix T39567: simple deform modifier error

7 years agoFix build for BSD (broken by own 35747ee3d547).
Bastien Montagne [Thu, 3 Apr 2014 07:20:04 +0000 (09:20 +0200)]
Fix build for BSD (broken by own 35747ee3d547).

Reported by Shane Ambler, thanks!

7 years agoFix T39245: Crash when dynamic topology is enabled
Campbell Barton [Thu, 3 Apr 2014 06:12:06 +0000 (17:12 +1100)]
Fix T39245: Crash when dynamic topology is enabled

Redundant decrement was crashing for systems which didnt optimize it out.

7 years agoCode cleanup: strict flags for bmesh_log
Campbell Barton [Thu, 3 Apr 2014 04:50:18 +0000 (15:50 +1100)]
Code cleanup: strict flags for bmesh_log

7 years agoFreestyle: Fix for debug information about sweep line intersection detection.
Tamito Kajiyama [Thu, 3 Apr 2014 05:58:14 +0000 (14:58 +0900)]
Freestyle: Fix for debug information about sweep line intersection detection.

Vertices of two edges were swapped by mistake.  Also fixed indentation and added
a couple of debug prints to make it easier to visualize the lines using Matlab.

7 years agoForgotten to add this on last commit. This would cause dyntopo to always
Antony Riakiotakis [Thu, 3 Apr 2014 01:03:46 +0000 (04:03 +0300)]
Forgotten to add this on last commit. This would cause dyntopo to always
refresh all its nodes if show diffuse was on.

7 years agoAdd load_ui to WM_OT_read_homefile
Campbell Barton [Thu, 3 Apr 2014 00:29:45 +0000 (11:29 +1100)]
Add load_ui to WM_OT_read_homefile

Useful for implementing templates.

Patch D423 by Gaia Clary

7 years agoWM: expose file loading operator property init functions
Campbell Barton [Thu, 3 Apr 2014 00:04:02 +0000 (11:04 +1100)]
WM: expose file loading operator property init functions

7 years agoCode cleanup: use BKE_BIT_TEST_SET to set flags
Campbell Barton [Wed, 2 Apr 2014 23:45:08 +0000 (10:45 +1100)]
Code cleanup: use BKE_BIT_TEST_SET to set flags

7 years agoCode cleanup: style
Campbell Barton [Wed, 2 Apr 2014 22:24:09 +0000 (09:24 +1100)]
Code cleanup: style

7 years agoFix T39517,
Antony Riakiotakis [Wed, 2 Apr 2014 14:33:47 +0000 (17:33 +0300)]
Fix T39517,

Issue here is that "show diffuse" option does not respect its intended
purpose which is to be used only for masking.

There are a couple of caveats here:

Dyntopo and multires -always- have mask data enabled, and thus as soon
as one goes to dyntopo mode or adds a multires modifier he would get the
default grey color instead.

Matcaps would break when nodes asked for a diffuse material color (this
was broken before too). Solved by adding global material state for when
matcaps are enabled. Also matcaps don't always played well with VBOs

Added a few more missing updates for mask operators to notify
show_diffuse property as changed. This was also needed on rebuilding
dyntopo pbvh.

Also make zero mask color duller again after artist feedback.

7 years agoFix T39525: cycles volume render difference between branched/non-branched path.
Brecht Van Lommel [Wed, 2 Apr 2014 13:41:45 +0000 (15:41 +0200)]
Fix T39525: cycles volume render difference between branched/non-branched path.

7 years agoFix T39523: cycles cache BVH not working correct with deformation motion blur.
Brecht Van Lommel [Wed, 2 Apr 2014 15:06:23 +0000 (17:06 +0200)]
Fix T39523: cycles cache BVH not working correct with deformation motion blur.

7 years agoFix T39520, show diffuse not working in dyntopo.
Antony Riakiotakis [Wed, 2 Apr 2014 15:56:19 +0000 (18:56 +0300)]
Fix T39520, show diffuse not working in dyntopo.

Was marked as a todo in the code.

This does not yet take care of correct display for multi material
meshes, since it would need correct separation of faces during pbvh
creation. Instead we just take material of first face in node and assume
that the rest faces have the same. This will create some funky effects
if one attempts to sculpt in this way.

Note: This does not yet address T39517

7 years agoUndoing masks in dyntopo leaked memory
Antony Riakiotakis [Wed, 2 Apr 2014 15:25:03 +0000 (18:25 +0300)]
Undoing masks in dyntopo leaked memory

7 years agoRefactor to recent matcap built-ins to not use the built in system.
Antony Riakiotakis [Wed, 2 Apr 2014 12:07:45 +0000 (15:07 +0300)]
Refactor to recent matcap built-ins to not use the built in system.
Those variables would get declared on fragment shader level and since we
use reserved opengl variables, some compilers would throw an error
(NVIDIA allows, some ATI compilers may break). Instead, use a separate
opengl built-in category especially for them. This works on NVIDIA, and
will wait for tests of this commit from ATI users.

7 years agoImplement fame sliding from IE's cache line
Sergey Sharybin [Wed, 2 Apr 2014 11:58:34 +0000 (17:58 +0600)]
Implement fame sliding from IE's cache line

7 years agoUI: Tweak last commit for UIList and image scopes' grip size.
Bastien Montagne [Wed, 2 Apr 2014 11:22:12 +0000 (13:22 +0200)]
UI: Tweak last commit for UIList and image scopes' grip size.

Sorry, forgot the --hold arg to last arc land, wanted to check this before pushing... :/

7 years agoReplace resize code of image scopes by use of new GRIP button.
Bastien Montagne [Wed, 2 Apr 2014 11:09:43 +0000 (13:09 +0200)]
Replace resize code of image scopes by use of new GRIP button.

This deduplicates/simplifies some code. Also cleanup up a bit scopes UI code!

Use new GRIP button for uiList grab-resize.

This allows us to greatly simplifies the code, and get rid of a few hacks in uiList event handling!

Note autosize mode of uiList is now trigered by any value of list_grip below a given threshold, rather than the fixed zero value...

Reviewers: brecht

Reviewed By: brecht

Differential Revision:

7 years agoAdd drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).
Bastien Montagne [Wed, 2 Apr 2014 10:59:48 +0000 (12:59 +0200)]
Add drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).

This is done by adding a new button type, GRIP, similar to other numbuttons
(scroll, slider, ...), which here controls the preview height.

Then, we add a new DNA struct to be able to save that height in Blend files
(note I choose not to use Panel struct for this, because we would then have the
same limitation we used to have with uiLists, only one preview per panel
and no preview outside panel).

This implies a change to template_preview UI RNA/py API (each preview needs an ID),
but this is backward compatible, as by default datablock type will be used if no ID is
given (which means e.g. all material previews with no ID will have same height).

Reviewers: brecht

Reviewed By: brecht

Differential Revision:

7 years agoimplement cache line for image editor
Sergey Sharybin [Wed, 2 Apr 2014 10:50:06 +0000 (16:50 +0600)]
implement cache line for image editor

It works exactly the same as a cache line in movie clip editor.

7 years agoFix T39521: Render with two Blender processes on same computer: compression issues?
Bastien Montagne [Wed, 2 Apr 2014 09:57:10 +0000 (11:57 +0200)]
Fix T39521: Render with two Blender processes on same computer: compression issues?

We need to salt temp exr filenames with pid, else several instances of Blender rendering
the same scene on same machine and using "Save Buffers" option would use the same files!

7 years agoRename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.
Bastien Montagne [Wed, 2 Apr 2014 09:43:54 +0000 (11:43 +0200)]
Rename "BLI_cpu.h" to "BLI_system.h" and add to it BLI_getpid() helper.

There is not much sense to have a whole BLI file just to check SSE2 on CPUs...
So idea is to rename it to more generic "BLI_system", and add to it more system-related
utils, like e.g. an include helper for getpid(), which allows to hide unix/windows
internals from rest of the code...

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision:

7 years agoCycles: add dedicated UV Map node, easier to find and has convenient auto complete.
Kevin Dietrich [Wed, 2 Apr 2014 09:40:29 +0000 (11:40 +0200)]
Cycles: add dedicated UV Map node, easier to find and has convenient auto complete.

Fixes T37954.

Reviewed By: brecht, dingto

Differential Revision:

7 years agoFix T39547: Toggling render passes on active scene does not update
Lukas Tönne [Wed, 2 Apr 2014 08:59:35 +0000 (10:59 +0200)]
Fix T39547: Toggling render passes on active scene does not update
render layer nodes in a pinned tree from different scene.

The way these updates work is a nasty legacy hack:$277

This function is called //very frequently// by the get_from_context
method. However, this does not get called for pinned node trees, so
when showing a different scene's compositing nodes in the editor they
may not get updated correctly.

Now moved this update call out of get_from_context so it happens in any
case. Will be called no more frequently than before (on every redraw).
Eventually the depsgraph should handle this more precisely, it's just a
simple ID dependency anyway ...

7 years agoFix T39545: "Track selected markers", does not stop at end of video
Sergey Sharybin [Wed, 2 Apr 2014 08:07:44 +0000 (14:07 +0600)]
Fix T39545: "Track selected markers", does not stop at end of video

Issue was cauzed by some weird clamping of current frame. Not sure
why it was here at the first point -- it's from the day0 of movie
clip datablock.

7 years agoUI: support for dragging popups title area
Campbell Barton [Wed, 2 Apr 2014 07:42:08 +0000 (18:42 +1100)]
UI: support for dragging popups title area

7 years agoCode cleanup: avoid redundant lookups for subwindows
Campbell Barton [Wed, 2 Apr 2014 06:33:20 +0000 (17:33 +1100)]
Code cleanup: avoid redundant lookups for subwindows

7 years agoFix for BLI_rng_shuffle_array noted by mont29
Campbell Barton [Tue, 1 Apr 2014 23:09:48 +0000 (10:09 +1100)]
Fix for BLI_rng_shuffle_array noted by mont29

7 years agoCode cleanup: use uint64_t for BLI_rand
Campbell Barton [Tue, 1 Apr 2014 22:57:48 +0000 (09:57 +1100)]
Code cleanup: use uint64_t for BLI_rand

7 years agoDyntopo: Delete OpenGL buffers of nodes that do not have any more
Antony Riakiotakis [Tue, 1 Apr 2014 22:40:05 +0000 (01:40 +0300)]
Dyntopo: Delete OpenGL buffers of nodes that do not have any more

It is possible to end up with such nodes using brushes in aggressive
collapse mode. Those nodes should normally be cleaned up, since they can
never be actually reused (adding more geometry to a node requires the
node having some geometry to begin with) but until we support dynamic
nodes, better delete those to avoid binding graphics driver resources.

If such zero elements buffers were used, GL error out of memory would be

7 years agoFix for building with MSVC2008
Campbell Barton [Tue, 1 Apr 2014 22:16:47 +0000 (09:16 +1100)]
Fix for building with MSVC2008

7 years agoFix linking on Mac OS X
Campbell Barton [Tue, 1 Apr 2014 22:01:48 +0000 (09:01 +1100)]
Fix linking on Mac OS X

D345 from Aleksandr Derbenev

7 years agoFix some redrawing and possibly other issues in dyntopo:
Antony Riakiotakis [Tue, 1 Apr 2014 21:55:19 +0000 (00:55 +0300)]
Fix some redrawing and possibly other issues in dyntopo:

When node face gets deleted, added or exchanged, the nodes should update
their draw buffers, normals and bounding boxes. This was not being done
before so there were graphical glitches apparent, especially in collapse

7 years agoSculpt: the thread controls where unintentianlly greyed out along with capabilities...
Jens Verwiebe [Tue, 1 Apr 2014 20:52:10 +0000 (22:52 +0200)]
Sculpt: the thread controls where unintentianlly greyed out along with capabilities.has_gravity condition

7 years agoFix T39550: has bad default
Campbell Barton [Tue, 1 Apr 2014 19:40:39 +0000 (06:40 +1100)]
Fix T39550: has bad default

7 years agoRevert 7955cb78d it causes GPU_pbvh_buffers_diffuse_changed to always
Antony Riakiotakis [Tue, 1 Apr 2014 17:17:23 +0000 (20:17 +0300)]
Revert 7955cb78d it causes GPU_pbvh_buffers_diffuse_changed to always
return false, causing update of all pbvh nodes all the time.

7 years agoMake matcaps suck less
Antony Riakiotakis [Sat, 29 Mar 2014 09:40:26 +0000 (11:40 +0200)]
Make matcaps suck less

This commit does various changes for matcaps:

One is taking advantage of drawing with pbvh (which would only happen
with dyntopo previously) and drawing with partial redraw during

The second one is support for masks. To make this work in the special
case of multires, which uses flat shading, I use the only available flat
shaded builtins in OpenGL 2.0 which are color and secondary color.

Abusing colors in that way is also essential for flat shading to work if
we are to use pbvh draw in multires, since it is the color that is being
interpolated flatly, not the normal (which can only interpolated
smoothly). The pbvh drawing code for multires used last triangle
element's normal to compute the shading which would only produce smooth
results. This could change if we did the shading in the vertex shader
for flat shaded primitives, but this is more complex and makes it harder
to have one shader to rule the mole.

Also increased the brightness of the default diffuse color for
sculpting. This should be useful since artists like to tweak the
lighting settings and it will give them the full dynamic range of the
lights, but also it helps with correct brightness of sculpted matcaps.

Reviewers: brecht

Differential Revision: