[Bf-blender-cvs] [992f9147f9f] temp-lineart-contained: LineArt: Use name "stroke depth offset"
YimingWu
noreply at git.blender.org
Fri Aug 20 08:04:20 CEST 2021
Commit: 992f9147f9f9242af36a2068bee2ab3850300654
Author: YimingWu
Date: Fri Aug 20 14:01:46 2021 +0800
Branches: temp-lineart-contained
https://developer.blender.org/rB992f9147f9f9242af36a2068bee2ab3850300654
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 ab56b6b0119..5b0133e39b4 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -733,7 +733,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 dbe908cf334..516e4c77be5 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -4320,7 +4320,7 @@ static LineartBoundingArea *lineart_bounding_area_next(LineartBoundingArea *this
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);
@@ -4447,9 +4447,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 4b76a58dd71..4224a395774 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,\
}
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 9033b1a1282..aa37c97a33a 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -1003,7 +1003,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 a396f2ed19f..e3144903500 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