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:
authorAntonio Vazquez <blendergit@gmail.com>2020-08-13 11:01:23 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-08-13 11:01:23 +0300
commit2f68c9fc684bce87eb07047c786d9f958f5cd8ab (patch)
tree4774103fa2c1688d590cae9248b8123bd581d9f5 /source/blender/makesrna
parent4b93cdc98a5a8df681ea6233f948caf896a54406 (diff)
parent7c380119a7089ed98a280bc3d2202c0345a0d1c7 (diff)
Merge branch 'master' into greasepencil-edit-curve
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_brush.c39
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c4
2 files changed, 40 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 38916e2a45a..a3fa4fed575 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -1997,6 +1997,31 @@ static void rna_def_brush(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL},
};
+ static const EnumPropertyItem brush_boundary_falloff_type_items[] = {
+ {BRUSH_BOUNDARY_FALLOFF_CONSTANT,
+ "CONSTANT",
+ 0,
+ "Constant",
+ "Applies the same deformation in the entire boundary"},
+ {BRUSH_BOUNDARY_FALLOFF_RADIUS,
+ "RADIUS",
+ 0,
+ "Brush Radius",
+ "Applies the deformation in a localiced area limited by the brush radius"},
+ {BRUSH_BOUNDARY_FALLOFF_LOOP,
+ "LOOP",
+ 0,
+ "Loop",
+ "Applies the brush falloff in a loop pattern"},
+ {BRUSH_BOUNDARY_FALLOFF_LOOP_INVERT,
+ "LOOP_INVERT",
+ 0,
+ "Loop and Invert",
+ "Applies the fallof radius in a loop pattern, inverting the displacement direction in each "
+ "pattern repetition"},
+ {0, NULL, 0, NULL, NULL},
+ };
+
static const EnumPropertyItem brush_cloth_simulation_area_type_items[] = {
{BRUSH_CLOTH_SIMULATION_AREA_LOCAL,
"LOCAL",
@@ -2194,6 +2219,12 @@ static void rna_def_brush(BlenderRNA *brna)
"Part of the mesh that is going to be simulated when the stroke is active");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "boundary_falloff_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_items(prop, brush_boundary_falloff_type_items);
+ RNA_def_property_ui_text(
+ prop, "Boundary Falloff", "How the brush falloff is applied across the boundary");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "smooth_deform_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, brush_smooth_deform_type_items);
RNA_def_property_ui_text(prop, "Deformation", "Deformation type that is used in the brush");
@@ -2545,6 +2576,14 @@ static void rna_def_brush(BlenderRNA *brna)
"Maximum distance to search for disconnected loose parts in the mesh");
RNA_def_property_update(prop, 0, "rna_Brush_update");
+ prop = RNA_def_property(srna, "boundary_offset", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "boundary_offset");
+ RNA_def_property_range(prop, 0.0f, 30.0f);
+ RNA_def_property_ui_text(prop,
+ "Boundary Origin Offset",
+ "Offset of the boundary origin in relation to the brush radius");
+ RNA_def_property_update(prop, 0, "rna_Brush_update");
+
prop = RNA_def_property(srna, "surface_smooth_shape_preservation", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_float_sdna(prop, NULL, "surface_smooth_shape_preservation");
RNA_def_property_range(prop, 0.0f, 1.0f);
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 609340888e1..ab6b60603c7 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -713,7 +713,6 @@ bool rna_Object_generate_gpencil_strokes(Object *ob,
bContext *C,
ReportList *reports,
Object *ob_gpencil,
- bool gpencil_lines,
bool use_collections,
float scale_thickness,
float sample)
@@ -729,7 +728,7 @@ bool rna_Object_generate_gpencil_strokes(Object *ob,
Scene *scene = CTX_data_scene(C);
BKE_gpencil_convert_curve(
- bmain, scene, ob_gpencil, ob, gpencil_lines, use_collections, scale_thickness, sample);
+ bmain, scene, ob_gpencil, ob, use_collections, scale_thickness, sample);
WM_main_add_notifier(NC_GPENCIL | ND_DATA, NULL);
@@ -1199,7 +1198,6 @@ void RNA_api_object(StructRNA *srna)
"",
"Grease Pencil object used to create new strokes");
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
- parm = RNA_def_boolean(func, "gpencil_lines", false, "", "Create Lines");
parm = RNA_def_boolean(func, "use_collections", true, "", "Use Collections");
parm = RNA_def_float(
func, "scale_thickness", 1.0f, 0.0f, FLT_MAX, "", "Thickness scaling factor", 0.0f, 100.0f);