scene panel for rigid body - remove operator isnt greyed out when rigidbody is disabled

This commit is contained in:
2013-01-23 08:07:39 +00:00
parent bb14b390e5
commit 45fb9f9f09
2 changed files with 16 additions and 14 deletions

View File

@@ -48,7 +48,7 @@ class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel):
ob = context.object
rbo = ob.rigid_body
if rbo:
if rbo is not None:
layout.prop(rbo, "type", text="Type")
row = layout.row()

View File

@@ -269,26 +269,28 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel):
rbw = scene.rigidbody_world
if not rbw:
if rbw is None:
layout.operator("rigidbody.world_add")
else:
split = layout.split()
split.operator("rigidbody.world_remove")
layout.active = rbw.enabled
col = layout.column()
col.operator("rigidbody.world_remove")
col = layout.column()
col.prop(rbw, "group")
col.prop(rbw, "constraints")
col.active = rbw.enabled
split = layout.split()
colsub = col.column()
colsub.prop(rbw, "group")
colsub.prop(rbw, "constraints")
col = split.column()
col.prop(rbw, "time_scale", text="Speed")
col.prop(rbw, "use_split_impulse")
split = col.split()
col = split.column()
col.prop(rbw, "steps_per_second", text="Steps Per Second")
col.prop(rbw, "num_solver_iterations", text="Solver Iterations")
colsub = split.column()
colsub.prop(rbw, "time_scale", text="Speed")
colsub.prop(rbw, "use_split_impulse")
colsub = split.column()
colsub.prop(rbw, "steps_per_second", text="Steps Per Second")
colsub.prop(rbw, "num_solver_iterations", text="Solver Iterations")
class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel):