diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-27 19:09:30 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-28 18:35:12 +0300 |
commit | 846d265a06e39c86574cba6722495b6373596c7a (patch) | |
tree | c8534796d130c03faa4bcdc3d7fa558f1a361113 /source/blender/makesrna/intern/rna_layer.c | |
parent | 7895c6b83db862b13afee1facd8b6dc5e24dbede (diff) |
Split base flags on own and collection-defined
This allows to update base flags to a proper state then object's restriction
flags are changed, without requiring to re-evaluate an entire tree of flags.
Some old unused flags are were removed by this change, and also disabling
menu items might not work the same as before. This is something we can bring
back if it's really needed (the way how flags are handled did change since
that interface code was done anyway, so code was looking weird anyway).
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4420
Diffstat (limited to 'source/blender/makesrna/intern/rna_layer.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_layer.c | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/source/blender/makesrna/intern/rna_layer.c b/source/blender/makesrna/intern/rna_layer.c index 808eb21b3fa..edd9054a6b6 100644 --- a/source/blender/makesrna/intern/rna_layer.c +++ b/source/blender/makesrna/intern/rna_layer.c @@ -227,26 +227,6 @@ static bool rna_LayerCollection_has_objects(LayerCollection *lc) return (lc->runtime_flag & LAYER_COLLECTION_HAS_OBJECTS) != 0; } -static bool rna_LayerCollection_has_visible_objects(LayerCollection *lc, ViewLayer *view_layer) -{ - if ((view_layer->runtime_flag & VIEW_LAYER_HAS_HIDE) && - !(lc->runtime_flag & LAYER_COLLECTION_HAS_VISIBLE_OBJECTS)) - { - return false; - } - return true; -} - -static bool rna_LayerCollection_has_hidden_objects(LayerCollection *lc, ViewLayer *view_layer) -{ - if ((view_layer->runtime_flag & VIEW_LAYER_HAS_HIDE) && - (lc->runtime_flag & LAYER_COLLECTION_HAS_HIDDEN_OBJECTS)) - { - return true; - } - return false; -} - static bool rna_LayerCollection_has_selected_objects(LayerCollection *lc, ViewLayer *view_layer) { return BKE_layer_collection_has_selected_objects(view_layer, lc); @@ -319,18 +299,6 @@ static void rna_def_layer_collection(BlenderRNA *brna) RNA_def_function_ui_description(func, ""); RNA_def_function_return(func, RNA_def_boolean(func, "result", 0, "", "")); - func = RNA_def_function(srna, "has_visible_objects", "rna_LayerCollection_has_visible_objects"); - RNA_def_function_ui_description(func, ""); - prop = RNA_def_pointer(func, "view_layer", "ViewLayer", "", "ViewLayer the layer collection belongs to"); - RNA_def_parameter_flags(prop, 0, PARM_REQUIRED); - RNA_def_function_return(func, RNA_def_boolean(func, "result", 0, "", "")); - - func = RNA_def_function(srna, "has_hidden_objects", "rna_LayerCollection_has_hidden_objects"); - RNA_def_function_ui_description(func, ""); - prop = RNA_def_pointer(func, "view_layer", "ViewLayer", "", "ViewLayer the layer collection belongs to"); - RNA_def_parameter_flags(prop, 0, PARM_REQUIRED); - RNA_def_function_return(func, RNA_def_boolean(func, "result", 0, "", "")); - func = RNA_def_function(srna, "has_selected_objects", "rna_LayerCollection_has_selected_objects"); RNA_def_function_ui_description(func, ""); prop = RNA_def_pointer(func, "view_layer", "ViewLayer", "", "ViewLayer the layer collection belongs to"); |