blender.git
8 years agoMerging r57934 through r57953 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Wed, 3 Jul 2013 08:31:46 +0000 (08:31 +0000)]
Merging r57934 through r57953 from trunk into soc-2013-depsgraph_mt

8 years agoupdate doxygen congfig and tweaks to warnings when running doxygen.
Campbell Barton [Wed, 3 Jul 2013 04:47:50 +0000 (04:47 +0000)]
update doxygen congfig and tweaks to warnings when running doxygen.

8 years agoreduce imports on startup
Campbell Barton [Wed, 3 Jul 2013 01:20:32 +0000 (01:20 +0000)]
reduce imports on startup

8 years agofix for own error in 57226, broke subsurf-uv
Campbell Barton [Tue, 2 Jul 2013 21:47:42 +0000 (21:47 +0000)]
fix for own error in 57226, broke subsurf-uv

8 years agoFix cycles world ray visibility not working correct with multiple importance
Brecht Van Lommel [Tue, 2 Jul 2013 21:03:16 +0000 (21:03 +0000)]
Fix cycles world ray visibility not working correct with multiple importance
sampling.

8 years agostyle cleanup
Campbell Barton [Tue, 2 Jul 2013 20:36:52 +0000 (20:36 +0000)]
style cleanup

8 years agoFix for dupli-groups update going wrong
Sergey Sharybin [Tue, 2 Jul 2013 19:23:23 +0000 (19:23 +0000)]
Fix for dupli-groups update going wrong

Dupli-groups used to have special case for updating
which is BKE_group_handle_recalc_and_update. This
function calls BKE_object_handle_update for every
object in the group.

This isn't thread-safe, because object could be
updating in separate thread already. And what's
worse dependencies are not known for objects inside
the group, which makes it impossible to schedule
objects from the group in a safe way.

It's even impossible to schedule groups as different
tasks, because groups could share the same objects.

For now used simple but robust solution which is
updating dupli-groups in main thread, handling
groups one-by-one and updating objects from the
group one-by-one as well.

Will work on a proper solution for this later.

8 years agoMove bevel list and path from Curve to Object datablock
Sergey Sharybin [Tue, 2 Jul 2013 19:23:19 +0000 (19:23 +0000)]
Move bevel list and path from Curve to Object datablock

I know this is not so much nice to have this guys hanging
around in a general Object datablock and ideally they better
be wrapped around into a structure like DerivedMesh or
something like this. But this is pure runtime only stuff and
we could re-wrap them around later.

Main purpose of this is making curves more thread safe,
so no separate threads will ever start freeing the same path
or the same bevel list.

It also makes sense because path and bevel shall include
deformation coming from modifiers which are applying on
pre-tesselation point and different objects could have
different set of modifiers. This used to be really confusing
in the past and now dtaa which depends on object is stored
in an object, making things clear for understanding even.

This doesn't make curve code fully thread-safe due to
pre-tesselation modifiers still modifies actual nurbs and
lock is still needed in makeDispListsCurveTypes, but this
change makes usage of paths safe for threading.

Once modifiers will stop modifying actual nurbs, curves
will be fully safe for threading.

8 years agoFix issue when the same task gets added twice to the queue
Sergey Sharybin [Tue, 2 Jul 2013 19:23:12 +0000 (19:23 +0000)]
Fix issue when the same task gets added twice to the queue

Issue was caused by worker threads updating nodes valency
at the same time while we're filling the queue with "root"
nodes (leaf nodes which don't depend on others).

8 years agoAdded missing mutex lock around do_exit assignment in task scheduler
Sergey Sharybin [Tue, 2 Jul 2013 19:23:09 +0000 (19:23 +0000)]
Added missing mutex lock around do_exit assignment in task scheduler

Without this lock it's possible that thread_wait_pop will stuck
at the point where it await for new task in the queue but in
fact exit was requested already.

This ended up in deadlock in some circumstances. Really random
because it totally depends on timings.

8 years agoInitial idea of running post-modifiers out of lock wasn't correct
Sergey Sharybin [Tue, 2 Jul 2013 19:23:06 +0000 (19:23 +0000)]
Initial idea of running post-modifiers out of lock wasn't correct

The tihng here is: curve is getting modified by modifier stack
and then it's coordinates are restored. To be really safe we
need to do all this locked.

8 years agoAdd workaroud to make threaded object update stable
Sergey Sharybin [Tue, 2 Jul 2013 19:23:03 +0000 (19:23 +0000)]
Add workaroud to make threaded object update stable

Added threading lock around unsafe part of do_makeDispListCurveTypes
(parts which touches Curve->bev and Curve->path). Namely it means
pre-tesselation modifiers, bevel, path and non-modified display
list will be calculated inside a locked thread.

Post-tessellation modifiers will eb calculated outside of locked
thread, which means heavy constructive or deformation modifiers
applying on tesselated spline will be nicely threaded.

This makes it possible to use threaded object update by default
in the branch, so everyone could start testing it.

8 years agoGet rid of a display list stored in Curve datablock
Sergey Sharybin [Tue, 2 Jul 2013 19:22:59 +0000 (19:22 +0000)]
Get rid of a display list stored in Curve datablock

This display list was only used for texture space calculation,
and even there this display list was only used for bounding
box calulation.

Since we alreayd do have boundgind box in a curve datablock
there's no reason to duplicate non-modified display list
just to calculate bounding box later, let's just calculate
boundding box at the first point.

This makes code a little be more thread-safe but curves are
still not safe for threads at all because of bevel list and
path. That would be solved later.

8 years agoAlways use ob->bb when drawing the curve types
Sergey Sharybin [Tue, 2 Jul 2013 19:22:55 +0000 (19:22 +0000)]
Always use ob->bb when drawing the curve types

It used to be a check for ob->bb ? ob->bb : cu->bb but
in fact it doesn't make sense and only makes code more
crappy.

Making displist for mballs and curves/surfaces/fonts
already ensures object has walid bounding box.

8 years agoReplace mutex lock with spinlock in threaded object update
Sergey Sharybin [Tue, 2 Jul 2013 19:22:52 +0000 (19:22 +0000)]
Replace mutex lock with spinlock in threaded object update

It's not so much happening inside the lock and using spin
lock instead of mutex lock will give some speedup due to
smaller latency of resuming the thread when mutex was locked.

8 years agoSimplify debug print macro in WM even system
Sergey Sharybin [Tue, 2 Jul 2013 19:22:49 +0000 (19:22 +0000)]
Simplify debug print macro in WM even system

8 years agoPut debug prints in threaded debug into G.debug & G_DEBUG check.
Sergey Sharybin [Tue, 2 Jul 2013 19:22:46 +0000 (19:22 +0000)]
Put debug prints in threaded debug into G.debug & G_DEBUG check.

8 years agoMerging r57925 through r57933 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Tue, 2 Jul 2013 19:18:10 +0000 (19:18 +0000)]
Merging r57925 through r57933 from trunk into soc-2013-depsgraph_mt

8 years agoFix #35966: remesh modifier + particle use modifier stack option did not work
Brecht Van Lommel [Tue, 2 Jul 2013 19:17:34 +0000 (19:17 +0000)]
Fix #35966: remesh modifier + particle use modifier stack option did not work
well together.

8 years agoFix #35964: viewport render not updating with linking materials with ctrl+L.
Brecht Van Lommel [Tue, 2 Jul 2013 17:21:40 +0000 (17:21 +0000)]
Fix #35964: viewport render not updating with linking materials with ctrl+L.

8 years agoFix #35958: texture timeout with value 0 not preserved when saving user preferences.
Brecht Van Lommel [Tue, 2 Jul 2013 16:02:56 +0000 (16:02 +0000)]
Fix #35958: texture timeout with value 0 not preserved when saving user preferences.

8 years agoFix #35944: adding keyframes or drivers on image sequences offset did not work
Brecht Van Lommel [Tue, 2 Jul 2013 15:56:32 +0000 (15:56 +0000)]
Fix #35944: adding keyframes or drivers on image sequences offset did not work
for cycles image texture node.

8 years agoFix Bevel bug #34321, making bevel keep UVs contiguous when possible.
Howard Trickey [Tue, 2 Jul 2013 13:18:56 +0000 (13:18 +0000)]
Fix Bevel bug #34321, making bevel keep UVs contiguous when possible.

8 years agoFix #35954: missing cycles viewport render update when changing the object
Brecht Van Lommel [Tue, 2 Jul 2013 12:52:37 +0000 (12:52 +0000)]
Fix #35954: missing cycles viewport render update when changing the object
or material pass index.

8 years agoremove nan copyrights from code added since blender become opensource (copy paste...
Campbell Barton [Tue, 2 Jul 2013 10:14:59 +0000 (10:14 +0000)]
remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h

8 years agoadd missing gpl headers
Campbell Barton [Tue, 2 Jul 2013 09:47:22 +0000 (09:47 +0000)]
add missing gpl headers

8 years agofix for error reading defaults from custom properties, would read out of bounds memory.
Campbell Barton [Tue, 2 Jul 2013 08:06:45 +0000 (08:06 +0000)]
fix for error reading defaults from custom properties, would read out of bounds memory.
recent change to animsys r57904 exposed this error in some sintel files.

8 years agoMerging r57897 through r57924 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Tue, 2 Jul 2013 06:40:05 +0000 (06:40 +0000)]
Merging r57897 through r57924 from trunk into soc-2013-depsgraph_mt

8 years agofix for crash in demo-mode, caused by r51702
Campbell Barton [Tue, 2 Jul 2013 05:54:28 +0000 (05:54 +0000)]
fix for crash in demo-mode, caused by r51702

8 years agoremove unused defines
Campbell Barton [Tue, 2 Jul 2013 05:14:18 +0000 (05:14 +0000)]
remove unused defines

8 years agobump up openmp limit for release,
Campbell Barton [Tue, 2 Jul 2013 04:34:39 +0000 (04:34 +0000)]
bump up openmp limit for release,
also remove 'Vertex ' prefix for items in the vertex menu.

8 years agofix [#35939] [Edit - Vertex mode] [Select]-[Mirror] did not returns right result.
Campbell Barton [Mon, 1 Jul 2013 21:56:59 +0000 (21:56 +0000)]
fix [#35939] [Edit - Vertex mode] [Select]-[Mirror] did not returns right result.

8 years agoReplace stupid static balancing with task-based one
Sergey Sharybin [Mon, 1 Jul 2013 21:23:25 +0000 (21:23 +0000)]
Replace stupid static balancing with task-based one

Initially i wanted to have some really simple and basic
threading scheduler and wrote one based on traversing
depsgraph in advance. But it ended up in some issues with
the single-pass traverse i did which didn't gather all
the dependencies actually.

That was for sure solvable, but it ended up in a bit of
time consuming thing and with huge help of Brecht's
patch it was faster just to write proper balancing.

But it's again really basic thing, which could be
easily changed depending on feedback and design decisions
from Joshua,

So for now it works in the following way:

- Currently DagNode is used for threaded evaluaiton,
  meaning traversing actually happens for DagNodes.

  This is easier than converting DAG to a graph where
  only objects are stored, but required adding one int
  field to DagNode for faster runtime checks.

  We could change this later when it'll be clear how
  and where we'll store evaluation data, but for now
  it work pretty ok.

- The new field is called "valency" and it's basically
  number of node parents which needs to be evaluated
  before the node itself could be evaluated.

- Nodes' valency is getting initialized before threading,
  and when node finished to update valency of it's childs
  is getting decreased by one. And if it happens so
  child's valency became zero, it's adding to task pool.

- There's thread lock around valency update, it'll be
  replaced with spinlock in nearest future.

- Another update runtime data is node color. White nodes
  represents objects, gray one non-objects.

  Currently it's needed to distinguish whether we need to
  call object_handle_update on node->ob or not. In the
  future it could be replaced with node->type to support
  granularity, meaning we then could update object data
  separately from object itself.

- Needed to add some public depsgraph functions to make
  it possible to traverse depsgraph without including
  depsgraph private header to other files.

This change doesn't make code anyhow more stable, but
solves update order issues noticed while working on
fixing underlying bugs.

Threaded update is still ifdef-ed for until curves and
armatures are considered thread-safe, which is next
step to be done.

8 years agoTask scheduler ported to C
Sergey Sharybin [Mon, 1 Jul 2013 21:23:20 +0000 (21:23 +0000)]
Task scheduler ported to C

Patch by Brecht, which in original version also
gets rid of ThreadedWorker in favor of new task
scheduler and ports some areas to it.

Kudos to Brecht for this work!

8 years agomove api functions from r57909 into BKE.
Campbell Barton [Mon, 1 Jul 2013 20:27:03 +0000 (20:27 +0000)]
move api functions from r57909 into BKE.

8 years agoRestrict Weight Edit Panel to mesh/lattice Edit and Weight Paint vertex selection...
Gaia Clary [Mon, 1 Jul 2013 19:30:41 +0000 (19:30 +0000)]
Restrict Weight Edit Panel to mesh/lattice Edit and Weight Paint vertex selection mode

8 years agoNLA Bugfix: When clicking on a channel name in the channel list while still in
Joshua Leung [Mon, 1 Jul 2013 14:58:59 +0000 (14:58 +0000)]
NLA Bugfix: When clicking on a channel name in the channel list while still in
tweakmode, this will now result in tweakmode being exited instead of going into
a weird limbo-land where channel selection has changed (but tweakmode is still
active but not drawn)

8 years agoFix incorrect GLSL bump mapping in editmode when the UV coordinates are
Brecht Van Lommel [Mon, 1 Jul 2013 14:49:08 +0000 (14:49 +0000)]
Fix incorrect GLSL bump mapping in editmode when the UV coordinates are
flipped, was not passing sign on to GLSL shader.

8 years agoBugfix [#35744] FCurve select changes on Graph Editor Resize
Joshua Leung [Mon, 1 Jul 2013 14:14:21 +0000 (14:14 +0000)]
Bugfix [#35744] FCurve select changes on Graph Editor Resize

Selection state of F-Curves is lost when resizing the Graph Editor.

The problem was that SIPO_TEMP_NEEDCHANSYNC was getting set in the graph_init()
callback, which gets called everytime the view resizes, and not just the very
first time this happens. However, setting this flag forces the selection state
to the updated/pulled from the scene data.

In the past, it was necessary to set this flag so that we could force F-Curve
colors to get initialised correctly. However, things probably changed at some
point, so this behaviour is no longer needed. At worst now, opening a new graph
editor may not show F-Curve selection correctly synced with the viewport, though
that's easily worked around by reselecting whatever it is in the 3d view.

8 years agoBugfix [#35856] Bones gets scaled chaotically when during NLA Strip Blend In/Out
Joshua Leung [Mon, 1 Jul 2013 13:57:00 +0000 (13:57 +0000)]
Bugfix [#35856] Bones gets scaled chaotically when during NLA Strip Blend In/Out

This was one of the consequences of r.57333 (i.e. influence shouldn't be ignored
on the first strip that animates a channel), as scale should really default to a
base value of 1 (instead of things being blended against 0 as per all other
properties). The end result was that bones were getting scaled to zero here when
the influence of their strip fell to zero.

Now, we use the RNA default values of properties to initialise their initial
values. This may/may not work well in all cases:
1) For properties which don't have the appropriate RNA defaults set, this will
be problematic. But, most properties people are likely to animate here I think
are already set up correctly.
2) It may not always be nice to have values "snapping back" to default values.
In this case, you should still be defining a strip at the bottom of your NLA
stack which defines what the appropriate rest poses *should* be for your shot.

8 years agoBugfix [#35887] Keyframes inserted at wrong time on offsetted NLA Strips when
Joshua Leung [Mon, 1 Jul 2013 13:19:38 +0000 (13:19 +0000)]
Bugfix [#35887] Keyframes inserted at wrong time on offsetted NLA Strips when
using "Auto Keying" + "Insert Available Only"

Patch from Campbell.

The problem was that NLA offset/mapping correction was only done when no
destination action was supplied to insert_keyframe(). In most cases, this is not
a problem, since all normal keyframing goes through keyingset or the insert-
button operators, and these just pass action=NULL (since they're too lazy to
look it up). However, there is one situation where this bug gets triggered (the
specific combination of autokeyframing and "insert available only"), where the
caller of insert_keyframe() actually passed in an action (to prevent it from
creating one itself!).

8 years agoBugfix [#35936] Can't create new vertex group when using Ctrl G menu
Joshua Leung [Mon, 1 Jul 2013 13:02:53 +0000 (13:02 +0000)]
Bugfix [#35936] Can't create new vertex group when using Ctrl G menu

This was caused by r.57812

There were two problems here:
  1) vertex_group_vert_select_unlocked_poll()  had faulty logic which meant that
it always failed when there were no vgroups present yet - the final return
always just fell through
  2) Since the "Assign to New Groups" option was actually implemented using the
same operator as "Assign to Active Group" (just with an extra parameter set), if
the active group was locked, it was not possible to "Assign to New Group" (even
though a new group would not be locked).

8 years agoMade modifiers_getVirtualModifierList safe for threading
Sergey Sharybin [Mon, 1 Jul 2013 11:00:22 +0000 (11:00 +0000)]
Made modifiers_getVirtualModifierList safe for threading

Move static variables to context filling in by this fcuntion
and owned by a callee function. This ensures no conflicts
between threads happens because of static variables used in
this function.

Also moved modifier types and virtual modifiers data to a
function called from creator. This is needed to be sure all
the information is properly initialied to the time when
threads starts to use this data.

8 years agoMerging r57816 through r57896 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Mon, 1 Jul 2013 09:07:21 +0000 (09:07 +0000)]
Merging r57816 through r57896 from trunk into soc-2013-depsgraph_mt

8 years agoFix for Make Local -> All not working correct with multy-user datablocks
Sergey Sharybin [Mon, 1 Jul 2013 08:53:45 +0000 (08:53 +0000)]
Fix for Make Local -> All not working correct with multy-user datablocks

Make Local operator uses BKE_library_make_local function if all the
datablocks needs to be made local. And this function was calling
id_clear_lib_data for every datablock, which only clears library
data. But this function doesn't work correct for datablocks which
areshared by multiple users (this is also mentioned in comment
for this function).

This lead to situations when two datablocks shares the same runtime
data leading to crashes later. For example making everythig local in
scales cycles scene from durian ends up in a crash when toggling
rig edit mode.

Solved by using id_make_local instead of id_clear_lib_data, which
will ensure all the data are nicely expanded and made local.

Checked by Brecht, thanks fr the review!

8 years agofix [#35858] there were two bugs here, hidden faces were occluding in vertex selectio...
Campbell Barton [Mon, 1 Jul 2013 08:25:27 +0000 (08:25 +0000)]
fix [#35858] there were two bugs here, hidden faces were occluding in vertex selection mode.

8 years agobridge tool: calculate face normals before triangulating, own error when removing...
Campbell Barton [Mon, 1 Jul 2013 07:15:12 +0000 (07:15 +0000)]
bridge tool: calculate face normals before triangulating, own error when removing normal recalc from the bmesh operator.
also rename `Fill Grid` -> `Grid Fill` to match `Beauty Fill`

8 years agoadd type checking assert in bmesh operator iterator.
Campbell Barton [Mon, 1 Jul 2013 07:12:05 +0000 (07:12 +0000)]
add type checking assert in bmesh operator iterator.

8 years agotweak to commit r57891, dont draw hidden faces/edges in editmode.
Campbell Barton [Mon, 1 Jul 2013 01:25:21 +0000 (01:25 +0000)]
tweak to commit r57891, dont draw hidden faces/edges in editmode.

8 years agofix [#35911] Show weights not working with a weight edit modifier in edit mode
Campbell Barton [Mon, 1 Jul 2013 00:42:44 +0000 (00:42 +0000)]
fix [#35911] Show weights not working with a weight edit modifier in edit mode

8 years agoadd some missing members to opengl debug print, also use a macro to avoid passing...
Campbell Barton [Sun, 30 Jun 2013 23:50:17 +0000 (23:50 +0000)]
add some missing members to opengl debug print, also use a macro to avoid passing each arg twice.

8 years agoopengl debug info, make GPU_state_print() only show values in arrays that are set...
Campbell Barton [Sun, 30 Jun 2013 23:30:21 +0000 (23:30 +0000)]
opengl debug info, make GPU_state_print() only show values in arrays that are set. (was print 32 values every time)

8 years agofix [#35914] Blender crashes when trying to use vertex selection masking on a copy...
Campbell Barton [Sun, 30 Jun 2013 22:04:03 +0000 (22:04 +0000)]
fix [#35914] Blender crashes when trying to use vertex selection masking on a copy directly after using SHIFT+d

8 years agominor change for high res displays, scale fcurve handles and view3d axis size.
Campbell Barton [Sun, 30 Jun 2013 21:41:06 +0000 (21:41 +0000)]
minor change for high res displays, scale fcurve handles and view3d axis size.

8 years agoPatch [#35897] install_deps: add OpenEXR to ldconfig by Gavin Howard, thanks.
Bastien Montagne [Sun, 30 Jun 2013 16:20:59 +0000 (16:20 +0000)]
Patch [#35897] install_deps: add OpenEXR to ldconfig by Gavin Howard, thanks.

8 years agoFix for
Jeroen Bakker [Sun, 30 Jun 2013 13:35:00 +0000 (13:35 +0000)]
Fix for
 * [#35922] RGB Input Node doesn't work properly

8 years agorevert own fix for adding nodes with (DPI != 72), the fix doesn't work for OSX retina...
Campbell Barton [Sun, 30 Jun 2013 11:56:15 +0000 (11:56 +0000)]
revert own fix for adding nodes with (DPI != 72), the fix doesn't work for OSX retina displays.

8 years agoFix more swapped descriptions for mouse X/Y position properties.
Brecht Van Lommel [Sat, 29 Jun 2013 11:02:36 +0000 (11:02 +0000)]
Fix more swapped descriptions for mouse X/Y position properties.

8 years agoFix swapped descriptions for window X/Y position properties.
Brecht Van Lommel [Sat, 29 Jun 2013 10:59:54 +0000 (10:59 +0000)]
Fix swapped descriptions for window X/Y position properties.

8 years agoFix scons/windows build error, missing pthreads include in blenfont for mutex.
Brecht Van Lommel [Sat, 29 Jun 2013 10:52:18 +0000 (10:52 +0000)]
Fix scons/windows build error, missing pthreads include in blenfont for mutex.

8 years agore-arrange '--help' output into more useful sections (added debug, python).
Campbell Barton [Sat, 29 Jun 2013 10:09:15 +0000 (10:09 +0000)]
re-arrange '--help' output into more useful sections (added debug, python).
also minor style cleanup

8 years agofixed a compiler warning message in vs 2008
Gaia Clary [Sat, 29 Jun 2013 08:41:20 +0000 (08:41 +0000)]
fixed a compiler warning message in vs 2008

8 years agofixed Blender crash, but unclear when this situation can happen
Gaia Clary [Sat, 29 Jun 2013 08:38:17 +0000 (08:38 +0000)]
fixed Blender crash, but unclear when this situation can happen

8 years agoTowards threaded object update
Sergey Sharybin [Fri, 28 Jun 2013 21:58:56 +0000 (21:58 +0000)]
Towards threaded object update

This commit contains changes related on running function
BKE_object_handle_update_ex from multiple threads in order
to increase scene update time when having multiple
independent groups of objects.

Currently this required changes to two areas:

- scene.c, where scene_update_tagged_recursive is now using
  threads for updating the object

  There're some tricks to prevent threads from being spawned
  when it's not needed:

  * Threading will only happen if there're more than one CPU
    core.

  * Threading will happen only if there're more than single
    object which needed to be updated.

  There's currently one crappy part of the change: which is
  freeing object caches (derivedFinal, derivedDeform and so)
  from main thread. This is so because in case VBO are used
  freeing DM is not thread safe. This is because DrawObject
  used global array. Would look into possibility of making
  that code safe later.

  There're also currently some ifdef-ed debug-only code, which
  helps a lot troubleshooting whether everything is working
  fine. This code looks a bit ugly now, will either drop it
  later or make it more cleat.

  And one more thing: threaded update is CURRENTLY DISABLED.
  This is because of some thread-unsafe issues discovered
  while was working on this patch. Namely:

  * I have once a crash in Curve module. Wasn't been able
    to reproduce the crash, but could thing about some
    unsafe code there.

  * Virtual modifier list is not thread-safe (it uses static
    variables).

  * Armature modifier is also doesn't seem to be thread safe
    because of storing some temporary runtime data in actual
    armature.

  All this issues are to be solved next.

- depsgraph.c, where i've added a function which gives list
  of groups, each group contains objects and dependency is
  only allowed between objects inside one group.

  This is needed to make scheduling of objects easier, which
  means update threads will operate on groups, and will handle
  objects one-by-one inside group. Different threads will
  operate on different groups.

  Currently such groups will be generated on every update.
  Actually, on every run of scene_update_objects_threaded which
  only happens if there're objects marked for update. In the
  future we could consider storing such groups in graph itself,
  which will help saving CPU power on building such groups.
  But this is something to be discussed with Joshua first.

P.S. If you really want to test threaded update, you'll
     need to replace:

       #undef USE_THREADED_UPDATE

     with:

       #define USE_THREADED_UPDATE

8 years agoAllow some operators when interface is locked
Sergey Sharybin [Fri, 28 Jun 2013 21:58:52 +0000 (21:58 +0000)]
Allow some operators when interface is locked

Now it's possible to mark operator as safe to be used
in locked interface mode by adding OPTYPE_ALLOW_LOCKED
bit to operator template flags.

This bit is completely handled by wm_evem_system, not
with operator run routines, so it's still possible to
run operators from drivers and handlers.

Currently allowed image editor navigation and zooming.

8 years agoCode cleanup: replace bunch of ifdef+if(do_debug_handler) with
Sergey Sharybin [Fri, 28 Jun 2013 21:58:48 +0000 (21:58 +0000)]
Code cleanup: replace bunch of ifdef+if(do_debug_handler) with
a macro which checks all the stuff and keeps code easy to follow.

8 years agoreplace LATTICE_PT macro with BKE_lattice_index_from_uvw().
Campbell Barton [Fri, 28 Jun 2013 21:24:38 +0000 (21:24 +0000)]
replace LATTICE_PT macro with BKE_lattice_index_from_uvw().

8 years agofix regression since early 2.5x, there was no way to copy library linked objects.
Campbell Barton [Fri, 28 Jun 2013 19:33:58 +0000 (19:33 +0000)]
fix regression since early 2.5x, there was no way to copy library linked objects.

8 years agofix for crash linking fonts to other objects with linked obdata (link, undo would...
Campbell Barton [Fri, 28 Jun 2013 18:39:39 +0000 (18:39 +0000)]
fix for crash linking fonts to other objects with linked obdata (link, undo would crash).

8 years agoview-selected didnt work for metaballs in object mode (radius from previous commit...
Campbell Barton [Fri, 28 Jun 2013 18:19:55 +0000 (18:19 +0000)]
view-selected didnt work for metaballs in object mode (radius from previous commit was 2x too large too).

8 years agoFix #35904: on Windows force NVidia Optimus, which does automatic graphics
Brecht Van Lommel [Fri, 28 Jun 2013 17:58:48 +0000 (17:58 +0000)]
Fix #35904: on Windows force NVidia Optimus, which does automatic graphics
switching between an integrated Intel and a dedicated NVidia card, to use the
dedicated card for Blender.

A more portable and general solution would be nice, but it's all I could find:
http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf

8 years agoFix #35551: the topology mirror setting affected shape key and vertex group but
Brecht Van Lommel [Fri, 28 Jun 2013 17:13:09 +0000 (17:13 +0000)]
Fix #35551: the topology mirror setting affected shape key and vertex group but
this was confusing as there was no setting visible for it. Now these menus
contain an entry to mirror without and with topology mirror.

8 years agoweight Paint: moved Auto Normalize and Multipaint options below Blend selector
Gaia Clary [Fri, 28 Jun 2013 17:10:25 +0000 (17:10 +0000)]
weight Paint: moved Auto Normalize and Multipaint options below Blend selector

8 years agofix for crash when setting the cursor in background mode.
Campbell Barton [Fri, 28 Jun 2013 16:37:39 +0000 (16:37 +0000)]
fix for crash when setting the cursor in background mode.

8 years agotest operator script, add ability to load files from a path while testing operators.
Campbell Barton [Fri, 28 Jun 2013 16:30:34 +0000 (16:30 +0000)]
test operator script, add ability to load files from a path while testing operators.

8 years agofix [#35860] crash if pressing <F8> in import dialog
Campbell Barton [Fri, 28 Jun 2013 16:15:44 +0000 (16:15 +0000)]
fix [#35860] crash if pressing <F8> in import dialog
disallow reloading scripts while running modal, python operators.

8 years agoFix #35412: blender internal "from dupli" texture coordinates not working with
Brecht Van Lommel [Fri, 28 Jun 2013 16:06:55 +0000 (16:06 +0000)]
Fix #35412: blender internal "from dupli" texture coordinates not working with
particles in linked groups.

8 years agochanged Pulldown box label for clarity
Gaia Clary [Fri, 28 Jun 2013 15:12:54 +0000 (15:12 +0000)]
changed Pulldown box label for clarity

8 years agoFix: blender internal transparent shadows were not influenced by object color alpha.
Brecht Van Lommel [Fri, 28 Jun 2013 15:00:05 +0000 (15:00 +0000)]
Fix: blender internal transparent shadows were not influenced by object color alpha.

8 years agoFix #35902: build navigation mesh crash with multiple meshes selected.
Brecht Van Lommel [Fri, 28 Jun 2013 14:15:14 +0000 (14:15 +0000)]
Fix #35902: build navigation mesh crash with multiple meshes selected.

8 years agoFix #35900: image editor save multilayer EXR was not using the compression
Brecht Van Lommel [Fri, 28 Jun 2013 13:13:45 +0000 (13:13 +0000)]
Fix #35900: image editor save multilayer EXR was not using the compression
codec specified by the user.

8 years agoFix #35896: cycles crash with OSL image textures and viewport + preview render
Brecht Van Lommel [Fri, 28 Jun 2013 13:05:21 +0000 (13:05 +0000)]
Fix #35896: cycles crash with OSL image textures and viewport + preview render
running at the same time.

8 years agoFix #35884: crash opening .blend with generated color grid image and preview render.
Brecht Van Lommel [Fri, 28 Jun 2013 13:05:15 +0000 (13:05 +0000)]
Fix #35884: crash opening .blend with generated color grid image and preview render.

Printing text on the color grid image would initialize font glyphs from a thread at
the same time as the UI, causing conflicts. The freetype glyph renderer needs to be
mutex locked because it uses a shared buffer internally even when rendering for
different fonts. Also needed to change the image generate function to use the render
monospace font to avoid conflicts in blenfont.

What's still weak in the blenfont API is that there is no distinction between a font
and a thread using that font to render with some particular size, style, etc.

8 years agoview-select wasn't working for metaballs.
Campbell Barton [Fri, 28 Jun 2013 06:54:49 +0000 (06:54 +0000)]
view-select wasn't working for metaballs.

8 years agofix [#35901] Hooks on armature bones are calculated in wrong space
Campbell Barton [Fri, 28 Jun 2013 06:00:38 +0000 (06:00 +0000)]
fix [#35901] Hooks on armature bones are calculated in wrong space

8 years agoavoid crashes running screendump and screen editing operators in background mode...
Campbell Barton [Fri, 28 Jun 2013 05:39:05 +0000 (05:39 +0000)]
avoid crashes running screendump and screen editing operators in background mode. (not that these would be useful but better not crash)

8 years agoFix #35808: blender internal viewport with freestyle would keep continuously
Brecht Van Lommel [Thu, 27 Jun 2013 22:13:40 +0000 (22:13 +0000)]
Fix #35808: blender internal viewport with freestyle would keep continuously
rerendering for no reason.

Update tags were not being done in the proper Main database.

8 years agofix for out of bounds read in BLI_path_rel
Campbell Barton [Thu, 27 Jun 2013 20:47:59 +0000 (20:47 +0000)]
fix for out of bounds read in BLI_path_rel

8 years agoIK plugin range check was wrong, could do out of bounds reads.
Campbell Barton [Thu, 27 Jun 2013 19:52:50 +0000 (19:52 +0000)]
IK plugin range check was wrong, could do out of bounds reads.

8 years agoFix: Check for locked Vertex Group (returned true where false was expected)
Gaia Clary [Thu, 27 Jun 2013 18:23:03 +0000 (18:23 +0000)]
Fix: Check for locked Vertex Group (returned true where false was expected)

8 years agofix for memory leak in vgroup_copy_active_to_sel
Campbell Barton [Thu, 27 Jun 2013 17:11:23 +0000 (17:11 +0000)]
fix for memory leak in vgroup_copy_active_to_sel

8 years agoCycles / Ramp closures:
Thomas Dinges [Thu, 27 Jun 2013 16:08:06 +0000 (16:08 +0000)]
Cycles / Ramp closures:
* Fix crash with negative values in Phong Ramp, and add some checks to survive INF and NAN values.

Patch by Brecht and myself.

8 years agoCode cleanup / Cycles:
Thomas Dinges [Thu, 27 Jun 2013 15:48:16 +0000 (15:48 +0000)]
Code cleanup / Cycles:
* Some cleanup for castings.

8 years agocorrect previous startup.blend - r57698 (which disabled cycles by accident).
Campbell Barton [Thu, 27 Jun 2013 15:40:32 +0000 (15:40 +0000)]
correct previous startup.blend - r57698 (which disabled cycles by accident).
also correct sequencer grid theme color.

8 years agoFix #35809: dragging a non-active node in the node editor did not work reliably.
Brecht Van Lommel [Thu, 27 Jun 2013 15:07:27 +0000 (15:07 +0000)]
Fix #35809: dragging a non-active node in the node editor did not work reliably.
Disabled timer events from the properties editor were cancelling gestures.

8 years agoFix #35802: searchbox menu not opening when opened from a popup near the bottom
Brecht Van Lommel [Thu, 27 Jun 2013 14:30:26 +0000 (14:30 +0000)]
Fix #35802: searchbox menu not opening when opened from a popup near the bottom
of the window.

8 years agoFix #35890: memory leak in OS X ghost locale detection.
Brecht Van Lommel [Thu, 27 Jun 2013 13:24:55 +0000 (13:24 +0000)]
Fix #35890: memory leak in OS X ghost locale detection.

8 years agoBlender 2.68 Release maintenance:
Thomas Dinges [Thu, 27 Jun 2013 11:30:53 +0000 (11:30 +0000)]
Blender 2.68 Release maintenance:
* Update readme and release-log links to 2.68.

8 years agoFix a few DPI/retina scaling issues in the graph editor and movie clip editor.
Brecht Van Lommel [Thu, 27 Jun 2013 11:29:53 +0000 (11:29 +0000)]
Fix a few DPI/retina scaling issues in the graph editor and movie clip editor.

Patch #35889 by David Jeske.

8 years agoMerging r57729 through r57815 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Thu, 27 Jun 2013 09:07:19 +0000 (09:07 +0000)]
Merging r57729 through r57815 from trunk into soc-2013-depsgraph_mt