Commit Graph

66005 Commits

Author SHA1 Message Date
Brecht Van Lommel
1268eda19b Fix #35994: shape key mirror without topology did not properly work after
doing mirror with topology.
2013-07-04 11:37:32 +00:00
Brecht Van Lommel
1c01ad53d5 Remove SDL_VIDEODRIVER=dummy environment variable setting, this may interfere
with other applications launching SDL applications from Blender.

At the time this was added the game engine joystick code was unnecessarily
initializing the SDL video subsystem, and looking at the SDL source code that's
the only place this environment variable is read. That doesn't happen anymore,
though we do have WITH_GHOST_SDL now. But the environment variable is set after
GHOST has been initialized, otherwise this code would have actually broken that.
2013-07-04 11:28:52 +00:00
Campbell Barton
69b8b16464 rename poll functions from r57986, also no need to count the list to check if its empty. 2013-07-04 09:31:33 +00:00
Sergey Sharybin
5f8d67b055 Merging r57962 through r57988 from trunk into soc-2013-depsgraph_mt 2013-07-04 09:23:21 +00:00
Sergej Reich
a51b5c676e rigidbody: Code clenup
Remove duplicate null check.
2013-07-04 08:52:27 +00:00
Sergej Reich
734e49ade6 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)
2013-07-04 08:52:24 +00:00
Gaia Clary
5fc8393dee Moved 'vgroups exist' check into operator poll functions of weight tools 2013-07-04 08:47:42 +00:00
Campbell Barton
32e674c2c9 fix [#35998] Crash when trying rename Driver in Outliner
remove unused script define
2013-07-04 04:57:04 +00:00
Campbell Barton
70dc1d8cb6 stop adding groups from changing the active group with weight transfer, add BKE_defgroup_new function. 2013-07-04 03:56:18 +00:00
Thomas Dinges
285ef99931 Cycles:
* Added 2 new nodes to combine and separate HSV colors. 

Screenshot:
http://www.pasteall.org/pic/show.php?id=54828
2013-07-03 23:46:56 +00:00
Campbell Barton
a0cfa3e420 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.
2013-07-03 22:57:00 +00:00
Thomas Dinges
e7fc69bdfd Merged revision(s) 57908-57978 from trunk/blender into soc-2013-dingto. 2013-07-03 22:12:42 +00:00
Campbell Barton
374383997c 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).
2013-07-03 21:29:30 +00:00
Campbell Barton
75aed60ed8 remove checks for active object in the weight panel, this is incorrect for weight transfer and we better rely on operators poll functions. 2013-07-03 21:07:41 +00:00
Howard Trickey
2e7776b95a Fix bevel crash bug 35990. Sometimes no face to interpolate from. 2013-07-03 20:52:31 +00:00
Brecht Van Lommel
bbfc3c6cee Fix #35992: crash using make links > animation data between empty and mesh object. 2013-07-03 20:37:09 +00:00
Brecht Van Lommel
42f6136da8 Fix #35991: show warning message to when trying to edit driven values in number buttons. 2013-07-03 20:37:07 +00:00
Gaia Clary
7eed4d5c4f Fix Weight Paint(Weight-Transfer): active vgroup does not match active bone when new vgroups where created during transfer 2013-07-03 20:31:38 +00:00
Brecht Van Lommel
3181c4ecd5 Fix #35935: make links > groups, which copies group membership between objects,
would also copy object dupligroups (next item in the menu).
2013-07-03 17:16:24 +00:00
Brecht Van Lommel
76b3f6edcc Fix #35933: setting shortcut keys in object mode menu didn't work correct. 2013-07-03 17:11:33 +00:00
Brecht Van Lommel
721237cf29 Fix #35986: "Full sample AA not supported without 3d rendering" message was
displayed even with antialiasing disabled.
2013-07-03 17:02:09 +00:00
Gaia Clary
bce00b605c Weight Paint: Enable Transfer Weights tool for Obejcts with no Vertex Groups 2013-07-03 15:57:30 +00:00
Sergey Sharybin
c9e56955cf Fix deadlock in coordinate wrapping operation with zero dimension 2013-07-03 15:33:14 +00:00
Sergey Sharybin
9b72621958 Fix crash when getting active ID from a node tree with missing groups 2013-07-03 15:33:11 +00:00
Sergey Sharybin
5185a82e4d Merging r57954 through r57961 from trunk into soc-2013-depsgraph_mt 2013-07-03 12:38:30 +00:00
Sergey Sharybin
98ff660186 Code cleanup: more explicit list base initialization 2013-07-03 12:33:28 +00:00
Sergey Sharybin
2fe0981fad 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.
2013-07-03 12:32:42 +00:00
Sergey Sharybin
fc4c736989 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.
2013-07-03 12:32:35 +00:00
Sergey Sharybin
d595f9985e 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
types.
2013-07-03 12:32:29 +00:00
Sergey Sharybin
f49e441927 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.
2013-07-03 12:32:17 +00:00
Brecht Van Lommel
d07f060206 Fix #35974: smoke flow force field icon missing in add menu. 2013-07-03 12:22:46 +00:00
Campbell Barton
6d9de6a72b fix [#35975] "Select Linked" = "Select All" in Weight Paint mode?
looks like this was broken since bmesh merge.
2013-07-03 09:53:06 +00:00
Sergey Sharybin
4e9d469dfd Merging r57934 through r57953 from trunk into soc-2013-depsgraph_mt 2013-07-03 08:31:46 +00:00
Campbell Barton
905cb1639a update doxygen congfig and tweaks to warnings when running doxygen. 2013-07-03 04:47:50 +00:00
Campbell Barton
ffaebe2237 reduce imports on startup 2013-07-03 01:20:32 +00:00
Campbell Barton
e60a33ba07 fix for own error in 57226, broke subsurf-uv 2013-07-02 21:47:42 +00:00
Brecht Van Lommel
65cbcde831 Fix cycles world ray visibility not working correct with multiple importance
sampling.
2013-07-02 21:03:16 +00:00
Campbell Barton
4848ca09c0 style cleanup 2013-07-02 20:36:52 +00:00
Sergey Sharybin
7c7a3f7879 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.
2013-07-02 19:23:23 +00:00
Sergey Sharybin
e4f7260bac 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.
2013-07-02 19:23:19 +00:00
Sergey Sharybin
79c678be89 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).
2013-07-02 19:23:12 +00:00
Sergey Sharybin
bae2a2c3b2 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.
2013-07-02 19:23:09 +00:00
Sergey Sharybin
a03437cb1a 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.
2013-07-02 19:23:06 +00:00
Sergey Sharybin
d50ff36d3d 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.
2013-07-02 19:23:03 +00:00
Sergey Sharybin
41f0c137ba 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.
2013-07-02 19:22:59 +00:00
Sergey Sharybin
6d9366b0a7 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.
2013-07-02 19:22:55 +00:00
Sergey Sharybin
e607825f6b 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.
2013-07-02 19:22:52 +00:00
Sergey Sharybin
06e2d967ae Simplify debug print macro in WM even system 2013-07-02 19:22:49 +00:00
Sergey Sharybin
f129393408 Put debug prints in threaded debug into G.debug & G_DEBUG check. 2013-07-02 19:22:46 +00:00
Sergey Sharybin
8c67e9d799 Merging r57925 through r57933 from trunk into soc-2013-depsgraph_mt 2013-07-02 19:18:10 +00:00