[Bf-blender-cvs] [6b1650a695c] lineart-shadow: LineArt: Use name "stroke depth offset"
YimingWu
noreply at git.blender.org
Fri Aug 20 08:02:44 CEST 2021
Commit: 6b1650a695c8fd940ced613261eedb99e8bf32ed
Author: YimingWu
Date: Fri Aug 20 14:01:46 2021 +0800
Branches: lineart-shadow
https://developer.blender.org/rB6b1650a695c8fd940ced613261eedb99e8bf32ed
LineArt: Use name "stroke depth offset"
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
M source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M source/blender/makesdna/DNA_gpencil_modifier_defaults.h
M source/blender/makesdna/DNA_gpencil_modifier_types.h
M source/blender/makesrna/intern/rna_gpencil_modifier.c
===================================================================
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index dd78b8c3daf..2880b5e8347 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -759,7 +759,7 @@ static void composition_panel_draw(const bContext *UNUSED(C), Panel *panel)
uiLayout *col = uiLayoutColumn(layout, false);
uiLayoutSetActive(col, !show_in_front);
- uiItemR(col, ptr, "stroke_offset", UI_ITEM_R_SLIDER, NULL, ICON_NONE);
+ uiItemR(col, ptr, "stroke_depth_offset", UI_ITEM_R_SLIDER, IFACE_("Depth Offset"), ICON_NONE);
uiItemR(col, ptr, "offset_towards_custom_camera", 0, IFACE_("Towards Custom Camera"), ICON_NONE);
}
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index ffeb086f92f..daf625e775c 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -5190,7 +5190,7 @@ static void lineart_transform_and_add_shadow(LineartRenderBuffer *rb,
bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph,
LineartGpencilModifierData *lmd,
LineartCache **cached_result,
- bool enable_stroke_offset)
+ bool enable_stroke_depth_offset)
{
LineartRenderBuffer *rb;
Scene *scene = DEG_get_evaluated_scene(depsgraph);
@@ -5325,9 +5325,9 @@ bool MOD_lineart_compute_feature_lines(Depsgraph *depsgraph,
MOD_lineart_chain_split_angle(rb, rb->angle_splitting_threshold);
}
- if (enable_stroke_offset && lmd->stroke_offset > FLT_EPSILON) {
+ if (enable_stroke_depth_offset && lmd->stroke_depth_offset > FLT_EPSILON) {
MOD_lineart_chain_offset_towards_camera(
- rb, lmd->stroke_offset, lmd->flags & LRT_GPENCIL_OFFSET_TOWARDS_CUSTOM_CAMERA);
+ rb, lmd->stroke_depth_offset, lmd->flags & LRT_GPENCIL_OFFSET_TOWARDS_CUSTOM_CAMERA);
}
/* Finally transfer the result list into cache. */
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
index a96f17530f2..9a36d3b8164 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
@@ -308,7 +308,7 @@
LRT_USE_CREASE_ON_SHARP_EDGES | LRT_FILTER_FACE_MARK_KEEP_CONTOUR, \
.angle_splitting_threshold = DEG2RAD(60.0f), \
.chaining_image_threshold = 0.001f, \
- .stroke_offset = 0.05,\
+ .stroke_depth_offset = 0.05,\
.chain_smooth_tolerance = 0.0f,\
.overscan = 0.1f,\
.shadow_camera_near = 0.1f, \
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 4414e9bc9d8..0febf002a86 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -1010,7 +1010,7 @@ typedef struct LineartGpencilModifierData {
int flags;
/* Move strokes towards camera to avoid clipping while preserve depth for the viewport. */
- float stroke_offset;
+ float stroke_depth_offset;
/* Runtime data. */
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 92ca049d3e4..d88e2509d06 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -3053,9 +3053,9 @@ static void rna_def_modifier_gpencillineart(BlenderRNA *brna)
"Offset strokes towards selected camera instead of the active camera");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "stroke_offset", PROP_FLOAT, PROP_DISTANCE);
+ prop = RNA_def_property(srna, "stroke_depth_offset", PROP_FLOAT, PROP_DISTANCE);
RNA_def_property_ui_text(prop,
- "Stroke Offset",
+ "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);
More information about the Bf-blender-cvs
mailing list