[Bf-blender-cvs] [53da19d2794] greasepencil-object: GPencil: Add RNA properties for stroke bound box

Antonio Vazquez noreply at git.blender.org
Sat Feb 15 16:15:35 CET 2020


Commit: 53da19d2794892d5076c140c876f18eeb17daef7
Author: Antonio Vazquez
Date:   Sat Feb 15 15:41:10 2020 +0100
Branches: greasepencil-object
https://developer.blender.org/rB53da19d2794892d5076c140c876f18eeb17daef7

GPencil: Add RNA properties for stroke bound box

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

M	source/blender/makesrna/intern/rna_gpencil.c

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

diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index 1a3184da36b..55022cd11dc 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1208,6 +1208,19 @@ static void rna_def_gpencil_stroke(BlenderRNA *brna)
   RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0);
   RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
 
+  /* Stroke bound box */
+  prop = RNA_def_property(srna, "bound_box_min", PROP_FLOAT, PROP_XYZ);
+  RNA_def_property_float_sdna(prop, NULL, "boundbox_min");
+  RNA_def_property_array(prop, 3);
+  RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+  RNA_def_property_ui_text(prop, "Boundbox Min", "");
+
+  prop = RNA_def_property(srna, "bound_box_max", PROP_FLOAT, PROP_XYZ);
+  RNA_def_property_float_sdna(prop, NULL, "boundbox_max");
+  RNA_def_property_array(prop, 3);
+  RNA_def_property_clear_flag(prop, PROP_EDITABLE);
+  RNA_def_property_ui_text(prop, "Boundbox Max", "");
+
   /* gradient shape ratio */
   prop = RNA_def_property(srna, "aspect", PROP_FLOAT, PROP_XYZ);
   RNA_def_property_float_sdna(prop, NULL, "aspect_ratio");



More information about the Bf-blender-cvs mailing list