Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_armature.c')
-rw-r--r--source/blender/makesrna/intern/rna_armature.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c
index 7bc09b052ee..a2124b4067d 100644
--- a/source/blender/makesrna/intern/rna_armature.c
+++ b/source/blender/makesrna/intern/rna_armature.c
@@ -48,29 +48,17 @@
static void rna_Armature_update_data(bContext *C, PointerRNA *ptr)
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
ID *id= ptr->id.data;
- Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next) {
- if(ob->data == id) {
- /* XXX this will loop over all objects again (slow) */
- DAG_object_flush_update(scene, ob, OB_RECALC_DATA);
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
- }
- }
+ DAG_id_flush_update(id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
static void rna_Armature_redraw_data(bContext *C, PointerRNA *ptr)
{
- Main *bmain= CTX_data_main(C);
ID *id= ptr->id.data;
- Object *ob;
- for(ob=bmain->object.first; ob; ob= ob->id.next)
- if(ob->data == id)
- WM_event_add_notifier(C, NC_OBJECT|ND_GEOM_DATA, ob);
+ WM_event_add_notifier(C, NC_GEOM|ND_DATA, id);
}
static void rna_bone_layer_set(short *layer, const int *values)
@@ -337,7 +325,7 @@ static void rna_def_bone_common(StructRNA *srna, int editbone)
RNA_def_property_update(prop, 0, "rna_Armature_redraw_data");
/* flags */
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 16);
if(editbone) RNA_def_property_boolean_funcs(prop, "rna_EditBone_layer_get", "rna_EditBone_layer_set");
@@ -612,7 +600,7 @@ void rna_def_armature(BlenderRNA *brna)
/* Boolean values */
/* layer */
- prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "layer", PROP_BOOLEAN, PROP_LAYER_MEMBER);
RNA_def_property_boolean_sdna(prop, NULL, "layer", 1);
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Visible Layers", "Armature layer visibility.");
@@ -621,7 +609,7 @@ void rna_def_armature(BlenderRNA *brna)
RNA_def_property_flag(prop, PROP_LIB_EXCEPTION);
/* layer protection */
- prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_NONE);
+ prop= RNA_def_property(srna, "layer_protection", PROP_BOOLEAN, PROP_LAYER);
RNA_def_property_boolean_sdna(prop, NULL, "layer_protected", 1);
RNA_def_property_array(prop, 16);
RNA_def_property_ui_text(prop, "Layer Proxy Protection", "Protected layers in Proxy Instances are restored to Proxy settings on file reload and undo.");