[Bf-blender-cvs] [c1e69af7bc3] temp-gpencil-bezier-v2: GPencil: New Curve Generation Brush parameter
Antonio Vazquez
noreply at git.blender.org
Wed Jan 20 19:15:58 CET 2021
Commit: c1e69af7bc30a46cdc50614fa7ce97f8e4eb2af2
Author: Antonio Vazquez
Date: Wed Jan 20 19:15:46 2021 +0100
Branches: temp-gpencil-bezier-v2
https://developer.blender.org/rBc1e69af7bc30a46cdc50614fa7ce97f8e4eb2af2
GPencil: New Curve Generation Brush parameter
===================================================================
M release/scripts/startup/bl_ui/space_view3d_toolbar.py
M source/blender/makesdna/DNA_brush_enums.h
M source/blender/makesrna/intern/rna_brush.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index 60982421318..93afeec16be 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -1425,6 +1425,9 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
subcol.enabled = False
subcol.prop(gp_settings, "aspect")
+ col.separator()
+ col.prop(gp_settings, "use_curve_data")
+
elif brush.gpencil_tool == 'FILL':
row = col.row(align=True)
row.prop(gp_settings, "fill_draw_mode", text="Boundary")
@@ -1446,6 +1449,9 @@ class VIEW3D_PT_tools_grease_pencil_brush_advanced(View3DPanel, Panel):
sub.active = gp_settings.show_fill
sub.prop(gp_settings, "fill_threshold", text="")
+ col.separator()
+ col.prop(gp_settings, "use_curve_data")
+
class VIEW3D_PT_tools_grease_pencil_brush_stroke(Panel, View3DPanel):
bl_context = ".greasepencil_paint"
diff --git a/source/blender/makesdna/DNA_brush_enums.h b/source/blender/makesdna/DNA_brush_enums.h
index f12934c9104..30898d7420c 100644
--- a/source/blender/makesdna/DNA_brush_enums.h
+++ b/source/blender/makesdna/DNA_brush_enums.h
@@ -97,6 +97,8 @@ typedef enum eGPDbrush_Flag {
GP_BRUSH_OCCLUDE_ERASER = (1 << 15),
/* Post process trim stroke */
GP_BRUSH_TRIM_STROKE = (1 << 16),
+ /* Indicates that the stroke will be converted to a curve automatically. */
+ GP_BRUSH_CURVE_DATA = (1 << 17),
} eGPDbrush_Flag;
typedef enum eGPDbrush_Flag2 {
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 4f98c6e8e07..9e092055475 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1873,6 +1873,11 @@ static void rna_def_gpencil_options(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_OCCLUDE_ERASER);
RNA_def_property_ui_text(prop, "Occlude Eraser", "Erase only strokes visible and not occluded");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+
+ prop = RNA_def_property(srna, "use_curve_data", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BRUSH_CURVE_DATA);
+ RNA_def_property_ui_text(prop, "Generate Curve", "Create Curve data for the new stroke");
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
}
static void rna_def_brush(BlenderRNA *brna)
More information about the Bf-blender-cvs
mailing list