Commit Graph

55451 Commits

Author SHA1 Message Date
Sergey Sharybin
2a838c71d9 Depsgraph: Add missing NULL pointer check 2016-11-11 15:28:34 +01:00
Sergey Sharybin
24d89a1f77 Depsgraph: Fix missing DONE flag in relations builder
Was causing relations be build twice in certain cases.
2016-11-11 15:20:17 +01:00
Sergey Sharybin
7dda3cf830 Fix T49993: Indirectly used taper/bevel crashes new dependency graph
New dependency graph expects strict separation between nodes and relations builder,
meaning, if we try to create relation with an object which is not in the graph yet
we'll have an error in depsgraph.

Now, so far object nodes were created from bases of the current scene, which caused
missing objects in graph in certain cases.

Didn't find better approach than to simply ensure object nodes exists when we know
they'll be used by relation builder.
2016-11-11 14:52:05 +01:00
Sergey Sharybin
b1743cda5a Depsgraph: Fix typo in text on curve relation builder 2016-11-11 14:41:02 +01:00
Sergey Sharybin
653541ea78 Depsgraph: Fix missing ID node tag
Might have caused nodes created multiple times for the same object.
2016-11-11 14:26:11 +01:00
Sergey Sharybin
915c74a33b Depsgraph: Add some data builder logic to corresponding function 2016-11-11 14:24:47 +01:00
Sergey Sharybin
9eeca9e7cd Depsgraph: cleanup, no functional changes 2016-11-11 13:54:02 +01:00
Sergey Sharybin
48971da4c8 Depsgraph: Fix wrong relation names 2016-11-11 11:42:43 +01:00
Sergey Sharybin
4710fa700c Depsgraph: Fix wrong relations in array modifier 2016-11-11 11:41:33 +01:00
Sergey Sharybin
80aae2b6fe Consider Numpad Enter in pose slide operators
It was annoying to only have regular Enter confirming input there.
2016-11-10 17:19:23 +01:00
Bastien Montagne
e316636fa8 Fix BKE_library_make_local() trying to also make local proxified objects.
Proxified objects can never be local, we can totally ignore them here.

This 'fixes' the asserts related to usercount when trying to remap poselib
of localized proxified objects (not sure what exactly was going on wrong here,
but proxies are a giant can of worms for sane data-blocks handling anyway :/).
2016-11-10 17:09:16 +01:00
Sergey Sharybin
f0d53ac109 Depsgraph: Fix another issue which seems to be a bug
Similar to a previous commit.

Doing separately for an easy of bisect.
2016-11-10 15:49:33 +01:00
Sergey Sharybin
aef66a6be0 Depsgraph: Fix wrong relation from IK solver to pole target
Copy paste error...

How to avoid those?
2016-11-10 15:46:22 +01:00
Dalai Felinto
0b9b8ab2dd Fix Grease Pencil render in VSE crashes when no strips (#T49975)
Solution as suggested by Sergey Sharybin. Initial debugging by
Antonio Vazquez.
2016-11-10 12:24:54 +01:00
Sybren A. Stüvel
2138fdb785 Added bpy.types.ID.make_local() that can make a single ID block local.
This new `bpy.types.ID.make_local(clear_proxies=True)` allows Python
code to press the "Make Local" button on any ID block. I chose
`clear_proxies=True` as the default, since it's the default behaviour
of `id_make_local()` (defined in `library.c`).

The caller does need to take care of ensuring that linked-in objects
don't refer to local data, and that proxies aren't broken.

Reviewers: sergey, mont29

Reviewed By: mont29

Subscribers: dfelinto

Differential Revision: https://developer.blender.org/D2346
2016-11-10 10:49:57 +01:00
Bastien Montagne
afc8a4f9e2 Fix UI message. 2016-11-09 19:27:43 +01:00
Campbell Barton
47759b14ab BMesh: face-join, remove redundant face assignment
Keep ifdef'd out for holes, this isn't needed currently.
2016-11-10 03:21:42 +11:00
Sergey Sharybin
4d9562a3ae Depsgraph: Fix crash deleting bones in armature edit mode
For the new dependency graph we have to rebuild graph when
bones "topology" are changing.
2016-11-09 17:00:31 +01:00
Bastien Montagne
18be39ff17 Fix some assert when making local (due to infamous PITA ShapeKey ID). 2016-11-09 16:42:28 +01:00
Campbell Barton
e72caa513a BMesh: Cleanup, remove hole ifdef 2016-11-10 01:08:12 +11:00
Campbell Barton
49a3eaa3dc BMesh: face-flip, no need for temporary edge-array
Reverse loops in-place.
2016-11-10 00:08:26 +11:00
Jörg Müller
e9689e1a20 Fix: setting an audio callback before audio device initialization. 2016-11-09 00:06:49 +01:00
Sergey Sharybin
4d0f7c320c Depsgraph: Use atomics to tag ID when evaluating driver
This is required since new dependency graph evaluates drivers in threads
so it was possible to have some partially written ID tag there.
2016-11-08 17:54:14 +01:00
Campbell Barton
4f28dac872 BMesh: remove edge search when flipping faces
Replace search with direct lookup.
2016-11-09 00:18:32 +11:00
Sergey Sharybin
0085001eb0 Fix memory leak when Blender is build without Bullet and files with RB is opened 2016-11-08 11:54:04 +01:00
Sergey Sharybin
93ace71bd7 Cycles: Only use new light sample threshold for new files
This is a late follow-up commit to the light sample threshold changes which
caused difference in rendering all existing .blend files which is not something
we are happy about: it is fine to use new optimized defaults for new files, but
existing ones should always be rendering in the same way as they used to be.

Sorry for the inconveniece, but such thing should have been done to begin with.
If this setting was modified it will not be reset to zero.

Now all render tests should be passing again.

P.S. Also really annoying to bump subversion for such reasons, but currently we
don't have better way to achieve what we want.
2016-11-08 10:58:09 +01:00
Sergey Sharybin
508e2f0d69 Fix T49937: Blender is crashing because of Lamp Data Node
Lamp Data node requires shadow sample array which is only enabled when
Shadows are enabled in the shading settings.

This commit prevents crash but might not give expected render results
in such a configuration.
2016-11-08 10:40:21 +01:00
Campbell Barton
f19f9be1b9 BMesh: remove redundant edge-split loop initialize
Would always set both first1 and first2.
2016-11-08 07:13:20 +11:00
Thomas Dinges
9912792564 Forgot this in last commit. (Brick GLSL). 2016-11-07 20:59:09 +01:00
Thomas Dinges
28639a22bc Fix Brick Texture GLSL, broken after Mortar Smooth addition. 2016-11-07 20:55:36 +01:00
Campbell Barton
535914aa46 BMesh: remove redundant array size
Correct unhelpful comment & some comment edits.

Rename 'disk_is_flagged' -> 'bm_vert_is_manifold_flagged',
since the check is quite specific.
2016-11-08 06:54:20 +11:00
Campbell Barton
7a98c43f9d BMesh: minor improvement to edge-split assignment 2016-11-08 06:49:22 +11:00
Sergey Sharybin
1d01a1a269 Depsgraph: Disable timing profile 2016-11-07 12:50:45 +01:00
Martijn Berger
f51f215bc3 fix building depsgraph after recent changes 2016-11-07 12:32:00 +01:00
Sergey Sharybin
37947ed552 Depsgraph: Do not rely on indirectly included cstring
Also add comment why exactly cstring is needed.
2016-11-07 12:09:42 +01:00
Sergey Sharybin
9b5a32cbfb Proxy: Construct pchan hash when syncing armature proxy
This makes bone lookup much faster (by avoiding liner string lookup)
and speeds up depsgraph construction time on file open.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
21350b73df Despgraph: Optimize cycles detection algorithm
The idea is simple: when falling back to one of the nodes which was partially
handled we "resume" checking outgoing relations from the index which we stopped.

This gives about 15-20% depsgraph construction time save.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
4c30a9ee42 Depsgraph: Speedup initial rig build time
We don't need to sort bone channels, it's all taken care about
by the depsgraph itself.

Gives up to 30% initial rig construction time speedup.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
65a1fd975c Depsgraph: Move key implementation from header to dedicated file 2016-11-07 11:04:49 +01:00
Sergey Sharybin
109be7ed39 Depsgraph: Move class implementation from header to implementation files
This is more proper way to go:

- Avoids re-compilation of all dependent files when implementation changes
  without changed API,

- Linker should have much simpler time now de-duplicating and getting rid
  of redundant implementations.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
287197c4e3 Depsgraph: Fully switch from string to const char*
This brings up to 10-20% depsgraph build time improvement in the layout
files from the studio repository.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
c9eca0c6c9 Depsgraph: Add extra name tag for operation nodes
The idea here is to address issue that name on it's own is not
always unique: for example, when adding driver operations the
name used for nodes is the RNA path (and multiple drivers can
write to different array indices of the path). Basically, now
it's possible to pass extra integer value to distinguish
operations in such cases.

So now we've already switched from sprintf() to construct unique
operation name to pass RNA path and array index.

There should be no functional changes yet, but this work is
required for further work about replacing string with const
char*.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
d872aeaf51 Depsgraph: Cleanup, operation has name, not description
Hopefully should make things more clear here.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
9331930345 Depsgraph: Remove unused function
A residue from times where we thought to do partial graph updates,
which we are not committing any time soon.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
f8d9a56aa1 Depsgraph: Use const char for component API 2016-11-07 11:04:49 +01:00
Sergey Sharybin
4ef45ba775 Depsgraph: Remove some includes which seems unused 2016-11-07 11:04:49 +01:00
Sergey Sharybin
bbd4b96fe9 Depsgraph: Use const char instead of string in part of drivers construction 2016-11-07 11:04:49 +01:00
Sergey Sharybin
a7f53bc512 Depsgraph: Switch away form string to const char* for node names
There is no real reason to have nodes storing heap-allocated name
and description. Doing this increases amount of allocations during
dependency graph building, which usually means somewhat slowness.

We're temporarily loosing some eyecandy in the graphviz visualizer,
but those we can bring back as a part of graphiz dump (which happens
much less often than depsgraph build).

This will happen in multiple commits for the ease of bisect in the
future just in case this causes any regression. This commit contains
ID creation API changes.
2016-11-07 11:04:49 +01:00
Sergey Sharybin
f64548daa6 Depsgraph: Remove prototype of unused and non-implemented method 2016-11-07 11:04:49 +01:00
Alexander Gavrilov
c8c7414c3f Expose Bullet rotational spring settings in the UI.
Bullet spring constraint already supports rotational springs, but
they are not exposed in blender UI, likely due to a simple oversight.
Supporting them is as simple as adding a few DNA/RNA properties
with appropriate UI and passing them on to Bullet.

Reviewers: sergof

Reviewed By: sergof

Differential Revision: https://developer.blender.org/D2331
2016-11-07 12:59:12 +03:00