[Bf-blender-cvs] [3a721b9cc28] temp-gpencil-bezier-stroke-type: GPencil: Rename curve_fit to bezier_mode
Antonio Vazquez
noreply at git.blender.org
Sat May 1 17:05:46 CEST 2021
Commit: 3a721b9cc2804c94ca67a2979af25aaa28667f5e
Author: Antonio Vazquez
Date: Sat May 1 17:05:41 2021 +0200
Branches: temp-gpencil-bezier-stroke-type
https://developer.blender.org/rB3a721b9cc2804c94ca67a2979af25aaa28667f5e
GPencil: Rename curve_fit to bezier_mode
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/makesdna/DNA_scene_types.h
M source/blender/makesrna/intern/rna_scene.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 529aca5c580..6d6125bea8b 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -662,10 +662,10 @@ class VIEW3D_HT_header(Header):
# Curve fit
row = layout.row(align=True)
- row.prop(tool_settings, "use_gpencil_curve_fit", text="",
+ row.prop(tool_settings, "use_gpencil_bezier_mode", text="",
icon='IPO_BEZIER')
sub = row.row(align=True)
- sub.active = tool_settings.use_gpencil_curve_fit
+ sub.active = tool_settings.use_gpencil_bezier_mode
sub.popover(
panel="VIEW3D_PT_gpencil_curve_fit",
text="Curve Fit",
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index c0f13fa4f06..1253c688bf4 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -945,7 +945,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
const bool is_depth = (bool)(align_flag & (GP_PROJECT_DEPTH_VIEW | GP_PROJECT_DEPTH_STROKE));
const bool is_lock_axis_view = (bool)(ts->gp_sculpt.lock_axis == 0);
const bool is_camera = is_lock_axis_view && (rv3d->persp == RV3D_CAMOB) && (!is_depth);
- const bool is_bezier_mode = ts->gpencil_flags & GP_TOOL_FLAG_CURVE_FIT;
+ const bool is_bezier_mode = ts->gpencil_flags & GP_TOOL_FLAG_BEZIER_MODE;
int totelem;
/* For very low pressure at the end, truncate stroke. */
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index 9eab03c988e..385af0b9faf 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -2289,7 +2289,7 @@ typedef enum eGPencil_Flags {
/* Automerge with last stroke */
GP_TOOL_FLAG_AUTOMERGE_STROKE = (1 << 5),
/* Convert all strokes to Bezier */
- GP_TOOL_FLAG_CURVE_FIT = (1 << 6),
+ GP_TOOL_FLAG_BEZIER_MODE = (1 << 6),
} eGPencil_Flags;
/** #Scene.r.simplify_gpencil */
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 34fa0b9d520..8cfd97f141d 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -3242,10 +3242,10 @@ static void rna_def_tool_settings(BlenderRNA *brna)
"Join by distance last drawn stroke with previous strokes in the active layer");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- prop = RNA_def_property(srna, "use_gpencil_curve_fit", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_CURVE_FIT);
+ prop = RNA_def_property(srna, "use_gpencil_bezier_mode", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gpencil_flags", GP_TOOL_FLAG_BEZIER_MODE);
RNA_def_property_boolean_default(prop, false);
- RNA_def_property_ui_text(prop, "Curve", "Convert all strokes to Bezier curves");
+ RNA_def_property_ui_text(prop, "Bezier Mode", "Convert all strokes to Bezier curves");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
prop = RNA_def_property(srna, "gpencil_sculpt", PROP_POINTER, PROP_NONE);
More information about the Bf-blender-cvs
mailing list