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:
authorAntonioya <blendergit@gmail.com>2019-05-02 11:08:59 +0300
committerAntonioya <blendergit@gmail.com>2019-05-02 11:08:59 +0300
commit8c478bb915128a6ca7945ca7a82ecaedbbc0f3e0 (patch)
tree2159f720f07cafe28a3d151320382cd00aaa3ede /source/blender/makesrna/intern/rna_gpencil.c
parent2b88ed30cc39977685552076f2e4ef20c85bf301 (diff)
GPencil: Add API property to check annotations
This new property allows to check if the current datablock is an annotation or is used in a grease pencil object. This property is required for some Add-ons.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index f87bb69a94f..737dbe36d17 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1819,6 +1819,11 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Surface Offset", "Offset amount when drawing in surface mode");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
+ prop = RNA_def_property(srna, "is_annotation", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DATA_ANNOTATIONS);
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Annotation", "Current datablock is an annotation");
+
/* Nested Structs */
prop = RNA_def_property(srna, "grid", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);