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:
authorHans Goudey <h.goudey@me.com>2020-06-19 21:42:08 +0300
committerHans Goudey <h.goudey@me.com>2020-06-19 21:42:08 +0300
commitec963d9d7d179e3ba12f5bdf748818939c2f17d8 (patch)
tree099996a967053ba95d14eaeaa1df8d602ebbfd23 /source/blender/makesrna/intern/rna_gpencil_modifier.c
parentfb7d8e2f4b87307a749537f16e80800af09cf5ae (diff)
UI: Grease Pencil Modifier Drag and Drop, Layout Changes
This patch implements the list panel system D7490 for grease pencil modifiers. It also moves their drawing to a callback in GpencilModifierTypeInfo in line with the extensible architecture refactoring goal T75724. This also adds the "set_error" function for grease pencil modifiers, which hadn't been copied from mesh modifiers yet. The implementation is basically exactly the same as for the modifier patch (9b099c86123fc82). Thanks to Matias Mendiola (mendio) for providing mockups for many of the layout changes. Differential Revision: https://developer.blender.org/D7978
Diffstat (limited to 'source/blender/makesrna/intern/rna_gpencil_modifier.c')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 3a8ded1a275..06bec3bf944 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -1490,7 +1490,7 @@ static void rna_def_modifier_gpencilarray(BlenderRNA *brna)
RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 1, RNA_TRANSLATION_PREC_DEFAULT);
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "relative_offset", PROP_FLOAT, PROP_NONE);
+ prop = RNA_def_property(srna, "relative_offset", PROP_FLOAT, PROP_XYZ);
RNA_def_property_float_sdna(prop, NULL, "shift");
RNA_def_property_ui_text(
prop,
@@ -2127,8 +2127,7 @@ static void rna_def_modifier_gpencilmultiply(BlenderRNA *brna)
prop = RNA_def_property(srna, "use_fade", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flags", GP_MULTIPLY_ENABLE_FADING);
- RNA_def_property_ui_text(
- prop, "Enable Fade", "Fade the stroke thickness for each generated stroke");
+ RNA_def_property_ui_text(prop, "Fade", "Fade the stroke thickness for each generated stroke");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "split_angle", PROP_FLOAT, PROP_ANGLE);
@@ -2183,12 +2182,12 @@ static void rna_def_modifier_gpenciltexture(BlenderRNA *brna)
{GP_TEX_CONSTANT_LENGTH,
"CONSTANT_LENGTH",
0,
- "Keep Texture at Constant Length",
+ "Constant Length",
"Keep the texture at a constant length regardless of the length of each stroke"},
{GP_TEX_FIT_STROKE,
"FIT_STROKE",
0,
- "Fit Texture to Stroke Length",
+ "Stroke Length",
"Scale the texture to fit the length of each stroke"},
{0, NULL, 0, NULL, NULL},
};
@@ -2269,7 +2268,7 @@ static void rna_def_modifier_gpenciltexture(BlenderRNA *brna)
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
RNA_def_property_ui_range(prop, -100.0, 100.0, 0.1, 3);
RNA_def_property_float_default(prop, 0.0f);
- RNA_def_property_ui_text(prop, "Offset UVs", "Offset value to add to stroke UVs");
+ RNA_def_property_ui_text(prop, "UV Offset", "Offset value to add to stroke UVs");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "uv_scale", PROP_FLOAT, PROP_NONE);
@@ -2360,7 +2359,7 @@ void RNA_def_greasepencil_modifier(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_flag(prop, PROP_NO_DEG_UPDATE);
- RNA_def_property_boolean_sdna(prop, NULL, "mode", eGpencilModifierMode_Expanded);
+ RNA_def_property_boolean_sdna(prop, NULL, "ui_expand_flag", 0);
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
RNA_def_property_ui_text(prop, "Expanded", "Set modifier expanded in the user interface");
RNA_def_property_ui_icon(prop, ICON_DISCLOSURE_TRI_RIGHT, 1);