RNA: support setting default values for custom properties.
authorAlexander Gavrilov <angavrilov@gmail.com>
Sat, 15 Dec 2018 19:37:12 +0000 (22:37 +0300)
committerAlexander Gavrilov <angavrilov@gmail.com>
Wed, 19 Dec 2018 11:20:35 +0000 (14:20 +0300)
commit61c941f040d367d18fcaa57c9e8e0c2078193d97
tree9cf843e4f19fffda991afb77595ec4d287a0b142
parent908a2742403b279cd6dfa5c27acb76d68d3f1523
RNA: support setting default values for custom properties.

NLA requires a usable default value for all properties that
are to be animated via it, without any exceptions. This is
the real cause of T36496: using the default of 0 for a scale
related custom property obviously doesn't work.

Thus, to really fix this it is necessary to support configurable
default values for custom properties, which are very frequently
used in rigs for auxiliary settings. For common use it is enough
to support this for scalar float and integer properties.

The default can be set via the custom property configuration
popup, or a right click menu option. In addition, to help in
updating old rigs, an operator that saves current values as
defaults for all object and bone properties is added.

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D4084
release/scripts/modules/rna_prop_ui.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/editors/interface/interface_context_menu.c
source/blender/editors/interface/interface_ops.c
source/blender/makesrna/RNA_access.h
source/blender/makesrna/intern/rna_access.c