Commit: 53e4a18cdf6c96d1acd941851a6d831a7cc22f25
Author: Brecht Van Lommel
Date:   Fri Mar 1 13:39:30 2019 +0100
Branches: master
https://developer.blender.org/rB53e4a18cdf6c96d1acd941851a6d831a7cc22f25

Collections: mark visibility properties as not animatable.

Better to communicate the current state clearly until this is supported,
for now only object visibility can be animated.

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

M       source/blender/makesrna/intern/rna_collection.c
M       source/blender/makesrna/intern/rna_layer.c
M       source/blender/makesrna/intern/rna_object.c

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

diff --git a/source/blender/makesrna/intern/rna_collection.c 
b/source/blender/makesrna/intern/rna_collection.c
index 0e698a966f4..f98bbc90a9d 100644
--- a/source/blender/makesrna/intern/rna_collection.c
+++ b/source/blender/makesrna/intern/rna_collection.c
@@ -350,6 +350,7 @@ void RNA_def_collections(BlenderRNA *brna)
        prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", 
COLLECTION_RESTRICT_SELECT);
        RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
+       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, -1);
        RNA_def_property_ui_text(prop, "Disable Select", "Disable collection 
for viewport selection");
        RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, 
"rna_Collection_flag_update");
@@ -357,6 +358,7 @@ void RNA_def_collections(BlenderRNA *brna)
        prop = RNA_def_property(srna, "hide_viewport", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", 
COLLECTION_RESTRICT_VIEW);
        RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
+       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, -1);
        RNA_def_property_ui_text(prop, "Disable Viewport", "Disable collection 
in viewport");
        RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, 
"rna_Collection_flag_update");
@@ -364,6 +366,7 @@ void RNA_def_collections(BlenderRNA *brna)
        prop = RNA_def_property(srna, "hide_render", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", 
COLLECTION_RESTRICT_RENDER);
        RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
+       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_RENDER_OFF, -1);
        RNA_def_property_ui_text(prop, "Disable Render", "Disable collection in 
renders");
        RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, 
"rna_Collection_flag_update");
diff --git a/source/blender/makesrna/intern/rna_layer.c 
b/source/blender/makesrna/intern/rna_layer.c
index edd9054a6b6..527c530f493 100644
--- a/source/blender/makesrna/intern/rna_layer.c
+++ b/source/blender/makesrna/intern/rna_layer.c
@@ -285,6 +285,7 @@ static void rna_def_layer_collection(BlenderRNA *brna)
        prop = RNA_def_property(srna, "hide_viewport", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", 
LAYER_COLLECTION_RESTRICT_VIEW);
        RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
+       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, -1);
        RNA_def_property_ui_text(prop, "Disable Viewport", "Disable collection 
in viewport for this view layer");
        RNA_def_property_update(prop, NC_SCENE | ND_LAYER_CONTENT, 
"rna_LayerCollection_update");
diff --git a/source/blender/makesrna/intern/rna_object.c 
b/source/blender/makesrna/intern/rna_object.c
index 86d3a4fde29..2a0dde460dd 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -2571,6 +2571,7 @@ static void rna_def_object(BlenderRNA *brna)
 
        prop = RNA_def_property(srna, "hide_select", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", 
OB_RESTRICT_SELECT);
+       RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
        RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_STATIC);
        RNA_def_property_ui_text(prop, "Disable Select", "Disable object 
selection in the viewport");
        RNA_def_property_ui_icon(prop, ICON_RESTRICT_SELECT_OFF, -1);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to