First draft, proof-of-concept code of ID static override
Needs ReviewPublic

Authored by Bastien Montagne (mont29) on Dec 14 2016, 4:11 PM.

Details

Summary

This is very early version of override, obviously still very basic, limited and un-finished! Goal of this review is to ensure we agree on general code design for the feature, before starting implementing it fully.

This patch is hopefully not cluttered by too much 'details noise', and make general process to handle static override quite easy to follow.

Reminder: “static override” only allows overriding linked data. Since those do not change, we can evaluate static overrides once (when loading .blend, or re-loading a library). This could also be named 'partially localized data-blocks'. On the other hand, “dynamic override” would allow overriding local data, and would be handled by the depsgraph evaluation to generate final data.

A large part of the code should be sharable between both though, if we use same process (based on rna paths), only the place where application of override happens would change…

Right now, only object's location is overridden, you can test the code by:

  • Starting blender with new depsgraph (mandatory, automated override creation is not hooked into old one).
  • linking an object;
  • make an override of it (through operator in space-bar search menu);
  • change e.g. location, rotation and/or scale of the override;
  • save file;
  • open file again, and see that changed location/rotation/scale were kept.

You may also note that non-overridable properties remain grayed-out in UI.

Further more, to test & demonstrate differential override, scale is currently stored as a multiplication factor, which means that if you scale up or down your object in library file, it will scale accordingly in its overriden copy (once file is reloaded of course).

PS: for now, this is based on master, we can always merge blender2.8 in later when required...

Diff Detail

Repository
rB Blender
Branch
id_override_static
Build Status
Buildable 422
Build 422: arc lint + arc unit
Bastien Montagne (mont29) retitled this revision from to Quick and dirty hack to get overridable RNA prop flag..Dec 14 2016, 4:11 PM
Bastien Montagne (mont29) updated this object.
Bastien Montagne (mont29) retitled this revision from Quick and dirty hack to get overridable RNA prop flag. to First draft, proof-of-concept code of ID static override.Dec 14 2016, 4:22 PM
Bastien Montagne (mont29) updated this object.
  • Merge branch 'master' into override_static
  • Include "static override rules generator" operation into new depsgraph.
  • Add ways to forbid override/auto-override.
  • Merge branch 'master' into id_override_static
  • ID override static: Various minor fixes and tweaks.
  • Add first basic working auto-override.
  • More work and refactor in RNA override part mostly.
  • Add basic code to prevent editing non-overridable properties.
  • Merge branch 'master' into id_override_static
  • Merge branch 'master' into id_override_static
  • More WIP work towards supporting override differentila operations.
  • Merge branch 'master' into id_override_static
  • Working proof-of-concept of differential override operations.
  • Merge branch 'master' into id_override_static

Merge branch 'master' into id_override_static

  • Merge branch 'master' into id_override_static