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:
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_modifier.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py66
1 files changed, 54 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index 9c9c42b4045..e692a2fdf13 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -40,12 +40,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
layout.operator_menu_enum("object.modifier_add", "type")
for md in ob.modifiers:
- layout.subblock_begin(md.name)
box = layout.template_modifier(md)
if box:
# match enum type to our functions, avoids a lookup table.
getattr(self, md.type)(box, ob, md)
- layout.subblock_end()
# the mt.type enum is (ab)used for a lookup on function names
# ...to avoid lengthy if statements
@@ -265,24 +263,37 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.prop(md, "decimate_type", expand=True)
if decimate_type == 'COLLAPSE':
+ has_vgroup = bool(md.vertex_group)
layout.prop(md, "ratio")
split = layout.split()
- row = split.row(align=True)
+
+ col = split.column()
+ row = col.row(align=True)
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
- split.prop(md, "use_collapse_triangulate")
+ layout_info = col
+
+ col = split.column()
+ row = col.row()
+ row.active = has_vgroup
+ row.prop(md, "vertex_group_factor")
+
+ col.prop(md, "use_collapse_triangulate")
+
elif decimate_type == 'UNSUBDIV':
layout.prop(md, "iterations")
+ layout_info = layout
else: # decimate_type == 'DISSOLVE':
layout.prop(md, "angle_limit")
layout.prop(md, "use_dissolve_boundaries")
layout.label("Delimit:")
row = layout.row()
row.prop(md, "delimit")
+ layout_info = layout
- layout.label(text=iface_("Face Count: %d") % md.face_count, translate=False)
+ layout_info.label(text=iface_("Faces: %d") % md.face_count, translate=False)
def DISPLACE(self, layout, ob, md):
has_texture = (md.texture is not None)
@@ -684,8 +695,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
col.prop(md, "use_preserve_shape")
col = split.column()
- col.prop(md, "position", slider=True)
- col.prop(md, "random_position", text="Random", slider=True)
+ col2 = col.column(align=True)
+ col2.prop(md, "position", slider=True)
+ col2.prop(md, "random_position", text="Random", slider=True)
+ col2 = col.column(align=True)
+ col2.prop(md, "rotation", slider=True)
+ col2.prop(md, "random_rotation", text="Random", slider=True)
col = layout.column(align=True)
col.prop(md, "index_layer_name", text="Index Layer")
@@ -1146,13 +1161,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
self.vertex_weight_mask(layout, ob, md)
def SKIN(self, layout, ob, md):
- layout.operator("object.skin_armature_create", text="Create Armature")
+ row = layout.row()
+ row.operator("object.skin_armature_create", text="Create Armature")
+ row.operator("mesh.customdata_skin_add")
layout.separator()
- col = layout.column(align=True)
- col.prop(md, "branch_smoothing")
- col.prop(md, "use_smooth_shade")
+ row = layout.row(align=True)
+ row.prop(md, "branch_smoothing")
+ row.prop(md, "use_smooth_shade")
split = layout.split()
@@ -1399,7 +1416,32 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
sub = row.row(align=True)
sub.active = has_vgroup
- sub.prop(md, "use_invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
+ sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
+
+ def CORRECTIVE_SMOOTH(self, layout, ob, md):
+ is_bind = md.is_bind
+
+ layout.prop(md, "factor", text="Factor")
+ layout.prop(md, "iterations")
+
+ row = layout.row()
+ row.prop(md, "smooth_type")
+
+ split = layout.split()
+
+ col = split.column()
+ 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_group", text="", icon='ARROW_LEFTRIGHT')
+
+ col = split.column()
+ col.prop(md, "use_only_smooth")
+ col.prop(md, "use_pin_boundary")
+
+ layout.prop(md, "rest_source")
+ if md.rest_source == 'BIND':
+ layout.operator("object.correctivesmooth_bind", text="Unbind" if is_bind else "Bind")
if __name__ == "__main__": # only for live edit.