diff options
author | Antonioya <blendergit@gmail.com> | 2018-10-24 17:46:14 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-10-24 17:46:35 +0300 |
commit | 735d6cb8d87cc3bb8ba9a727b95480502dd0f2b1 (patch) | |
tree | 63efa0eb20b22a666d716c0129da91def278c0e3 /release | |
parent | a211937892f55ac9510e0f9b625c1bd24cc12550 (diff) |
GP: Add new Layer Pass Index filter to modifiers
Now the modifier can be filtered using the new layer index.
Also changed panels to put layers and passes filter always at the end of the panel.
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_data_modifier.py | 339 |
1 files changed, 200 insertions, 139 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() |