[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41745] trunk/blender/release/scripts/ startup/bl_ui: 2.6 Physics UI Files:
Thomas Dinges
blender at dingto.org
Thu Nov 10 20:10:23 CET 2011
Revision: 41745
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41745
Author: dingto
Date: 2011-11-10 19:10:23 +0000 (Thu, 10 Nov 2011)
Log Message:
-----------
2.6 Physics UI Files:
* Remove redundant check for md, this is already done in the super class poll.
Modified Paths:
--------------
trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py
trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
trunk/blender/release/scripts/startup/bl_ui/properties_physics_fluid.py
trunk/blender/release/scripts/startup/bl_ui/properties_physics_smoke.py
trunk/blender/release/scripts/startup/bl_ui/properties_physics_softbody.py
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py 2011-11-10 18:38:33 UTC (rev 41744)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_cloth.py 2011-11-10 19:10:23 UTC (rev 41745)
@@ -60,63 +60,61 @@
md = context.cloth
ob = context.object
+ cloth = md.settings
- if md:
- cloth = md.settings
+ split = layout.split()
- split = layout.split()
+ split.active = cloth_panel_enabled(md)
- split.active = cloth_panel_enabled(md)
+ col = split.column()
- col = split.column()
+ col.label(text="Presets:")
+ sub = col.row(align=True)
+ sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
+ sub.operator("cloth.preset_add", text="", icon='ZOOMIN')
+ sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True
- col.label(text="Presets:")
- sub = col.row(align=True)
- sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
- sub.operator("cloth.preset_add", text="", icon='ZOOMIN')
- sub.operator("cloth.preset_add", text="", icon='ZOOMOUT').remove_active = True
+ col.label(text="Quality:")
+ col.prop(cloth, "quality", text="Steps", slider=True)
- col.label(text="Quality:")
- col.prop(cloth, "quality", text="Steps", slider=True)
+ col.label(text="Material:")
+ col.prop(cloth, "mass")
+ col.prop(cloth, "structural_stiffness", text="Structural")
+ col.prop(cloth, "bending_stiffness", text="Bending")
- col.label(text="Material:")
- col.prop(cloth, "mass")
- col.prop(cloth, "structural_stiffness", text="Structural")
- col.prop(cloth, "bending_stiffness", text="Bending")
+ col = split.column()
- col = split.column()
+ col.label(text="Damping:")
+ col.prop(cloth, "spring_damping", text="Spring")
+ col.prop(cloth, "air_damping", text="Air")
- col.label(text="Damping:")
- col.prop(cloth, "spring_damping", text="Spring")
- col.prop(cloth, "air_damping", text="Air")
+ col.prop(cloth, "use_pin_cloth", text="Pinning")
+ sub = col.column()
+ sub.active = cloth.use_pin_cloth
+ sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="")
+ sub.prop(cloth, "pin_stiffness", text="Stiffness")
- col.prop(cloth, "use_pin_cloth", text="Pinning")
- sub = col.column()
- sub.active = cloth.use_pin_cloth
- sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="")
- sub.prop(cloth, "pin_stiffness", text="Stiffness")
+ col.label(text="Pre roll:")
+ col.prop(cloth, "pre_roll", text="Frame")
- col.label(text="Pre roll:")
- col.prop(cloth, "pre_roll", text="Frame")
+ # Disabled for now
+ """
+ if cloth.vertex_group_mass:
+ layout.label(text="Goal:")
- # Disabled for now
- """
- if cloth.vertex_group_mass:
- layout.label(text="Goal:")
+ col = layout.column_flow()
+ col.prop(cloth, "goal_default", text="Default")
+ col.prop(cloth, "goal_spring", text="Stiffness")
+ col.prop(cloth, "goal_friction", text="Friction")
+ """
- col = layout.column_flow()
- col.prop(cloth, "goal_default", text="Default")
- col.prop(cloth, "goal_spring", text="Stiffness")
- col.prop(cloth, "goal_friction", text="Friction")
- """
+ key = ob.data.shape_keys
- key = ob.data.shape_keys
+ if key:
+ col.label(text="Rest Shape Key:")
+ col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
- if key:
- col.label(text="Rest Shape Key:")
- col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
-
class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
bl_label = "Cloth Cache"
bl_options = {'DEFAULT_CLOSED'}
Modified: trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py 2011-11-10 18:38:33 UTC (rev 41744)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py 2011-11-10 19:10:23 UTC (rev 41745)
@@ -45,75 +45,74 @@
md = context.dynamic_paint
ob = context.object
- if md:
- layout.prop(md, "ui_type", expand=True)
+ layout.prop(md, "ui_type", expand=True)
- if (md.ui_type == "CANVAS"):
- canvas = md.canvas_settings
-
- if (not canvas):
- layout.operator("dpaint.type_toggle", text="Add Canvas").type = 'CANVAS'
- else:
- layout.operator("dpaint.type_toggle", text="Remove Canvas", icon='X').type = 'CANVAS'
+ if (md.ui_type == "CANVAS"):
+ canvas = md.canvas_settings
+
+ if (not canvas):
+ layout.operator("dpaint.type_toggle", text="Add Canvas").type = 'CANVAS'
+ else:
+ layout.operator("dpaint.type_toggle", text="Remove Canvas", icon='X').type = 'CANVAS'
- surface = canvas.canvas_surfaces.active
- row = layout.row()
- row.template_list(canvas, "canvas_surfaces", canvas.canvas_surfaces, "active_index", rows=2)
+ surface = canvas.canvas_surfaces.active
+ row = layout.row()
+ row.template_list(canvas, "canvas_surfaces", canvas.canvas_surfaces, "active_index", rows=2)
- col = row.column(align=True)
- col.operator("dpaint.surface_slot_add", icon='ZOOMIN', text="")
- col.operator("dpaint.surface_slot_remove", icon='ZOOMOUT', text="")
+ col = row.column(align=True)
+ col.operator("dpaint.surface_slot_add", icon='ZOOMIN', text="")
+ col.operator("dpaint.surface_slot_remove", icon='ZOOMOUT', text="")
+
+ if surface:
+ layout.prop(surface, "name")
+ layout.prop(surface, "surface_format", expand=False)
+ col = layout.column()
- if surface:
- layout.prop(surface, "name")
- layout.prop(surface, "surface_format", expand=False)
- col = layout.column()
-
- if surface.surface_format != "VERTEX":
- col.label(text="Quality:")
- col.prop(surface, "image_resolution")
- col.prop(surface, "use_antialiasing")
-
- col = layout.column()
- col.label(text="Frames:")
- split = col.split()
-
- col = split.column(align=True)
- col.prop(surface, "frame_start", text="Start")
- col.prop(surface, "frame_end", text="End")
-
- col = split.column()
- col.prop(surface, "frame_substeps")
-
- elif (md.ui_type == "BRUSH"):
- brush = md.brush_settings
- engine = context.scene.render.engine
+ if surface.surface_format != "VERTEX":
+ col.label(text="Quality:")
+ col.prop(surface, "image_resolution")
+ col.prop(surface, "use_antialiasing")
- if (not brush):
- layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH'
- else:
- layout.operator("dpaint.type_toggle", text="Remove Brush", icon='X').type = 'BRUSH'
-
- split = layout.split()
-
- col = split.column()
- col.prop(brush, "absolute_alpha")
- col.prop(brush, "paint_erase")
- col.prop(brush, "paint_wetness", text="Wetness")
+ col = layout.column()
+ col.label(text="Frames:")
+ split = col.split()
+ col = split.column(align=True)
+ col.prop(surface, "frame_start", text="Start")
+ col.prop(surface, "frame_end", text="End")
+
col = split.column()
- if (engine == 'BLENDER_RENDER'):
- sub = col.column()
- sub.active = (brush.paint_source != "PARTICLE_SYSTEM");
- sub.prop(brush, "use_material")
- if brush.use_material and brush.paint_source != "PARTICLE_SYSTEM" and (engine == 'BLENDER_RENDER'):
- col.prop(brush, "material", text="")
- col.prop(brush, "paint_alpha", text="Alpha Factor")
- else:
- col.prop(brush, "paint_color", text="")
- col.prop(brush, "paint_alpha", text="Alpha")
+ col.prop(surface, "frame_substeps")
+ elif (md.ui_type == "BRUSH"):
+ brush = md.brush_settings
+ engine = context.scene.render.engine
+
+ if (not brush):
+ layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH'
+ else:
+ layout.operator("dpaint.type_toggle", text="Remove Brush", icon='X').type = 'BRUSH'
+ split = layout.split()
+
+ col = split.column()
+ col.prop(brush, "absolute_alpha")
+ col.prop(brush, "paint_erase")
+ col.prop(brush, "paint_wetness", text="Wetness")
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list