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:
authorYimingWu <xp8110@outlook.com>2022-03-25 15:13:04 +0300
committerYimingWu <xp8110@outlook.com>2022-03-25 15:13:50 +0300
commit97f2210157dbd36bc0a44674c8470202fe808301 (patch)
tree75d0a16414d6539d1feca9ed52e92fb2cfbc5973 /source/blender/makesrna
parentd4e1458db3a0e0eaf80219dc8e6d10cb27620793 (diff)
GPencil: Cyclic flag for dot dash modifier
Cyclic option per segment, allows interesting "loop" visual effects. Reviewed by: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D14439
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index bf3f506251c..9e25ddaf790 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -3743,6 +3743,11 @@ static void rna_def_modifier_gpencildash(BlenderRNA *brna)
"Use this index on generated segment. -1 means using the existing material");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "use_cyclic", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DASH_USE_CYCLIC);
+ RNA_def_property_ui_text(prop, "Use Cyclic", "Enable cyclic on individual stroke dashes");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
srna = RNA_def_struct(brna, "DashGpencilModifierData", "GpencilModifier");
RNA_def_struct_ui_text(srna, "Dash Modifier", "Create dot-dash effect for strokes");
RNA_def_struct_sdna(srna, "DashGpencilModifierData");
@@ -3794,17 +3799,17 @@ static void rna_def_modifier_gpencildash(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "invert_layers", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LENGTH_INVERT_LAYER);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DASH_INVERT_LAYER);
RNA_def_property_ui_text(prop, "Inverse Layers", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "invert_materials", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LENGTH_INVERT_MATERIAL);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DASH_INVERT_MATERIAL);
RNA_def_property_ui_text(prop, "Inverse Materials", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LENGTH_INVERT_PASS);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DASH_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -3815,7 +3820,7 @@ static void rna_def_modifier_gpencildash(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
prop = RNA_def_property(srna, "invert_layer_pass", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LENGTH_INVERT_LAYERPASS);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_DASH_INVERT_LAYERPASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");