diff options
author | Antonioya <blendergit@gmail.com> | 2018-09-29 17:42:33 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-09-29 17:54:16 +0300 |
commit | 631ddc5acc1369b66450ebf7ef1f1e894f5e4223 (patch) | |
tree | 9750a57b6176d676d6cb75a2ad7c9ab2a7826cda /source/blender/makesrna | |
parent | 2ca67de9609e297ed608469fd6a0d3a9dd9cad2f (diff) |
GP: New parameters for instance modifier: Material and On Top
Now it's possible to define what material is used in the generated strokes and if the strokes are put in front of the original (default) or keep the original in front.
Before, the generated strokes have been always on top of the original because they were drawn later.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil_modifier.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c index 4afd6c4172d..b45ef341187 100644 --- a/source/blender/makesrna/intern/rna_gpencil_modifier.c +++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c @@ -922,6 +922,12 @@ static void rna_def_modifier_gpencilinstance(BlenderRNA *brna) RNA_def_property_range(prop, -10.0, 10.0); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "replace_material", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "mat_rpl"); + RNA_def_property_range(prop, 0, INT_MAX); + RNA_def_property_ui_text(prop, "Material", "Index of the material used for generated strokes (0 keep original material)"); + 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_INSTANCE_INVERT_LAYER); RNA_def_property_ui_text(prop, "Inverse Layers", "Inverse filter"); @@ -932,6 +938,11 @@ static void rna_def_modifier_gpencilinstance(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter"); RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); + prop = RNA_def_property(srna, "keep_on_top", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_INSTANCE_KEEP_ONTOP); + RNA_def_property_ui_text(prop, "Keep On Top", + "Keep the original stroke in front of new instances (only affect by layer)"); + RNA_def_property_update(prop, 0, "rna_GpencilModifier_update"); } static void rna_def_modifier_gpencilbuild(BlenderRNA *brna) |