Some ui reorganization of the physics tab:

* Before the different simulations all had a panel with an "add this" button making the whole tab look really messy. It also rarely makes sense to have more than one or two physics things enabled for a single object, so having all the panels in the tab just added a great deal of visual clutter.
* Now there is a single "enable physics for" panel at the top that allows for enable/disable of any simulation. All actual physics panels are hidden until a simulation is enabled.
* There was no "add" button for force fields before, but I added a toggle between "none" and "force" to unify the ui even further.
This commit is contained in:
2011-01-23 14:04:31 +00:00
parent eafbb9221e
commit fa38da021c
9 changed files with 102 additions and 87 deletions

View File

@@ -29,7 +29,7 @@ class PhysicButtonsPanel():
def poll(cls, context):
ob = context.object
rd = context.scene.render
return (ob and ob.type == 'MESH') and (not rd.use_game_engine)
return (ob and ob.type == 'MESH') and (not rd.use_game_engine) and (context.fluid)
class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
@@ -40,25 +40,9 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
md = context.fluid
split = layout.split()
if md:
# remove modifier + settings
split.context_pointer_set("modifier", md)
split.operator("object.modifier_remove", text="Remove")
row = split.row(align=True)
row.prop(md, "show_render", text="")
row.prop(md, "show_viewport", text="")
fluid = md.settings
else:
# add modifier
split.operator("object.modifier_add", text="Add").type = 'FLUID_SIMULATION'
split.label()
if md:
row = layout.row()
if fluid is None:
row.label("built without fluids")