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:
authorYimingWu <xp8110@outlook.com>2021-10-26 17:55:27 +0300
committerYimingWu <xp8110@outlook.com>2021-10-26 18:02:17 +0300
commitc3ef1c15f5653ac323f4d077c7faf7b46f3eee0d (patch)
tree1fb6402cfb8c65a8a6b9268349450f5072ea6550 /source/blender/makesrna
parent52ccb445011dddd73dde5ee9d7ba29f678e0d076 (diff)
LineArt: Stroke offset towards camera.
Allows the user to turn off in_front option for grease pencil object and offset strokes towards camera to allow depth interaction of the rest of the scene. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12046
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 631d5822c5e..29689a2b281 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -3200,6 +3200,14 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
"separate stroke for each overlapping type");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "stroke_depth_offset", PROP_FLOAT, PROP_DISTANCE);
+ RNA_def_property_ui_text(prop,
+ "Stroke Depth Offset",
+ "Move strokes slightly towards the camera to avoid clipping while "
+ "preserve depth for the viewport");
+ RNA_def_property_ui_range(prop, 0.0f, 0.5f, 0.001f, 4);
+ RNA_def_property_update(prop, NC_SCENE, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "source_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, modifier_lineart_source_type);
RNA_def_property_ui_text(prop, "Source Type", "Line art stroke source type");