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:
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py339
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c19
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h6
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c13
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c7
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c5
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c8
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c5
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h56
-rw-r--r--source/blender/makesrna/intern/rna_gpencil_modifier.c198
20 files changed, 490 insertions, 216 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 36a5c91f44d..0196a61b2b4 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1638,59 +1638,65 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "full_stroke")
col.prop(md, "move_extreme")
- col = split.column()
- col.label(text="Layer:")
- row = col.row(align=True)
- row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
- row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.label(text="Affect:")
+ row = layout.row(align=True)
+ row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True)
+ row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True)
+ row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
+ row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True)
+ col = layout.column()
+ col.separator()
col.label(text="Vertex Group:")
row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Material:")
row = col.row(align=True)
row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Layer:")
+ row = col.row(align=True)
+ row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
row = layout.row(align=True)
- row.label(text="Affect:")
- row = layout.row(align=True)
- row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True)
- row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True)
- row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
- row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_SMOOTH(self, layout, ob, md):
gpd = ob.data
- row = layout.row(align=False)
- row.prop(md, "factor")
- row.prop(md, "step")
+ col = layout.column()
+ col.prop(md, "factor")
+ col.prop(md, "step")
- split = layout.split()
- col = split.column()
- col.label(text="Layer:")
+ col.label(text="Affect:")
row = col.row(align=True)
- row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
- row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True)
+ row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True)
+ row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
+ row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True)
- col = split.column()
+ col.separator()
col.label(text="Vertex Group:")
row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Material:")
row = col.row(align=True)
row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Layer:")
+ row = col.row(align=True)
+ row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
row = layout.row(align=True)
- row.label(text="Affect:")
- row = layout.row(align=True)
- row.prop(md, "use_edit_position", text="Position", icon='MESH_DATA', toggle=True)
- row.prop(md, "use_edit_strength", text="Strength", icon='COLOR', toggle=True)
- row.prop(md, "use_edit_thickness", text="Thickness", icon='LINE_DATA', toggle=True)
- row.prop(md, "use_edit_uv", text="UV", icon='MOD_UVPROJECT', toggle=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_SUBDIV(self, layout, ob, md):
gpd = ob.data
@@ -1700,15 +1706,21 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
row = col.row(align=True)
row.prop(md, "level")
row.prop(md, "simple", text="", icon='PARTICLE_POINT')
+
+ col = layout.column()
+ col.separator()
+ col.label(text="Material:")
row = col.row(align=True)
row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
- col = split.column()
col.label(text="Layer:")
row = col.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_SIMPLIFY(self, layout, ob, md):
gpd = ob.data
@@ -1728,14 +1740,20 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
row.enabled = not md.mode == 'FIXED'
row.prop(md, "factor")
- col = split.column()
- col.label(text="Layer:")
+ col = layout.column()
+ col.separator()
+ col.label(text="Material:")
row = col.row(align=True)
- row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "pass_index", text="Pass")
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Layer:")
row = col.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
+ row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_THICK(self, layout, ob, md):
gpd = ob.data
@@ -1744,23 +1762,9 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
row = col.row(align=True)
row.prop(md, "thickness")
- row = col.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
col.prop(md, "normalize_thickness")
- col = split.column()
- col.label(text="Layer:")
- row = col.row(align=True)
- row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
- row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
-
- col.label(text="Vertex Group:")
- row = col.row(align=True)
- row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
- row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
-
if not md.normalize_thickness:
split = layout.split()
col = split.column()
@@ -1769,6 +1773,26 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
if md.use_custom_curve:
col.template_curve_mapping(md, "curve")
+ col = layout.column()
+ col.separator()
+ col.label(text="Vertex Group:")
+ row = col.row(align=True)
+ row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+ row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+
+ col.label(text="Material:")
+ row = col.row(align=True)
+ row.prop(md, "pass_index", text="Pass")
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+ col.label(text="Layer:")
+ row = col.row(align=True)
+ row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+
def GP_TINT(self, layout, ob, md):
gpd = ob.data
split = layout.split()
@@ -1777,18 +1801,24 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "color")
col.prop(md, "factor")
- col = split.column()
+ row = layout.row()
+ row.prop(md, "create_materials")
+ row.prop(md, "modify_color")
+
+ col = layout.column()
+ col.separator()
+ col.label(text="Material:")
+ row = col.row(align=True)
+ row.prop(md, "pass_index", text="Pass")
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
col.label(text="Layer:")
row = col.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
- row = col.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
-
- row = layout.row()
- row.prop(md, "create_materials")
- row.prop(md, "modify_color")
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_TIME(self, layout, ob, md):
gpd = ob.data
@@ -1808,18 +1838,18 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "frame_scale")
row = layout.row()
+ row.enabled = md.mode != 'FIX'
+ row.prop(md, "use_keep_loop")
+
+ row = layout.row()
row.label(text="Layer:")
row = layout.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
row = layout.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
-
- row = layout.row()
- row.enabled = md.mode != 'FIX'
- row.prop(md, "use_keep_loop")
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_COLOR(self, layout, ob, md):
gpd = ob.data
@@ -1831,18 +1861,24 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "saturation", text="S")
col.prop(md, "value", text="V")
- col = split.column()
+ row = layout.row()
+ row.prop(md, "create_materials")
+ row.prop(md, "modify_color")
+
+ col = layout.column()
+ col.separator()
+ col.label(text="Material:")
+ row = col.row(align=True)
+ row.prop(md, "pass_index", text="Pass")
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
col.label(text="Layer:")
row = col.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
- row = col.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
-
- row = layout.row()
- row.prop(md, "create_materials")
- row.prop(md, "modify_color")
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_OPACITY(self, layout, ob, md):
gpd = ob.data
@@ -1852,24 +1888,29 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.label(text="Opacity:")
col.prop(md, "factor")
- col = split.column()
- col.label(text="Layer:")
- row = col.row(align=True)
- row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
- row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row()
+ row.prop(md, "create_materials")
+ row.prop(md, "modify_color")
+ col = layout.column()
+ col.separator()
col.label(text="Vertex Group:")
row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Material:")
row = col.row(align=True)
row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
- row = layout.row()
- row.prop(md, "create_materials")
- row.prop(md, "modify_color")
+ col.label(text="Layer:")
+ row = col.row(align=True)
+ row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_INSTANCE(self, layout, ob, md):
gpd = ob.data
@@ -1905,18 +1946,24 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "random_scale", text="", icon='TIME', toggle=True)
row.prop(md, "scale_factor", text="")
- split = layout.split()
- col = split.column()
+ col = layout.column()
+ col.prop(md, "replace_material", text="Material")
+ col.prop(md, "keep_on_top", text="Keep original stroke on top")
+
+ col = layout.column()
+ col.separator()
+ col.label(text="Material:")
+ row = col.row(align=True)
+ row.prop(md, "pass_index", text="Pass")
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
col.label(text="Layer:")
row = col.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
- row = col.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
-
- col.prop(md, "replace_material", text="Material")
- col.prop(md, "keep_on_top", text="Keep original stroke on top")
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_BUILD(self, layout, ob, md):
gpd = ob.data
@@ -1927,28 +1974,29 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "mode")
if md.mode == 'CONCURRENT':
col.prop(md, "concurrent_time_alignment")
- else:
- col.separator() # For spacing
- col.separator()
- col.separator()
+ col.separator()
col.prop(md, "transition")
sub = col.column(align=True)
sub.prop(md, "start_delay")
sub.prop(md, "length")
- col = split.column(align=True)
+ col = layout.column(align=True)
col.prop(md, "use_restrict_frame_range")
sub = col.column(align=True)
sub.active = md.use_restrict_frame_range
sub.prop(md, "frame_start", text="Start")
sub.prop(md, "frame_end", text="End")
- col.separator()
+ col = layout.column()
+ col.separator()
col.label(text="Layer:")
row = col.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_LATTICE(self, layout, ob, md):
gpd = ob.data
@@ -1958,23 +2006,27 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.label(text="Object:")
col.prop(md, "object", text="")
- col = split.column()
- col.label(text="Layer:")
- row = col.row(align=True)
- row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
- row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ layout.prop(md, "strength", slider=True)
+ col = layout.column()
+ col.separator()
col.label(text="Vertex Group:")
row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Material:")
row = col.row(align=True)
row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
- layout.separator()
- layout.prop(md, "strength", slider=True)
+ col.label(text="Layer:")
+ row = col.row(align=True)
+ row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_MIRROR(self, layout, ob, md):
gpd = ob.data
@@ -1984,21 +2036,23 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "y_axis")
row.prop(md, "z_axis")
- # GPXX: Not implemented yet
- # layout.separator()
- # layout.prop(md, "clip")
+ layout.label(text="Object:")
+ layout.prop(md, "object", text="")
- layout.label(text="Layer:")
- row = layout.row(align=True)
+ col = layout.column()
+ col.separator()
+ col.label(text="Material:")
+ row = col.row(align=True)
+ row.prop(md, "pass_index", text="Pass")
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+ col.label(text="Layer:")
+ row = col.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
-
row = layout.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
-
- layout.label(text="Object:")
- layout.prop(md, "object", text="")
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_HOOK(self, layout, ob, md):
gpd = ob.data
@@ -2011,23 +2065,7 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col.label(text="Bone:")
col.prop_search(md, "subtarget", md.object.data, "bones", text="")
- col = split.column()
- col.label(text="Layer:")
- row = col.row(align=True)
- row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
- row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
-
- col.label(text="Vertex Group:")
- row = col.row(align=True)
- row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
- row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
-
- row = col.row(align=True)
- row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
-
use_falloff = (md.falloff_type != 'NONE')
- split = layout.split()
layout.separator()
@@ -2047,30 +2085,53 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
col = split.column()
col.prop(md, "use_falloff_uniform")
- def GP_OFFSET(self, layout, ob, md):
- gpd = ob.data
- split = layout.split()
-
- col = split.column()
- col.prop(md, "location")
- col.prop(md, "scale")
+ col = layout.column()
+ col.separator()
+ col.label(text="Vertex Group:")
+ row = col.row(align=True)
+ row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+ row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
- col = split.column()
- col.prop(md, "rotation")
+ col.label(text="Material:")
+ row = col.row(align=True)
+ row.prop(md, "pass_index", text="Pass")
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
col.label(text="Layer:")
row = col.row(align=True)
row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
+ def GP_OFFSET(self, layout, ob, md):
+ gpd = ob.data
+ col = layout.column()
+
+ col.prop(md, "location")
+ col.prop(md, "scale")
+ col.prop(md, "rotation")
+
+ col = layout.column()
+ col.separator()
col.label(text="Vertex Group:")
row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
row.prop(md, "invert_vertex", text="", icon='ARROW_LEFTRIGHT')
+ col.label(text="Material:")
row = col.row(align=True)
row.prop(md, "pass_index", text="Pass")
- row.prop(md, "invert_pass", text="", icon='ARROW_LEFTRIGHT')
+ row.prop(md, "invert_material_pass", text="", icon='ARROW_LEFTRIGHT')
+
+ col.label(text="Layer:")
+ row = col.row(align=True)
+ row.prop_search(md, "layer", gpd, "layers", text="", icon='GREASEPENCIL')
+ row.prop(md, "invert_layers", text="", icon='ARROW_LEFTRIGHT')
+ row = layout.row(align=True)
+ row.prop(md, "layer_pass", text="Pass")
+ row.prop(md, "invert_layer_pass", text="", icon='ARROW_LEFTRIGHT')
def GP_ARMATURE(self, layout, ob, md):
split = layout.split()
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
index b2eeaa1c4e9..1a61133f3f7 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c
@@ -84,8 +84,8 @@ void gpencil_modifier_type_init(GpencilModifierTypeInfo *types[])
/* verify if valid layer and pass index */
bool is_stroke_affected_by_modifier(
- Object *ob, char *mlayername, int mpassindex, int minpoints,
- bGPDlayer *gpl, bGPDstroke *gps, bool inv1, bool inv2)
+ Object *ob, char *mlayername, int mpassindex, int gpl_passindex, int minpoints,
+ bGPDlayer *gpl, bGPDstroke *gps, bool inv1, bool inv2, bool inv3)
{
MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1);
@@ -102,7 +102,20 @@ bool is_stroke_affected_by_modifier(
}
}
}
- /* verify pass */
+ /* verify layer pass */
+ if (gpl_passindex > 0) {
+ if (inv3 == false) {
+ if (gpl->pass_index != gpl_passindex) {
+ return false;
+ }
+ }
+ else {
+ if (gpl->pass_index == gpl_passindex) {
+ return false;
+ }
+ }
+ }
+ /* verify material pass */
if (mpassindex > 0) {
if (inv2 == false) {
if (gp_style->index != mpassindex) {
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
index 95772d141f1..1b61465efa3 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.h
@@ -42,8 +42,10 @@ struct Material;
struct GHash;
bool is_stroke_affected_by_modifier(
- struct Object *ob, char *mlayername, int mpassindex, int minpoints,
- bGPDlayer *gpl, bGPDstroke *gps, bool inv1, bool inv2);
+ struct Object *ob, char *mlayername, int mpassindex,
+ int gpl_passindex, int minpoints,
+ bGPDlayer *gpl, bGPDstroke *gps,
+ bool inv1, bool inv2, bool inv3);
float get_modifier_point_weight(struct MDeformVert *dvert, bool inverse, int def_nr);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
index 0b02443f7eb..a98078a6490 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
@@ -435,6 +435,19 @@ static void generateStrokes(
}
}
}
+ /* verify layer pass */
+ if (mmd->layer_pass > 0) {
+ if ((mmd->flag & GP_BUILD_INVERT_LAYERPASS) == 0) {
+ if (gpl->pass_index != mmd->layer_pass) {
+ return false;
+ }
+ }
+ else {
+ if (gpl->pass_index == mmd->layer_pass) {
+ return false;
+ }
+ }
+ }
/* Early exit if outside of the frame range for this modifier
* (e.g. to have one forward, and one backwards modifier)
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
index ac1e51c62ea..fcf06ae9a3c 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilcolor.c
@@ -78,8 +78,9 @@ static void deformStroke(
float hsv[3], factor[3];
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 1, gpl, gps,
- mmd->flag & GP_COLOR_INVERT_LAYER, mmd->flag & GP_COLOR_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps,
+ mmd->flag & GP_COLOR_INVERT_LAYER, mmd->flag & GP_COLOR_INVERT_PASS,
+ mmd->flag & GP_COLOR_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
index 38a149fce71..45a382fe4b8 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilhook.c
@@ -209,8 +209,9 @@ static void deformStroke(
struct GPHookData_cb tData;
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 3, gpl, gps,
- mmd->flag & GP_HOOK_INVERT_LAYER, mmd->flag & GP_HOOK_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps,
+ mmd->flag & GP_HOOK_INVERT_LAYER, mmd->flag & GP_HOOK_INVERT_PASS,
+ mmd->flag & GP_HOOK_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c
index 05912e594f5..9c56a06af99 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c
@@ -114,8 +114,9 @@ static void generate_geometry(
* ATTENTION: The logic here is the inverse of what's used everywhere else!
*/
if (is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 1, gpl, gps,
- mmd->flag & GP_INSTANCE_INVERT_LAYER, mmd->flag & GP_INSTANCE_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps,
+ mmd->flag & GP_INSTANCE_INVERT_LAYER, mmd->flag & GP_INSTANCE_INVERT_PASS,
+ mmd->flag & GP_INSTANCE_INVERT_LAYERPASS))
{
valid_strokes[idx] = true;
num_valid++;
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
index 0d7bfcfdaae..ffa24c24b17 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillattice.c
@@ -82,8 +82,9 @@ static void deformStroke(
const int def_nr = defgroup_name_index(ob, mmd->vgname);
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 3, gpl, gps,
- mmd->flag & GP_LATTICE_INVERT_LAYER, mmd->flag & GP_LATTICE_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps,
+ mmd->flag & GP_LATTICE_INVERT_LAYER, mmd->flag & GP_LATTICE_INVERT_PASS,
+ mmd->flag & GP_LATTICE_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
index aec9715a995..19e6e6905b9 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilmirror.c
@@ -124,8 +124,11 @@ static void generateStrokes(
for (i = 0, gps = gpf->strokes.first; i < tot_strokes; i++, gps = gps->next) {
if (is_stroke_affected_by_modifier(
- ob, mmd->layername, mmd->pass_index, 1, gpl, gps,
- mmd->flag & GP_MIRROR_INVERT_LAYER, mmd->flag & GP_MIRROR_INVERT_PASS))
+ ob, mmd->layername, mmd->pass_index, mmd->layer_pass,
+ 1, gpl, gps,
+ mmd->flag & GP_MIRROR_INVERT_LAYER,
+ mmd->flag & GP_MIRROR_INVERT_PASS,
+ mmd->flag & GP_MIRROR_INVERT_LAYERPASS))
{
gps_new = BKE_gpencil_stroke_duplicate(gps);
update_position(ob, mmd, gps_new, xi);
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
index aacf66d2538..3029d1b4ab5 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
@@ -117,8 +117,9 @@ static void deformStroke(
}
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 3, gpl, gps,
- mmd->flag & GP_NOISE_INVERT_LAYER, mmd->flag & GP_NOISE_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps,
+ mmd->flag & GP_NOISE_INVERT_LAYER, mmd->flag & GP_NOISE_INVERT_PASS,
+ mmd->flag & GP_NOISE_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
index 373fccde633..86892ad44fd 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c
@@ -78,8 +78,9 @@ static void deformStroke(
float loc[3], rot[3], scale[3];
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 1, gpl, gps,
- mmd->flag & GP_OFFSET_INVERT_LAYER, mmd->flag & GP_OFFSET_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps,
+ mmd->flag & GP_OFFSET_INVERT_LAYER, mmd->flag & GP_OFFSET_INVERT_PASS,
+ mmd->flag & GP_OFFSET_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
index 2ccca9f3ab9..9c38198a240 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
@@ -79,8 +79,9 @@ static void deformStroke(
if (!is_stroke_affected_by_modifier(
ob,
- mmd->layername, mmd->pass_index, 1, gpl, gps,
- mmd->flag & GP_OPACITY_INVERT_LAYER, mmd->flag & GP_OPACITY_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps,
+ mmd->flag & GP_OPACITY_INVERT_LAYER, mmd->flag & GP_OPACITY_INVERT_PASS,
+ mmd->flag & GP_OPACITY_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
index a892f230d39..0dde238d205 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsimplify.c
@@ -67,8 +67,9 @@ static void deformStroke(
SimplifyGpencilModifierData *mmd = (SimplifyGpencilModifierData *)md;
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 4, gpl, gps,
- mmd->flag & GP_SIMPLIFY_INVERT_LAYER, mmd->flag & GP_SIMPLIFY_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 4, gpl, gps,
+ mmd->flag & GP_SIMPLIFY_INVERT_LAYER, mmd->flag & GP_SIMPLIFY_INVERT_PASS,
+ mmd->flag & GP_SIMPLIFY_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
index 01fb4c1f83b..0e2750ec58d 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsmooth.c
@@ -70,8 +70,9 @@ static void deformStroke(
const int def_nr = defgroup_name_index(ob, mmd->vgname);
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 3, gpl, gps,
- mmd->flag & GP_SMOOTH_INVERT_LAYER, mmd->flag & GP_SMOOTH_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps,
+ mmd->flag & GP_SMOOTH_INVERT_LAYER, mmd->flag & GP_SMOOTH_INVERT_PASS,
+ mmd->flag & GP_SMOOTH_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
index 7cf19de2020..0c6adcb128b 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilsubdiv.c
@@ -72,8 +72,9 @@ static void deformStroke(
if (!is_stroke_affected_by_modifier(
ob,
- mmd->layername, mmd->pass_index, 3, gpl, gps,
- mmd->flag & GP_SUBDIV_INVERT_LAYER, mmd->flag & GP_SUBDIV_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 3, gpl, gps,
+ mmd->flag & GP_SUBDIV_INVERT_LAYER, mmd->flag & GP_SUBDIV_INVERT_PASS,
+ mmd->flag & GP_SUBDIV_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
index 10b96cd2181..2dc4e84cef8 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c
@@ -95,8 +95,9 @@ static void deformStroke(
const int def_nr = defgroup_name_index(ob, mmd->vgname);
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 1, gpl, gps,
- mmd->flag & GP_THICK_INVERT_LAYER, mmd->flag & GP_THICK_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps,
+ mmd->flag & GP_THICK_INVERT_LAYER, mmd->flag & GP_THICK_INVERT_PASS,
+ mmd->flag & GP_THICK_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
index cb7e508e3db..0e66f639ce3 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltime.c
@@ -72,7 +72,7 @@ static int remapTime(
const int sfra = scene->r.sfra;
const int efra = scene->r.efra;
const bool invgpl = mmd->flag & GP_TIME_INVERT_LAYER;
- const bool invpass = mmd->flag & GP_TIME_INVERT_PASS;
+ const bool invpass = mmd->flag & GP_TIME_INVERT_LAYERPASS;
/* omit if filter by layer */
if (mmd->layername[0] != '\0') {
@@ -88,14 +88,14 @@ static int remapTime(
}
}
/* verify pass */
- if (mmd->pass_index > 0) {
+ if (mmd->layer_pass > 0) {
if (invpass == false) {
- if (gpl->pass_index != mmd->pass_index) {
+ if (gpl->pass_index != mmd->layer_pass) {
return cfra;
}
}
else {
- if (gpl->pass_index == mmd->pass_index) {
+ if (gpl->pass_index == mmd->layer_pass) {
return cfra;
}
}
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
index cdbc1f465a2..b1eea14d90c 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciltint.c
@@ -76,8 +76,9 @@ static void deformStroke(
TintGpencilModifierData *mmd = (TintGpencilModifierData *)md;
if (!is_stroke_affected_by_modifier(ob,
- mmd->layername, mmd->pass_index, 1, gpl, gps,
- mmd->flag & GP_TINT_INVERT_LAYER, mmd->flag & GP_TINT_INVERT_PASS))
+ mmd->layername, mmd->pass_index, mmd->layer_pass, 1, gpl, gps,
+ mmd->flag & GP_TINT_INVERT_LAYER, mmd->flag & GP_TINT_INVERT_PASS,
+ mmd->flag & GP_TINT_INVERT_LAYERPASS))
{
return;
}
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index 17ec1073c1d..65c75c151cd 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -91,6 +91,8 @@ typedef struct NoiseGpencilModifierData {
int scene_frame; /* last scene frame used */
float vrand1, vrand2; /* random values */
struct RNG *rng;
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
} NoiseGpencilModifierData;
typedef enum eNoiseGpencil_Flag {
@@ -104,6 +106,7 @@ typedef enum eNoiseGpencil_Flag {
GP_NOISE_INVERT_PASS = (1 << 7),
GP_NOISE_INVERT_VGROUP = (1 << 8),
GP_NOISE_MOD_UV = (1 << 9),
+ GP_NOISE_INVERT_LAYERPASS = (1 << 10),
} eNoiseGpencil_Flag;
typedef struct SubdivGpencilModifierData {
@@ -112,13 +115,14 @@ typedef struct SubdivGpencilModifierData {
int pass_index; /* custom index for passes */
int flag; /* flags */
int level; /* factor of subdivision */
- char pad[4];
+ int layer_pass; /* custom index for passes */
} SubdivGpencilModifierData;
typedef enum eSubdivGpencil_Flag {
GP_SUBDIV_SIMPLE = (1 << 0),
GP_SUBDIV_INVERT_LAYER = (1 << 1),
GP_SUBDIV_INVERT_PASS = (1 << 2),
+ GP_SUBDIV_INVERT_LAYERPASS = (1 << 3),
} eSubdivGpencil_Flag;
typedef struct ThickGpencilModifierData {
@@ -128,7 +132,7 @@ typedef struct ThickGpencilModifierData {
int pass_index; /* custom index for passes */
int flag; /* flags */
int thickness; /* Thickness change */
- char pad[4];
+ int layer_pass; /* custom index for passes */
struct CurveMapping *curve_thickness;
} ThickGpencilModifierData;
@@ -138,12 +142,13 @@ typedef enum eThickGpencil_Flag {
GP_THICK_INVERT_VGROUP = (1 << 2),
GP_THICK_CUSTOM_CURVE = (1 << 3),
GP_THICK_NORMALIZE = (1 << 4),
+ GP_THICK_INVERT_LAYERPASS = (1 << 5),
} eThickGpencil_Flag;
typedef struct TimeGpencilModifierData {
GpencilModifierData modifier;
char layername[64]; /* layer name */
- int pass_index; /* custom index for passes */
+ int layer_pass; /* custom index for passes */
int flag; /* flags */
int offset;
float frame_scale; /* animation scale */
@@ -152,9 +157,9 @@ typedef struct TimeGpencilModifierData {
} TimeGpencilModifierData;
typedef enum eTimeGpencil_Flag {
- GP_TIME_INVERT_LAYER = (1 << 0),
- GP_TIME_KEEP_LOOP = (1 << 1),
- GP_TIME_INVERT_PASS = (1 << 2),
+ GP_TIME_INVERT_LAYER = (1 << 0),
+ GP_TIME_KEEP_LOOP = (1 << 1),
+ GP_TIME_INVERT_LAYERPASS = (1 << 2),
} eTimeGpencil_Flag;
typedef enum eTimeGpencil_Mode {
@@ -177,14 +182,17 @@ typedef struct TintGpencilModifierData {
int flag; /* flags */
float rgb[3]; /* Tint color */
float factor; /* Mix factor */
- char modify_color; /* modify stroke, fill or both */
+ char modify_color; /* modify stroke, fill or both */
char pad[7];
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
} TintGpencilModifierData;
typedef enum eTintGpencil_Flag {
GP_TINT_CREATE_COLORS = (1 << 0),
GP_TINT_INVERT_LAYER = (1 << 1),
GP_TINT_INVERT_PASS = (1 << 2),
+ GP_TINT_INVERT_LAYERPASS = (1 << 3),
} eTintGpencil_Flag;
typedef struct ColorGpencilModifierData {
@@ -193,14 +201,17 @@ typedef struct ColorGpencilModifierData {
int pass_index; /* custom index for passes */
int flag; /* flags */
float hsv[3]; /* hsv factors */
- char modify_color; /* modify stroke, fill or both */
+ char modify_color; /* modify stroke, fill or both */
char pad[3];
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
} ColorGpencilModifierData;
typedef enum eColorGpencil_Flag {
GP_COLOR_CREATE_COLORS = (1 << 0),
GP_COLOR_INVERT_LAYER = (1 << 1),
GP_COLOR_INVERT_PASS = (1 << 2),
+ GP_COLOR_INVERT_LAYERPASS = (1 << 3),
} eColorGpencil_Flag;
typedef struct OpacityGpencilModifierData {
@@ -212,6 +223,8 @@ typedef struct OpacityGpencilModifierData {
float factor; /* Main Opacity factor */
char modify_color; /* modify stroke, fill or both */
char pad[3];
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
} OpacityGpencilModifierData;
typedef enum eOpacityGpencil_Flag {
@@ -219,6 +232,7 @@ typedef enum eOpacityGpencil_Flag {
GP_OPACITY_INVERT_PASS = (1 << 1),
GP_OPACITY_INVERT_VGROUP = (1 << 2),
GP_OPACITY_CREATE_COLORS = (1 << 3),
+ GP_OPACITY_INVERT_LAYERPASS = (1 << 4),
} eOpacityGpencil_Flag;
typedef struct InstanceGpencilModifierData {
@@ -237,7 +251,7 @@ typedef struct InstanceGpencilModifierData {
int pass_index; /* custom index for passes */
char layername[64]; /* layer name */
int mat_rpl; /* material replace (0 keep default) */
- char pad[4];
+ int layer_pass; /* custom index for passes */
} InstanceGpencilModifierData;
typedef enum eInstanceGpencil_Flag {
@@ -246,6 +260,7 @@ typedef enum eInstanceGpencil_Flag {
GP_INSTANCE_INVERT_LAYER = (1 << 2),
GP_INSTANCE_INVERT_PASS = (1 << 3),
GP_INSTANCE_KEEP_ONTOP = (1 << 4),
+ GP_INSTANCE_INVERT_LAYERPASS = (1 << 5),
} eInstanceGpencil_Flag;
typedef struct BuildGpencilModifierData {
@@ -254,7 +269,7 @@ typedef struct BuildGpencilModifierData {
char layername[64]; /* if set, restrict modifier to operating on this layer */
int pass_index;
- int pad;
+ int layer_pass; /* custom index for passes */
float start_frame; /* If GP_BUILD_RESTRICT_TIME is set, the defines the frame range where GP frames are considered */
float end_frame;
@@ -302,6 +317,7 @@ typedef enum eBuildGpencil_Flag {
/* Restrict modifier to only operating between the nominated frames */
GP_BUILD_RESTRICT_TIME = (1 << 2),
+ GP_BUILD_INVERT_LAYERPASS = (1 << 3),
} eBuildGpencil_Flag;
typedef struct LatticeGpencilModifierData {
@@ -312,7 +328,7 @@ typedef struct LatticeGpencilModifierData {
int pass_index; /* custom index for passes */
int flag; /* flags */
float strength;
- char pad[4];
+ int layer_pass; /* custom index for passes */
void *cache_data; /* runtime only (LatticeDeformData) */
} LatticeGpencilModifierData;
@@ -320,6 +336,7 @@ typedef enum eLatticeGpencil_Flag {
GP_LATTICE_INVERT_LAYER = (1 << 0),
GP_LATTICE_INVERT_PASS = (1 << 1),
GP_LATTICE_INVERT_VGROUP = (1 << 2),
+ GP_LATTICE_INVERT_LAYERPASS = (1 << 3),
} eLatticeGpencil_Flag;
typedef struct MirrorGpencilModifierData {
@@ -328,6 +345,8 @@ typedef struct MirrorGpencilModifierData {
char layername[64]; /* layer name */
int pass_index; /* custom index for passes */
int flag; /* flags */
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
} MirrorGpencilModifierData;
typedef enum eMirrorGpencil_Flag {
@@ -337,6 +356,7 @@ typedef enum eMirrorGpencil_Flag {
GP_MIRROR_AXIS_X = (1 << 3),
GP_MIRROR_AXIS_Y = (1 << 4),
GP_MIRROR_AXIS_Z = (1 << 5),
+ GP_MIRROR_INVERT_LAYERPASS = (1 << 6),
} eMirrorGpencil_Flag;
typedef struct HookGpencilModifierData {
@@ -347,6 +367,8 @@ typedef struct HookGpencilModifierData {
char layername[64]; /* layer name */
char vgname[64]; /* optional vertexgroup name, MAX_VGROUP_NAME */
int pass_index; /* custom index for passes */
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
int flag;
char falloff_type; /* use enums from WarpGpencilModifier (exact same functionality) */
@@ -363,6 +385,7 @@ typedef enum eHookGpencil_Flag {
GP_HOOK_INVERT_PASS = (1 << 1),
GP_HOOK_INVERT_VGROUP = (1 << 2),
GP_HOOK_UNIFORM_SPACE = (1 << 3),
+ GP_HOOK_INVERT_LAYERPASS = (1 << 4),
} eHookGpencil_Flag;
typedef enum eHookGpencil_Falloff {
@@ -385,11 +408,14 @@ typedef struct SimplifyGpencilModifierData {
float factor; /* factor of simplify */
short mode; /* type of simplify */
short step; /* every n vertex to keep */
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
} SimplifyGpencilModifierData;
typedef enum eSimplifyGpencil_Flag {
GP_SIMPLIFY_INVERT_LAYER = (1 << 0),
GP_SIMPLIFY_INVERT_PASS = (1 << 1),
+ GP_SIMPLIFY_INVERT_LAYERPASS = (1 << 2),
} eSimplifyGpencil_Flag;
typedef enum eSimplifyGpencil_Mode {
@@ -408,13 +434,14 @@ typedef struct OffsetGpencilModifierData {
float loc[3];
float rot[3];
float scale[3];
- char pad[4];
+ int layer_pass; /* custom index for passes */
} OffsetGpencilModifierData;
typedef enum eOffsetGpencil_Flag {
GP_OFFSET_INVERT_LAYER = (1 << 0),
GP_OFFSET_INVERT_PASS = (1 << 1),
- GP_OFFSET_INVERT_VGROUP = (1 << 2)
+ GP_OFFSET_INVERT_VGROUP = (1 << 2),
+ GP_OFFSET_INVERT_LAYERPASS = (1 << 3),
} eOffsetGpencil_Flag;
typedef struct SmoothGpencilModifierData {
@@ -425,6 +452,8 @@ typedef struct SmoothGpencilModifierData {
int flag; /* several flags */
float factor; /* factor of noise */
int step; /* how many times apply smooth */
+ int layer_pass; /* custom index for passes */
+ char pad_[4];
} SmoothGpencilModifierData;
typedef enum eSmoothGpencil_Flag {
@@ -435,6 +464,7 @@ typedef enum eSmoothGpencil_Flag {
GP_SMOOTH_INVERT_PASS = (1 << 4),
GP_SMOOTH_INVERT_VGROUP = (1 << 5),
GP_SMOOTH_MOD_UV = (1 << 6),
+ GP_SMOOTH_INVERT_LAYERPASS = (1 << 7),
} eSmoothGpencil_Flag;
typedef struct ArmatureGpencilModifierData {
diff --git a/source/blender/makesrna/intern/rna_gpencil_modifier.c b/source/blender/makesrna/intern/rna_gpencil_modifier.c
index 1230c9862ed..4bc74d2d39f 100644
--- a/source/blender/makesrna/intern/rna_gpencil_modifier.c
+++ b/source/blender/makesrna/intern/rna_gpencil_modifier.c
@@ -361,7 +361,7 @@ static void rna_def_modifier_gpencilnoise(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_NOISE_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -370,6 +370,17 @@ static void rna_def_modifier_gpencilnoise(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_NOISE_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_NOISE_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
}
static void rna_def_modifier_gpencilsmooth(BlenderRNA *brna)
@@ -436,7 +447,7 @@ static void rna_def_modifier_gpencilsmooth(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_SMOOTH_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -445,6 +456,17 @@ static void rna_def_modifier_gpencilsmooth(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_SMOOTH_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_SMOOTH_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
}
static void rna_def_modifier_gpencilsubdiv(BlenderRNA *brna)
@@ -484,10 +506,21 @@ static void rna_def_modifier_gpencilsubdiv(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_SUBDIV_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_SUBDIV_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
}
static void rna_def_modifier_gpencilsimplify(BlenderRNA *brna)
@@ -531,11 +564,22 @@ static void rna_def_modifier_gpencilsimplify(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_SIMPLIFY_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_SIMPLIFY_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
/* Mode */
prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_gpencil_simplify_mode_items);
@@ -587,7 +631,7 @@ static void rna_def_modifier_gpencilthick(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_THICK_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -597,6 +641,17 @@ static void rna_def_modifier_gpencilthick(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_THICK_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "use_custom_curve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_THICK_CUSTOM_CURVE);
RNA_def_property_ui_text(prop, "Custom Curve", "Use a custom curve to define thickness changes");
@@ -645,7 +700,7 @@ static void rna_def_modifier_gpenciloffset(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_OFFSET_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -655,6 +710,17 @@ static void rna_def_modifier_gpenciloffset(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_OFFSET_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_TRANSLATION);
RNA_def_property_float_sdna(prop, NULL, "loc");
RNA_def_property_ui_text(prop, "Location", "Values for change location");
@@ -723,10 +789,21 @@ static void rna_def_modifier_gpenciltint(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TINT_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_TINT_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
}
static void rna_def_modifier_gpenciltime(BlenderRNA *brna)
@@ -750,19 +827,19 @@ static void rna_def_modifier_gpenciltime(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Layer", "Layer name");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "pass_index");
- RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
- 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_TIME_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_pass", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_TIME_INVERT_PASS);
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_TIME_INVERT_LAYERPASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -843,10 +920,21 @@ static void rna_def_modifier_gpencilcolor(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_COLOR_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_COLOR_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
}
static void rna_def_modifier_gpencilopacity(BlenderRNA *brna)
@@ -897,7 +985,7 @@ static void rna_def_modifier_gpencilopacity(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_OPACITY_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -906,6 +994,17 @@ static void rna_def_modifier_gpencilopacity(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_OPACITY_INVERT_VGROUP);
RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_OPACITY_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
}
static void rna_def_modifier_gpencilinstance(BlenderRNA *brna)
@@ -1000,11 +1099,22 @@ static void rna_def_modifier_gpencilinstance(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_INSTANCE_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_INSTANCE_INVERT_LAYERPASS);
+ 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",
@@ -1121,19 +1231,16 @@ static void rna_def_modifier_gpencilbuild(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Inverse Layers", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- /* Filters - Pass Index */
-#if 0
- prop = RNA_def_property(srna, "pass_index", PROP_INT, PROP_NONE);
- RNA_def_property_int_sdna(prop, NULL, "pass_index");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Pass", "Pass index");
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
- prop = RNA_def_property(srna, "invert_pass", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BUILD_INVERT_PASS);
+ prop = RNA_def_property(srna, "invert_layer_pass", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_BUILD_INVERT_LAYERPASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
-#endif
}
static void rna_def_modifier_gpencillattice(BlenderRNA *brna)
@@ -1168,7 +1275,7 @@ static void rna_def_modifier_gpencillattice(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_LATTICE_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -1178,6 +1285,17 @@ static void rna_def_modifier_gpencillattice(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_LATTICE_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Lattice object to deform with");
RNA_def_property_pointer_funcs(prop, NULL, "rna_LatticeGpencilModifier_object_set", NULL, "rna_Lattice_object_poll");
@@ -1217,11 +1335,22 @@ static void rna_def_modifier_gpencilmirror(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_MIRROR_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_MIRROR_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Object", "Object used as center");
RNA_def_property_pointer_funcs(prop, NULL, "rna_MirrorGpencilModifier_object_set", NULL, NULL);
@@ -1293,7 +1422,7 @@ static void rna_def_modifier_gpencilhook(BlenderRNA *brna)
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_pass", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "invert_material_pass", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", GP_HOOK_INVERT_PASS);
RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
@@ -1303,6 +1432,17 @@ static void rna_def_modifier_gpencilhook(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Inverse VertexGroup", "Inverse filter");
RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+ prop = RNA_def_property(srna, "layer_pass", PROP_INT, PROP_NONE);
+ RNA_def_property_int_sdna(prop, NULL, "layer_pass");
+ RNA_def_property_range(prop, 0, 100);
+ RNA_def_property_ui_text(prop, "Pass", "Layer pass index");
+ 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_HOOK_INVERT_LAYERPASS);
+ RNA_def_property_ui_text(prop, "Inverse Pass", "Inverse filter");
+ RNA_def_property_update(prop, 0, "rna_GpencilModifier_update");
+
prop = RNA_def_property(srna, "strength", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "force");
RNA_def_property_range(prop, 0, 1);