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:
authorJoshua Leung <aligorith@gmail.com>2014-10-15 03:56:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-10-15 18:56:32 +0400
commitbfde694bd0a1ee557cb470af89fb866d90d1e29f (patch)
treeea961972e984d12bd6df304f82e8fc8356808054
parentcfba27d33cd9a4ee0b4dbf15593e062777aae855 (diff)
Bugfix T42225: Python - GreasePencil.active incorrectly accepts GreasePencil type instead of GPencilLayer
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index cdedb3576b0..c4677710676 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -101,6 +101,8 @@ static void rna_GPencil_active_layer_set(PointerRNA *ptr, PointerRNA value)
gl->flag &= ~GP_LAYER_ACTIVE;
}
}
+
+ WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL);
}
}
@@ -586,7 +588,7 @@ static void rna_def_gpencil_layers_api(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
prop = RNA_def_property(srna, "active", PROP_POINTER, PROP_NONE);
- RNA_def_property_struct_type(prop, "GreasePencil");
+ RNA_def_property_struct_type(prop, "GPencilLayer");
RNA_def_property_pointer_funcs(prop, "rna_GPencil_active_layer_get", "rna_GPencil_active_layer_set", NULL, NULL);
RNA_def_property_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Active Layer", "Active grease pencil layer");