Commit Graph

55451 Commits

Author SHA1 Message Date
Sergey Sharybin
f348b7924c Depsgraph: Leave armature animation relation to build_animation()
Needs some optimization trick to hook pose init function to animation
instead of a bone. This is how flush will work anyway.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
cbb42fcd96 Depsgraph: Use default argument value for relations builder
Follows other function definitions.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
18ca793ca0 Depsgraph: Cleanup, line wrapping 2017-12-06 10:21:33 +01:00
Sergey Sharybin
abc55bf84a Depsgraph: Use build_animation() to build relations to animated properties
Before that it was up to lots of other places to keep track on whether
something is to be dependent on time or not. Was annoying, and unreliable,
and fragile.

This commit avoids hacks in object builder. Other areas will be adopted
soon.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
4a99cc5850 Depsgraph: Add ability to check whether relation exists before adding it
Currently not used, but this is aimed to be used when adding relations from
FCurve to property which is being animated.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
8b3aa8ef45 Depsgraph: Cleanup, line wrapping 2017-12-06 10:21:33 +01:00
Sergey Sharybin
7de3c8ace7 Depsgraph: Move implementation part of relations header to own file 2017-12-06 10:21:33 +01:00
Sergey Sharybin
335343fe93 Fix T53408: Updating Cycles Nodes via Drivers in Material View
This is something what should be supported by the new dependency graph.

Fixed by making it so, build_animation() adds relation between Animation
component and whatever-is-being-animated. In fact, for now, only relations to
ID properties are added. Rest of the relations are kind of hacked in all over
the code and needs to be removed and verified with specific .blend files.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
f1ad6b43b3 Depsgraph: Cleanup, split build_animation 2017-12-06 10:21:33 +01:00
Sergey Sharybin
9f9b666d9a Depsgraph: Correct fallback for the parameters calculation
We can't use a single component here, sine it might consist of multiple
operations. So, for example, having driver operation will confuse targets
of another driver.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
b5a8d0acaf Depsgraph: Cleanup, split driver builder function 2017-12-06 10:21:33 +01:00
Sergey Sharybin
3e9cd53687 Depsgraph: Cleanup, deduplicate as much as possible in build_driver 2017-12-06 10:21:33 +01:00
Sergey Sharybin
8c4363e3b1 Depsgraph: Remove old comments which are likely outdated 2017-12-06 10:21:33 +01:00
Sergey Sharybin
8912e4faef Depsgraph: Replace last obvious part of driver builder with generic RNA code 2017-12-06 10:21:33 +01:00
Sergey Sharybin
b26992fe6e Depsgraph: Add criteria for RNA_Key 2017-12-06 10:21:33 +01:00
Sergey Sharybin
fe5e8593b7 Depsgraph: Remove confusing ID node criteria
it sometimes overrides all possible other criteria, even tho we might want to
be very specific about what component we are looking for here.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
35364e2fb2 Depsgraph: Use generic function for shape key driver target
There was a second place for shape keys.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
070c735b13 Depsgraph: Fix wrong relations built for drivers
When target was changed from bone to regular object, new dependency graph was
still trying to build relations as if driver was using bone.
2017-12-06 10:21:33 +01:00
Sergey Sharybin
f8fd8b0744 Depsgraph: Use generic function for shape key driver target 2017-12-06 10:21:33 +01:00
Sergey Sharybin
235a68d8f3 Depsgraph: Use generic function for modifiers driver target 2017-12-06 10:21:32 +01:00
Sergey Sharybin
7586266343 Depsgraph: Use existing utility function to get driver target node
Only done for pose bone for now, but the idea is to go case bu case in
build_driver and move all custom logic from there to find_node_from_pointer().
2017-12-06 10:21:32 +01:00
Sergey Sharybin
3795e37c62 Depsgraph: Cleanup, split build_driver function up 2017-12-06 10:21:32 +01:00
Sergey Sharybin
52e81de9f7 Depsgraph: Don't see reason to have special case for bone's RNA path 2017-12-06 10:21:32 +01:00
Sergey Sharybin
97e92d6f3e Depsgraph: SImplify chjecks in directly address bone 2017-12-06 10:21:32 +01:00
Sergey Sharybin
284f106c91 Depsgraph: begin use of RNAPathKey instead of re-implemented checks in driver variables 2017-12-06 10:21:32 +01:00
Sergey Sharybin
0cd2303e67 Depsgraph: Cleanup, don't use static qualifier inside of anonymous namespace 2017-12-06 10:21:32 +01:00
Sergey Sharybin
aed1320b24 Add utility function to compare PointerRNA with NULL
Thanks Campbell for review!
2017-12-06 10:21:32 +01:00
Sergey Sharybin
a68e10be5e Depsgraph: Correct RNA pointer criteria to deal with bone custom properties 2017-12-06 10:21:32 +01:00
Campbell Barton
e6404274a1 Fix T53441: Inset doesn't start at zero 2017-12-06 16:45:51 +11:00
Campbell Barton
9ab430e9cb Cleanup: line length 2017-12-06 16:42:34 +11:00
Bastien Montagne
ee120d6293 Fix T53476: File Browser: Selection Issue with 'fill' option.
Fill-selection would only go upward in list of items to find an already
selected one and fill-select all items in-between. Now, in case upward
search fails, it will also intent to go downward, effectiviely allowing
to 'fill-select' from bottom to top.

Note that top-to-bottom keeps priority (i.e. if a top-to-bottom
fill-selection is possible, it will always happen, even if a
bottom-to-top one is also possible).
2017-12-05 22:34:49 +01:00
Campbell Barton
855799ecc1 Fix T53430: Cut at the strip end fails w/ endstill 2017-12-06 04:52:38 +11:00
Sergey Sharybin
3959ce0540 Types are to have explicit forward declaration 2017-12-05 16:54:39 +01:00
Germano
70c2d8a1a2 Fix T53469: Make sure that edges are drawn in the backbuff whenever you are looking for the nearest edge
Caused by rB9f5bf19
2017-12-05 11:13:53 -02:00
Joshua Leung
4f2dd5ad26 Fix for typo in previous commit 2017-12-06 01:14:20 +13:00
Joshua Leung
52dde11796 Simplify UI-names for B-Bone Ease In/Out settings
For more consistency with the other settings, and increased readability
when the UI is cramped (and it isn't possible to see the whole names).
2017-12-06 00:58:10 +13:00
Joshua Leung
5d96bc9c5a Version patching fixes for F-Curves (as required for fixes for T48988 and T52009)
* For the T48988 fix (i.e. separate Ease In/Out properties for Bendy Bones
  in Edit vs Pose modes), old animation data needed to be patched to use
  the new property names. This is needed to partially fix some of the
  issues in T53356 (though the Rigify code itself still needs to be patched).

* For the T52009 fix, old files needed to have the frame_start and frame_end
  properties on the FModifier (base-class) updated to match that of the
  FMod_Stepped type-specific class. This wasn't done in the earlier commit
  since it wasn't worth going through all animation data just for the sake
  of updating these relatively-rare settings, but since we're doing it anyway
  now, it makes sense to include this here.
2017-12-06 00:54:39 +13:00
Joshua Leung
6ebf244ace Added BKE_fcurves_main_cb(), a wrapper around BKE_animdata_main_cb to make it easier to apply fixes to all F-Curves in a file 2017-12-05 17:16:05 +13:00
Joshua Leung
41b4b8ded6 Cleanup/Style Tweaks to fit rest of code 2017-12-05 17:14:55 +13:00
Bastien Montagne
1802d14394 Fix T53463: Rotation numerical input shows instable behaviour.
Inverting a number in radians when user is in degrees gives rather
unexpected results. ;)
2017-12-04 18:40:33 +01:00
Sergey Sharybin
40822ae4e9 Depsgraph: Cleanup, indentation 2017-12-04 15:50:38 +01:00
Howard Trickey
bdc15061fc Better bevel profile at extreme values of profile.
Patch from Richard Erhardt, with some additions & modifications.
Changes bevel profile shape parameter so that can get arbitrarily
near square profile as parameter -> 1.
Adds code to make profile=0 case work, at least for cube corners,
so changed hard min of profile parameter to 0 from 0.15.
2017-12-04 09:36:14 -05:00
Sergey Sharybin
3533e082a0 RNA: Use const qualifier for an utility function 2017-12-04 15:26:43 +01:00
Sergey Sharybin
0f8228a890 Depsgraph: Add parameters nodes for bone custom properties
Currently shouldn't make any difference, but this is something what needs to be
done to sanitize drivers relations )with the idea to re-use some generic code
to get operations for driver variables.
2017-12-04 15:10:14 +01:00
Germano
9f5bf197a0 Edit Mesh Selection: Draw the backbuff of edge selection only when requested
And make sure the width is 1
2017-12-04 12:05:06 -02:00
Sergey Sharybin
d974d25497 Depsgraph: Cleanup, move RNA key constructor to it's file 2017-12-04 14:17:17 +01:00
Sergey Sharybin
d5e491c9a7 Depsgraph: Cleanup, don't use bracers in relations names
Those don't bring any information.
2017-12-04 14:17:17 +01:00
Sergey Sharybin
5f86d6e6eb Depsgraph: Cleanup, node from RNA pointer search 2017-12-04 14:17:17 +01:00
Sergey Sharybin
6b72d87def Depsgraph: Remove unused property based update tags
Those are unused, and not clear whether we will ever support this.

Seems to be better having more like "component" tags, would be less magic
involved to guess what exactly is to be tagged.
2017-12-04 14:17:17 +01:00
Bastien Montagne
0868a2b610 Cleanup: link/append: get rid of booleans in func parameters.
One or two are OK, but more make it rather unreadable, and future work
is likely to require more toggle specific behavior here. So switched to
bitflags, switching from short to int and using 16 upper bits for
'internal' ones defined in BLO_readfile.h, combined with 'public' ones
from user interaction, defined in DNA_space_types.h
2017-12-04 13:09:13 +01:00