Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_rigidbody.py
| Show All 29 Lines | |||||
| class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): | class PHYSICS_PT_rigid_body(PHYSICS_PT_rigidbody_panel, Panel): | ||||
| bl_label = "Rigid Body" | bl_label = "Rigid Body" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.rigid_body and | return (obj and obj.rigid_body and | ||||
| (context.scene.render.engine in cls.COMPAT_ENGINES)) | (context.engine in cls.COMPAT_ENGINES)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ob = context.object | ob = context.object | ||||
| rbo = ob.rigid_body | rbo = ob.rigid_body | ||||
| if rbo is not None: | if rbo is not None: | ||||
| Show All 10 Lines | |||||
| class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): | class PHYSICS_PT_rigid_body_collisions(PHYSICS_PT_rigidbody_panel, Panel): | ||||
| bl_label = "Rigid Body Collisions" | bl_label = "Rigid Body Collisions" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.rigid_body and | return (obj and obj.rigid_body and | ||||
| (context.scene.render.engine in cls.COMPAT_ENGINES)) | (context.engine in cls.COMPAT_ENGINES)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ob = context.object | ob = context.object | ||||
| rbo = ob.rigid_body | rbo = ob.rigid_body | ||||
| layout.prop(rbo, "collision_shape", text="Shape") | layout.prop(rbo, "collision_shape", text="Shape") | ||||
| Show All 29 Lines | class PHYSICS_PT_rigid_body_dynamics(PHYSICS_PT_rigidbody_panel, Panel): | ||||
| bl_default_closed = True | bl_default_closed = True | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| obj = context.object | obj = context.object | ||||
| return (obj and obj.rigid_body and | return (obj and obj.rigid_body and | ||||
| obj.rigid_body.type == 'ACTIVE' and | obj.rigid_body.type == 'ACTIVE' and | ||||
| (context.scene.render.engine in cls.COMPAT_ENGINES)) | (context.engine in cls.COMPAT_ENGINES)) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| ob = context.object | ob = context.object | ||||
| rbo = ob.rigid_body | rbo = ob.rigid_body | ||||
| #col = layout.column(align=1) | #col = layout.column(align=1) | ||||
| Show All 31 Lines | |||||