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>2018-10-09 00:21:44 +0300
committerAntonioya <blendergit@gmail.com>2018-10-09 00:21:44 +0300
commit11877e5bec4c590e51565c7e6191b33957dddc1c (patch)
tree1dd7fd16218169ac68069b779ec47eb3c665ea65 /source/blender/makesrna/intern/rna_gpencil.c
parente1293da01404ce2ae865e8a184c444715f747431 (diff)
GP: New Canvas offset parameters
Now the canvas can me moved in X/Y axis.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index d5717a06eda..a02868622e4 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1279,6 +1279,13 @@ static void rna_def_gpencil_grid(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Grid Subdivisions", "Number of subdivisions in each side of symmetry line");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+ prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_XYZ);
+ RNA_def_property_float_sdna(prop, NULL, "offset");
+ RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
+ RNA_def_property_array(prop, 2);
+ RNA_def_property_ui_text(prop, "Offset", "Offset of the canvas");
+ RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
+
prop = RNA_def_property(srna, "axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "axis");
RNA_def_property_enum_items(prop, rna_enum_gpencil_grid_axis_items);