8 years agoMerging r57962 through r57988 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Thu, 4 Jul 2013 09:23:21 +0000 (09:23 +0000)]
Merging r57962 through r57988 from trunk into soc-2013-depsgraph_mt

8 years agorigidbody: Code clenup
Sergej Reich [Thu, 4 Jul 2013 08:52:27 +0000 (08:52 +0000)]
rigidbody: Code clenup

Remove duplicate null check.

8 years agorigidbody: Remove constraint when removing one of it's objects
Sergej Reich [Thu, 4 Jul 2013 08:52:24 +0000 (08:52 +0000)]
rigidbody: Remove constraint when removing one of it's objects

This is not the nicest behaviour but trying to keep both bullet and
blender side objects in sync breaks in this case.
There might be a better soluion but this avoids crashes for now.

Fixes: [#35995] Delete crash on specific scene (Physics)
8 years agoMoved 'vgroups exist' check into operator poll functions of weight tools
Gaia Clary [Thu, 4 Jul 2013 08:47:42 +0000 (08:47 +0000)]
Moved 'vgroups exist' check into operator poll functions of weight tools

8 years agofix [#35998] Crash when trying rename Driver in Outliner
Campbell Barton [Thu, 4 Jul 2013 04:57:04 +0000 (04:57 +0000)]
fix [#35998] Crash when trying rename Driver in Outliner
remove unused script define

8 years agostop adding groups from changing the active group with weight transfer, add BKE_defgr...
Campbell Barton [Thu, 4 Jul 2013 03:56:18 +0000 (03:56 +0000)]
stop adding groups from changing the active group with weight transfer, add BKE_defgroup_new function.

8 years agofix [#35984] no way to know if a datablock is in editmode
Campbell Barton [Wed, 3 Jul 2013 22:57:00 +0000 (22:57 +0000)]
fix [#35984] no way to know if a datablock is in editmode

the report explains the issue in detail, but basically you couldn't know if a mesh was in editmode without checking all the objects that use it.
add `is_editmode` readonly property for all datatypes which support editmode.

also make rna fail to build on implicit function declarations.

8 years agofixes/edits to wright transfer
Campbell Barton [Wed, 3 Jul 2013 21:29:30 +0000 (21:29 +0000)]
fixes/edits to wright transfer
- poll function now checks for a mesh.
- other selected lattices would crash, check for meshes there too.
- better reporting when transfer fails.
- remove feature to sync with active bone after transfer, other tools don't do this (we could make into a generic function if its needed).

8 years agoremove checks for active object in the weight panel, this is incorrect for weight...
Campbell Barton [Wed, 3 Jul 2013 21:07:41 +0000 (21:07 +0000)]
remove checks for active object in the weight panel, this is incorrect for weight transfer and we better rely on operators poll functions.

8 years agoFix bevel crash bug 35990. Sometimes no face to interpolate from.
Howard Trickey [Wed, 3 Jul 2013 20:52:31 +0000 (20:52 +0000)]
Fix bevel crash bug 35990. Sometimes no face to interpolate from.

8 years agoFix #35992: crash using make links > animation data between empty and mesh object.
Brecht Van Lommel [Wed, 3 Jul 2013 20:37:09 +0000 (20:37 +0000)]
Fix #35992: crash using make links > animation data between empty and mesh object.

8 years agoFix #35991: show warning message to when trying to edit driven values in number buttons.
Brecht Van Lommel [Wed, 3 Jul 2013 20:37:07 +0000 (20:37 +0000)]
Fix #35991: show warning message to when trying to edit driven values in number buttons.

8 years agoFix Weight Paint(Weight-Transfer): active vgroup does not match active bone when...
Gaia Clary [Wed, 3 Jul 2013 20:31:38 +0000 (20:31 +0000)]
Fix Weight Paint(Weight-Transfer): active vgroup does not match active bone when new vgroups where created during transfer

8 years agoFix #35935: make links > groups, which copies group membership between objects,
Brecht Van Lommel [Wed, 3 Jul 2013 17:16:24 +0000 (17:16 +0000)]
Fix #35935: make links > groups, which copies group membership between objects,
would also copy object dupligroups (next item in the menu).

8 years agoFix #35933: setting shortcut keys in object mode menu didn't work correct.
Brecht Van Lommel [Wed, 3 Jul 2013 17:11:33 +0000 (17:11 +0000)]
Fix #35933: setting shortcut keys in object mode menu didn't work correct.

8 years agoFix #35986: "Full sample AA not supported without 3d rendering" message was
Brecht Van Lommel [Wed, 3 Jul 2013 17:02:09 +0000 (17:02 +0000)]
Fix #35986: "Full sample AA not supported without 3d rendering" message was
displayed even with antialiasing disabled.

8 years agoWeight Paint: Enable Transfer Weights tool for Obejcts with no Vertex Groups
Gaia Clary [Wed, 3 Jul 2013 15:57:30 +0000 (15:57 +0000)]
Weight Paint: Enable Transfer Weights tool for Obejcts with no Vertex Groups

8 years agoFix deadlock in coordinate wrapping operation with zero dimension
Sergey Sharybin [Wed, 3 Jul 2013 15:33:14 +0000 (15:33 +0000)]
Fix deadlock in coordinate wrapping operation with zero dimension

8 years agoFix crash when getting active ID from a node tree with missing groups
Sergey Sharybin [Wed, 3 Jul 2013 15:33:11 +0000 (15:33 +0000)]
Fix crash when getting active ID from a node tree with missing groups

8 years agoMerging r57954 through r57961 from trunk into soc-2013-depsgraph_mt
Sergey Sharybin [Wed, 3 Jul 2013 12:38:30 +0000 (12:38 +0000)]
Merging r57954 through r57961 from trunk into soc-2013-depsgraph_mt

8 years agoCode cleanup: more explicit list base initialization
Sergey Sharybin [Wed, 3 Jul 2013 12:33:28 +0000 (12:33 +0000)]
Code cleanup: more explicit list base initialization

8 years agoMade curves almost thread-safe
Sergey Sharybin [Wed, 3 Jul 2013 12:32:42 +0000 (12:32 +0000)]
Made curves almost thread-safe

Now modifier stack wouldn't modify original curve's nurbs
and will operate on a copy of nurbs.

This makes it possible to process curve object update with
shared curve datablocks from multiple threads. There's no
big overhead for creating a copy of nurbs comparing to old
behavior which was allocating original vertex array and
apply coordinates on curve after all modifier are applied.

The only remained issue with curves is curve's bounding box
and texture space. It's not thread-safe, but it wouldn't
lead to crashes -- it just could lead to either memory
leak or wrong texture coordinates due to difference in
modifiers stacks of objects which shares the same curve.

8 years agoRemove unused argument from utility curve functions
Sergey Sharybin [Wed, 3 Jul 2013 12:32:35 +0000 (12:32 +0000)]
Remove unused argument from utility curve functions

So far it was harmless, but with upcoming changes
having this argument could be confusing from logic
point of view.

8 years agoWrap runtime curve members into own structure
Sergey Sharybin [Wed, 3 Jul 2013 12:32:29 +0000 (12:32 +0000)]
Wrap runtime curve members into own structure

This allows easier assignment on file loading,
keeps curve-specific runtime data grouped and
saves couple of bytes in Object for non-curve

8 years agoGet rid of crazy DAG nodes coloring when doing threaded update
Sergey Sharybin [Wed, 3 Jul 2013 12:32:17 +0000 (12:32 +0000)]
Get rid of crazy DAG nodes coloring when doing threaded update

DAG node already has got type field, so we could just check whether
type is ID_OB to distinguish whether object_handle_update need to
be called for node->ob.

This saves iterating via scene's bases when preparing threaded
update. This also will very much likely update objects which are
not in the scene base are used in dupli groups.

So now objects form dupli_groups are likely already properly updated
white traversing the DAG with threaded update and special hacks
are needed from main thread to update objects from dupli_groups
which was added in previous commit.

However, kept this hack for a while, need some more thoughts
and investigation.

8 years agoFix #35974: smoke flow force field icon missing in add menu.
Brecht Van Lommel [Wed, 3 Jul 2013 12:22:46 +0000 (12:22 +0000)]
Fix #35974: smoke flow force field icon missing in add menu.

8 years agofix [#35975] "Select Linked" = "Select All" in Weight Paint mode?
Campbell Barton [Wed, 3 Jul 2013 09:53:06 +0000 (09:53 +0000)]
fix [#35975] "Select Linked" = "Select All" in Weight Paint mode?
looks like this was broken since bmesh merge.

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

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

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

  * 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

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

  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:



       #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:

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