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-03 11:55:07 +0300
committerAntonioya <blendergit@gmail.com>2018-10-03 11:55:26 +0300
commit8d26705b3e4e780145d43cfde0c1a2c302c425e0 (patch)
tree9a8b5369b492f55cf6f16bdbb54238216d49ec60 /source/blender/makesrna/intern/rna_gpencil.c
parent2d21eb79ad48485bc7b3385d6df5c2c25fd88ee0 (diff)
GP: Add z-depth offset parameter
This parameter allows to define the percentage of offset of a stroke when uses surface mode. Before, this was a fixed value, but for some artists' purposes, it's good to have the option to change it.
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c
index b0276eddac7..0cd738a9552 100644
--- a/source/blender/makesrna/intern/rna_gpencil.c
+++ b/source/blender/makesrna/intern/rna_gpencil.c
@@ -1404,6 +1404,14 @@ static void rna_def_gpencil_data(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Onion Opacity", "Change fade opacity of displayed onion frames");
RNA_def_property_update(prop, NC_GPENCIL | ND_DATA, "rna_GPencil_update");
+ prop = RNA_def_property(srna, "zdepth_offset", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "zdepth_offset");
+ RNA_def_property_range(prop, 0.0f, 1.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.001, 5);
+ 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");
+
/* API Functions */
func = RNA_def_function(srna, "clear", "rna_GPencil_clear");
RNA_def_function_ui_description(func, "Remove all the grease pencil data");