forked from bartvdbraak/blender
2.6 Physics UI Files:
* Remove redundant check for md, this is already done in the super class poll.
This commit is contained in:
parent
c8cb79a11f
commit
9e3deee808
@ -60,61 +60,59 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel):
|
|||||||
|
|
||||||
md = context.cloth
|
md = context.cloth
|
||||||
ob = context.object
|
ob = context.object
|
||||||
|
cloth = md.settings
|
||||||
|
|
||||||
if md:
|
split = layout.split()
|
||||||
cloth = md.settings
|
|
||||||
|
|
||||||
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:")
|
col.label(text="Quality:")
|
||||||
sub = col.row(align=True)
|
col.prop(cloth, "quality", text="Steps", slider=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.label(text="Material:")
|
||||||
col.prop(cloth, "quality", text="Steps", slider=True)
|
col.prop(cloth, "mass")
|
||||||
|
col.prop(cloth, "structural_stiffness", text="Structural")
|
||||||
|
col.prop(cloth, "bending_stiffness", text="Bending")
|
||||||
|
|
||||||
col.label(text="Material:")
|
col = split.column()
|
||||||
col.prop(cloth, "mass")
|
|
||||||
col.prop(cloth, "structural_stiffness", text="Structural")
|
|
||||||
col.prop(cloth, "bending_stiffness", text="Bending")
|
|
||||||
|
|
||||||
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, "use_pin_cloth", text="Pinning")
|
||||||
col.prop(cloth, "spring_damping", text="Spring")
|
sub = col.column()
|
||||||
col.prop(cloth, "air_damping", text="Air")
|
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")
|
col.label(text="Pre roll:")
|
||||||
sub = col.column()
|
col.prop(cloth, "pre_roll", text="Frame")
|
||||||
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:")
|
# Disabled for now
|
||||||
col.prop(cloth, "pre_roll", text="Frame")
|
"""
|
||||||
|
if cloth.vertex_group_mass:
|
||||||
|
layout.label(text="Goal:")
|
||||||
|
|
||||||
# Disabled for now
|
col = layout.column_flow()
|
||||||
"""
|
col.prop(cloth, "goal_default", text="Default")
|
||||||
if cloth.vertex_group_mass:
|
col.prop(cloth, "goal_spring", text="Stiffness")
|
||||||
layout.label(text="Goal:")
|
col.prop(cloth, "goal_friction", text="Friction")
|
||||||
|
"""
|
||||||
|
|
||||||
col = layout.column_flow()
|
key = ob.data.shape_keys
|
||||||
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
|
if key:
|
||||||
|
col.label(text="Rest Shape Key:")
|
||||||
if key:
|
col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
|
||||||
col.label(text="Rest Shape Key:")
|
|
||||||
col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
|
|
||||||
|
|
||||||
|
|
||||||
class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, Panel):
|
||||||
|
@ -45,73 +45,72 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, bpy.types.Panel):
|
|||||||
md = context.dynamic_paint
|
md = context.dynamic_paint
|
||||||
ob = context.object
|
ob = context.object
|
||||||
|
|
||||||
if md:
|
layout.prop(md, "ui_type", expand=True)
|
||||||
layout.prop(md, "ui_type", expand=True)
|
|
||||||
|
|
||||||
if (md.ui_type == "CANVAS"):
|
if (md.ui_type == "CANVAS"):
|
||||||
canvas = md.canvas_settings
|
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)
|
||||||
|
|
||||||
|
col = row.column(align=True)
|
||||||
|
col.operator("dpaint.surface_slot_add", icon='ZOOMIN', text="")
|
||||||
|
col.operator("dpaint.surface_slot_remove", icon='ZOOMOUT', text="")
|
||||||
|
|
||||||
if (not canvas):
|
if surface:
|
||||||
layout.operator("dpaint.type_toggle", text="Add Canvas").type = 'CANVAS'
|
layout.prop(surface, "name")
|
||||||
else:
|
layout.prop(surface, "surface_format", expand=False)
|
||||||
layout.operator("dpaint.type_toggle", text="Remove Canvas", icon='X').type = 'CANVAS'
|
col = layout.column()
|
||||||
|
|
||||||
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="")
|
|
||||||
|
|
||||||
if surface:
|
if surface.surface_format != "VERTEX":
|
||||||
layout.prop(surface, "name")
|
col.label(text="Quality:")
|
||||||
layout.prop(surface, "surface_format", expand=False)
|
col.prop(surface, "image_resolution")
|
||||||
col = layout.column()
|
col.prop(surface, "use_antialiasing")
|
||||||
|
|
||||||
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 (not brush):
|
col = layout.column()
|
||||||
layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH'
|
col.label(text="Frames:")
|
||||||
else:
|
split = col.split()
|
||||||
layout.operator("dpaint.type_toggle", text="Remove Brush", icon='X').type = 'BRUSH'
|
|
||||||
|
col = split.column(align=True)
|
||||||
split = layout.split()
|
col.prop(surface, "frame_start", text="Start")
|
||||||
|
col.prop(surface, "frame_end", text="End")
|
||||||
col = split.column()
|
|
||||||
col.prop(brush, "absolute_alpha")
|
|
||||||
col.prop(brush, "paint_erase")
|
|
||||||
col.prop(brush, "paint_wetness", text="Wetness")
|
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
if (engine == 'BLENDER_RENDER'):
|
col.prop(surface, "frame_substeps")
|
||||||
sub = col.column()
|
|
||||||
sub.active = (brush.paint_source != "PARTICLE_SYSTEM");
|
elif (md.ui_type == "BRUSH"):
|
||||||
sub.prop(brush, "use_material")
|
brush = md.brush_settings
|
||||||
if brush.use_material and brush.paint_source != "PARTICLE_SYSTEM" and (engine == 'BLENDER_RENDER'):
|
engine = context.scene.render.engine
|
||||||
col.prop(brush, "material", text="")
|
|
||||||
col.prop(brush, "paint_alpha", text="Alpha Factor")
|
if (not brush):
|
||||||
else:
|
layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH'
|
||||||
col.prop(brush, "paint_color", text="")
|
else:
|
||||||
col.prop(brush, "paint_alpha", text="Alpha")
|
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 = 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")
|
||||||
|
|
||||||
|
|
||||||
class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, bpy.types.Panel):
|
class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, bpy.types.Panel):
|
||||||
|
@ -40,151 +40,149 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel):
|
|||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
|
||||||
md = context.fluid
|
md = context.fluid
|
||||||
|
fluid = md.settings
|
||||||
|
|
||||||
if md:
|
row = layout.row()
|
||||||
fluid = md.settings
|
if fluid is None:
|
||||||
|
row.label("Built without fluids")
|
||||||
|
return
|
||||||
|
|
||||||
row = layout.row()
|
row.prop(fluid, "type")
|
||||||
if fluid is None:
|
if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}:
|
||||||
row.label("Built without fluids")
|
row.prop(fluid, "use", text="")
|
||||||
return
|
|
||||||
|
|
||||||
row.prop(fluid, "type")
|
layout = layout.column()
|
||||||
if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}:
|
if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}:
|
||||||
row.prop(fluid, "use", text="")
|
layout.active = fluid.use
|
||||||
|
|
||||||
layout = layout.column()
|
if fluid.type == 'DOMAIN':
|
||||||
if fluid.type not in {'NONE', 'DOMAIN', 'PARTICLE', 'FLUID'}:
|
layout.operator("fluid.bake", text="Bake (Req. Memory:" + " %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
|
||||||
layout.active = fluid.use
|
split = layout.split()
|
||||||
|
|
||||||
if fluid.type == 'DOMAIN':
|
col = split.column()
|
||||||
layout.operator("fluid.bake", text="Bake (Req. Memory:" + " %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
|
col.label(text="Resolution:")
|
||||||
split = layout.split()
|
col.prop(fluid, "resolution", text="Final")
|
||||||
|
col.label(text="Render Display:")
|
||||||
|
col.prop(fluid, "render_display_mode", text="")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Resolution:")
|
col.label()
|
||||||
col.prop(fluid, "resolution", text="Final")
|
col.prop(fluid, "preview_resolution", text="Preview")
|
||||||
col.label(text="Render Display:")
|
col.label(text="Viewport Display:")
|
||||||
col.prop(fluid, "render_display_mode", text="")
|
col.prop(fluid, "viewport_display_mode", text="")
|
||||||
|
|
||||||
col = split.column()
|
split = layout.split()
|
||||||
col.label()
|
|
||||||
col.prop(fluid, "preview_resolution", text="Preview")
|
|
||||||
col.label(text="Viewport Display:")
|
|
||||||
col.prop(fluid, "viewport_display_mode", text="")
|
|
||||||
|
|
||||||
split = layout.split()
|
col = split.column()
|
||||||
|
col.label(text="Time:")
|
||||||
|
sub = col.column(align=True)
|
||||||
|
sub.prop(fluid, "start_time", text="Start")
|
||||||
|
sub.prop(fluid, "end_time", text="End")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Time:")
|
col.label()
|
||||||
sub = col.column(align=True)
|
col.prop(fluid, "use_speed_vectors")
|
||||||
sub.prop(fluid, "start_time", text="Start")
|
col.prop(fluid, "use_reverse_frames")
|
||||||
sub.prop(fluid, "end_time", text="End")
|
|
||||||
|
|
||||||
col = split.column()
|
layout.prop(fluid, "filepath", text="")
|
||||||
col.label()
|
|
||||||
col.prop(fluid, "use_speed_vectors")
|
|
||||||
col.prop(fluid, "use_reverse_frames")
|
|
||||||
|
|
||||||
layout.prop(fluid, "filepath", text="")
|
elif fluid.type == 'FLUID':
|
||||||
|
split = layout.split()
|
||||||
|
|
||||||
elif fluid.type == 'FLUID':
|
col = split.column()
|
||||||
split = layout.split()
|
col.label(text="Volume Initialization:")
|
||||||
|
col.prop(fluid, "volume_initialization", text="")
|
||||||
|
col.prop(fluid, "use_animated_mesh")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Volume Initialization:")
|
col.label(text="Initial Velocity:")
|
||||||
col.prop(fluid, "volume_initialization", text="")
|
col.prop(fluid, "initial_velocity", text="")
|
||||||
col.prop(fluid, "use_animated_mesh")
|
|
||||||
|
|
||||||
col = split.column()
|
elif fluid.type == 'OBSTACLE':
|
||||||
col.label(text="Initial Velocity:")
|
split = layout.split()
|
||||||
col.prop(fluid, "initial_velocity", text="")
|
|
||||||
|
|
||||||
elif fluid.type == 'OBSTACLE':
|
col = split.column()
|
||||||
split = layout.split()
|
col.label(text="Volume Initialization:")
|
||||||
|
col.prop(fluid, "volume_initialization", text="")
|
||||||
|
col.prop(fluid, "use_animated_mesh")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Volume Initialization:")
|
col.label(text="Slip Type:")
|
||||||
col.prop(fluid, "volume_initialization", text="")
|
col.prop(fluid, "slip_type", text="")
|
||||||
col.prop(fluid, "use_animated_mesh")
|
if fluid.slip_type == 'PARTIALSLIP':
|
||||||
|
col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
|
||||||
|
|
||||||
col = split.column()
|
col.label(text="Impact:")
|
||||||
col.label(text="Slip Type:")
|
col.prop(fluid, "impact_factor", text="Factor")
|
||||||
col.prop(fluid, "slip_type", text="")
|
|
||||||
if fluid.slip_type == 'PARTIALSLIP':
|
|
||||||
col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
|
|
||||||
|
|
||||||
col.label(text="Impact:")
|
elif fluid.type == 'INFLOW':
|
||||||
col.prop(fluid, "impact_factor", text="Factor")
|
split = layout.split()
|
||||||
|
|
||||||
elif fluid.type == 'INFLOW':
|
col = split.column()
|
||||||
split = layout.split()
|
col.label(text="Volume Initialization:")
|
||||||
|
col.prop(fluid, "volume_initialization", text="")
|
||||||
|
col.prop(fluid, "use_animated_mesh")
|
||||||
|
row = col.row()
|
||||||
|
row.active = not fluid.use_animated_mesh
|
||||||
|
row.prop(fluid, "use_local_coords")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Volume Initialization:")
|
col.label(text="Inflow Velocity:")
|
||||||
col.prop(fluid, "volume_initialization", text="")
|
col.prop(fluid, "inflow_velocity", text="")
|
||||||
col.prop(fluid, "use_animated_mesh")
|
|
||||||
row = col.row()
|
|
||||||
row.active = not fluid.use_animated_mesh
|
|
||||||
row.prop(fluid, "use_local_coords")
|
|
||||||
|
|
||||||
col = split.column()
|
elif fluid.type == 'OUTFLOW':
|
||||||
col.label(text="Inflow Velocity:")
|
split = layout.split()
|
||||||
col.prop(fluid, "inflow_velocity", text="")
|
|
||||||
|
|
||||||
elif fluid.type == 'OUTFLOW':
|
col = split.column()
|
||||||
split = layout.split()
|
col.label(text="Volume Initialization:")
|
||||||
|
col.prop(fluid, "volume_initialization", text="")
|
||||||
|
col.prop(fluid, "use_animated_mesh")
|
||||||
|
|
||||||
col = split.column()
|
split.column()
|
||||||
col.label(text="Volume Initialization:")
|
|
||||||
col.prop(fluid, "volume_initialization", text="")
|
|
||||||
col.prop(fluid, "use_animated_mesh")
|
|
||||||
|
|
||||||
split.column()
|
elif fluid.type == 'PARTICLE':
|
||||||
|
split = layout.split()
|
||||||
|
|
||||||
elif fluid.type == 'PARTICLE':
|
col = split.column()
|
||||||
split = layout.split()
|
col.label(text="Influence:")
|
||||||
|
col.prop(fluid, "particle_influence", text="Size")
|
||||||
|
col.prop(fluid, "alpha_influence", text="Alpha")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Influence:")
|
col.label(text="Type:")
|
||||||
col.prop(fluid, "particle_influence", text="Size")
|
col.prop(fluid, "use_drops")
|
||||||
col.prop(fluid, "alpha_influence", text="Alpha")
|
col.prop(fluid, "use_floats")
|
||||||
|
col.prop(fluid, "show_tracer")
|
||||||
|
|
||||||
col = split.column()
|
layout.prop(fluid, "filepath", text="")
|
||||||
col.label(text="Type:")
|
|
||||||
col.prop(fluid, "use_drops")
|
|
||||||
col.prop(fluid, "use_floats")
|
|
||||||
col.prop(fluid, "show_tracer")
|
|
||||||
|
|
||||||
layout.prop(fluid, "filepath", text="")
|
elif fluid.type == 'CONTROL':
|
||||||
|
split = layout.split()
|
||||||
|
|
||||||
elif fluid.type == 'CONTROL':
|
col = split.column()
|
||||||
split = layout.split()
|
col.label(text="")
|
||||||
|
col.prop(fluid, "quality", slider=True)
|
||||||
|
col.prop(fluid, "use_reverse_frames")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="")
|
col.label(text="Time:")
|
||||||
col.prop(fluid, "quality", slider=True)
|
sub = col.column(align=True)
|
||||||
col.prop(fluid, "use_reverse_frames")
|
sub.prop(fluid, "start_time", text="Start")
|
||||||
|
sub.prop(fluid, "end_time", text="End")
|
||||||
|
|
||||||
col = split.column()
|
split = layout.split()
|
||||||
col.label(text="Time:")
|
|
||||||
sub = col.column(align=True)
|
|
||||||
sub.prop(fluid, "start_time", text="Start")
|
|
||||||
sub.prop(fluid, "end_time", text="End")
|
|
||||||
|
|
||||||
split = layout.split()
|
col = split.column()
|
||||||
|
col.label(text="Attraction Force:")
|
||||||
|
sub = col.column(align=True)
|
||||||
|
sub.prop(fluid, "attraction_strength", text="Strength")
|
||||||
|
sub.prop(fluid, "attraction_radius", text="Radius")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Attraction Force:")
|
col.label(text="Velocity Force:")
|
||||||
sub = col.column(align=True)
|
sub = col.column(align=True)
|
||||||
sub.prop(fluid, "attraction_strength", text="Strength")
|
sub.prop(fluid, "velocity_strength", text="Strength")
|
||||||
sub.prop(fluid, "attraction_radius", text="Radius")
|
sub.prop(fluid, "velocity_radius", text="Radius")
|
||||||
|
|
||||||
col = split.column()
|
|
||||||
col.label(text="Velocity Force:")
|
|
||||||
sub = col.column(align=True)
|
|
||||||
sub.prop(fluid, "velocity_strength", text="Strength")
|
|
||||||
sub.prop(fluid, "velocity_radius", text="Radius")
|
|
||||||
|
|
||||||
|
|
||||||
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel):
|
||||||
|
@ -47,60 +47,59 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel):
|
|||||||
md = context.smoke
|
md = context.smoke
|
||||||
ob = context.object
|
ob = context.object
|
||||||
|
|
||||||
if md:
|
layout.prop(md, "smoke_type", expand=True)
|
||||||
layout.prop(md, "smoke_type", expand=True)
|
|
||||||
|
|
||||||
if md.smoke_type == 'DOMAIN':
|
if md.smoke_type == 'DOMAIN':
|
||||||
domain = md.domain_settings
|
domain = md.domain_settings
|
||||||
|
|
||||||
split = layout.split()
|
split = layout.split()
|
||||||
|
|
||||||
split.enabled = not domain.point_cache.is_baked
|
split.enabled = not domain.point_cache.is_baked
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Resolution:")
|
col.label(text="Resolution:")
|
||||||
col.prop(domain, "resolution_max", text="Divisions")
|
col.prop(domain, "resolution_max", text="Divisions")
|
||||||
col.label(text="Time:")
|
col.label(text="Time:")
|
||||||
col.prop(domain, "time_scale", text="Scale")
|
col.prop(domain, "time_scale", text="Scale")
|
||||||
col.label(text="Border Collisions:")
|
col.label(text="Border Collisions:")
|
||||||
col.prop(domain, "collision_extents", text="")
|
col.prop(domain, "collision_extents", text="")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Behavior:")
|
col.label(text="Behavior:")
|
||||||
col.prop(domain, "alpha")
|
col.prop(domain, "alpha")
|
||||||
col.prop(domain, "beta", text="Temp. Diff.")
|
col.prop(domain, "beta", text="Temp. Diff.")
|
||||||
col.prop(domain, "vorticity")
|
col.prop(domain, "vorticity")
|
||||||
col.prop(domain, "use_dissolve_smoke", text="Dissolve")
|
col.prop(domain, "use_dissolve_smoke", text="Dissolve")
|
||||||
sub = col.column()
|
sub = col.column()
|
||||||
sub.active = domain.use_dissolve_smoke
|
sub.active = domain.use_dissolve_smoke
|
||||||
sub.prop(domain, "dissolve_speed", text="Time")
|
sub.prop(domain, "dissolve_speed", text="Time")
|
||||||
sub.prop(domain, "use_dissolve_smoke_log", text="Slow")
|
sub.prop(domain, "use_dissolve_smoke_log", text="Slow")
|
||||||
|
|
||||||
elif md.smoke_type == 'FLOW':
|
elif md.smoke_type == 'FLOW':
|
||||||
|
|
||||||
flow = md.flow_settings
|
flow = md.flow_settings
|
||||||
|
|
||||||
split = layout.split()
|
split = layout.split()
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.prop(flow, "use_outflow")
|
col.prop(flow, "use_outflow")
|
||||||
col.label(text="Particle System:")
|
col.label(text="Particle System:")
|
||||||
col.prop_search(flow, "particle_system", ob, "particle_systems", text="")
|
col.prop_search(flow, "particle_system", ob, "particle_systems", text="")
|
||||||
|
|
||||||
sub = col.column()
|
sub = col.column()
|
||||||
sub.active = not md.flow_settings.use_outflow
|
sub.active = not md.flow_settings.use_outflow
|
||||||
|
|
||||||
sub.prop(flow, "initial_velocity", text="Initial Velocity")
|
sub.prop(flow, "initial_velocity", text="Initial Velocity")
|
||||||
sub = sub.column()
|
sub = sub.column()
|
||||||
sub.active = flow.initial_velocity
|
sub.active = flow.initial_velocity
|
||||||
sub.prop(flow, "velocity_factor", text="Multiplier")
|
sub.prop(flow, "velocity_factor", text="Multiplier")
|
||||||
|
|
||||||
sub = split.column()
|
sub = split.column()
|
||||||
sub.active = not md.flow_settings.use_outflow
|
sub.active = not md.flow_settings.use_outflow
|
||||||
sub.label(text="Initial Values:")
|
sub.label(text="Initial Values:")
|
||||||
sub.prop(flow, "use_absolute")
|
sub.prop(flow, "use_absolute")
|
||||||
sub.prop(flow, "density")
|
sub.prop(flow, "density")
|
||||||
sub.prop(flow, "temperature")
|
sub.prop(flow, "temperature")
|
||||||
|
|
||||||
|
|
||||||
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel):
|
||||||
|
@ -39,8 +39,6 @@ class PhysicButtonsPanel():
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
ob = context.object
|
ob = context.object
|
||||||
rd = context.scene.render
|
rd = context.scene.render
|
||||||
# return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
|
|
||||||
# i really hate touching things i do not understand completely .. but i think this should read (bjornmose)
|
|
||||||
return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) and (context.soft_body)
|
return (ob and (ob.type == 'MESH' or ob.type == 'LATTICE'or ob.type == 'CURVE')) and (not rd.use_game_engine) and (context.soft_body)
|
||||||
|
|
||||||
|
|
||||||
@ -53,22 +51,21 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel):
|
|||||||
md = context.soft_body
|
md = context.soft_body
|
||||||
ob = context.object
|
ob = context.object
|
||||||
|
|
||||||
if md:
|
softbody = md.settings
|
||||||
softbody = md.settings
|
|
||||||
|
|
||||||
# General
|
# General
|
||||||
split = layout.split()
|
split = layout.split()
|
||||||
split.enabled = softbody_panel_enabled(md)
|
split.enabled = softbody_panel_enabled(md)
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Object:")
|
col.label(text="Object:")
|
||||||
col.prop(softbody, "friction")
|
col.prop(softbody, "friction")
|
||||||
col.prop(softbody, "mass")
|
col.prop(softbody, "mass")
|
||||||
col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Mass:")
|
col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Mass:")
|
||||||
|
|
||||||
col = split.column()
|
col = split.column()
|
||||||
col.label(text="Simulation:")
|
col.label(text="Simulation:")
|
||||||
col.prop(softbody, "speed")
|
col.prop(softbody, "speed")
|
||||||
|
|
||||||
|
|
||||||
class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
|
class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, Panel):
|
||||||
|
Loading…
Reference in New Issue
Block a user