[Bf-blender-cvs] [02910390793] master: LibOverride: Add minimal support of liboverrides to shapekeys.

Bastien Montagne noreply at git.blender.org
Tue Jun 30 12:19:19 CEST 2020


Commit: 029103907937566c3cc2d3fd058e22a7040c6d1c
Author: Bastien Montagne
Date:   Tue Jun 30 12:06:24 2020 +0200
Branches: master
https://developer.blender.org/rB029103907937566c3cc2d3fd058e22a7040c6d1c

LibOverride: Add minimal support of liboverrides to shapekeys.

===================================================================

M	source/blender/makesrna/intern/rna_key.c
M	source/blender/makesrna/intern/rna_object.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_key.c b/source/blender/makesrna/intern/rna_key.c
index 7955109d9bc..f0de7317913 100644
--- a/source/blender/makesrna/intern/rna_key.c
+++ b/source/blender/makesrna/intern/rna_key.c
@@ -918,6 +918,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
    * (to test results) */
   prop = RNA_def_property(srna, "value", PROP_FLOAT, PROP_FACTOR);
   RNA_def_property_float_sdna(prop, NULL, "curval");
+  RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_float_funcs(prop, NULL, "rna_ShapeKey_value_set", "rna_ShapeKey_value_range");
   RNA_def_property_ui_range(prop, -10.0f, 10.0f, 10, 3);
   RNA_def_property_ui_text(prop, "Value", "Value of shape key at the current frame");
@@ -944,6 +945,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", KEYBLOCK_MUTE);
+  RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_ui_text(prop, "Mute", "Toggle this shape key");
   RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1);
   RNA_def_property_update(prop, 0, "rna_Key_update_data");
@@ -966,6 +968,7 @@ static void rna_def_keyblock(BlenderRNA *brna)
   prop = RNA_def_property(srna, "data", PROP_COLLECTION, PROP_NONE);
   RNA_def_property_collection_sdna(prop, NULL, "data", "totelem");
   RNA_def_property_struct_type(prop, "UnknownType");
+  RNA_def_property_override_flag(prop, PROPOVERRIDE_IGNORE);
   RNA_def_property_ui_text(prop, "Data", "");
   RNA_def_property_collection_funcs(prop,
                                     "rna_ShapeKey_data_begin",
@@ -1028,6 +1031,7 @@ static void rna_def_key(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "key_blocks", PROP_COLLECTION, PROP_NONE);
   RNA_def_property_collection_sdna(prop, NULL, "block", NULL);
+  RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_struct_type(prop, "ShapeKey");
   RNA_def_property_ui_text(prop, "Key Blocks", "Shape keys");
 
@@ -1051,6 +1055,7 @@ static void rna_def_key(BlenderRNA *brna)
   prop = RNA_def_property(srna, "eval_time", PROP_FLOAT, PROP_NONE);
   RNA_def_property_float_sdna(prop, NULL, "ctime");
   RNA_def_property_range(prop, MINFRAME, MAXFRAME);
+  RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_ui_text(prop, "Evaluation Time", "Evaluation time for absolute shape keys");
   RNA_def_property_update(prop, 0, "rna_Key_update_data");
 }
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index baa5b50104b..22a1c9dcdf6 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -3277,6 +3277,7 @@ static void rna_def_object(BlenderRNA *brna)
   prop = RNA_def_property(srna, "active_shape_key_index", PROP_INT, PROP_NONE);
   RNA_def_property_int_sdna(prop, NULL, "shapenr");
   RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* XXX this is really unpredictable... */
+  RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
   RNA_def_property_int_funcs(prop,
                              "rna_Object_active_shape_key_index_get",
                              "rna_Object_active_shape_key_index_set",



More information about the Bf-blender-cvs mailing list