Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_physics_common.py
| Show All 24 Lines | |||||
| class PhysicButtonsPanel: | class PhysicButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "physics" | bl_context = "physics" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return (context.object) and rd.engine in cls.COMPAT_ENGINES | return (context.object) and view_render.engine in cls.COMPAT_ENGINES | ||||
| def physics_add(self, layout, md, name, type, typeicon, toggles): | def physics_add(self, layout, md, name, type, typeicon, toggles): | ||||
| row = layout.row(align=True) | row = layout.row(align=True) | ||||
| if md: | if md: | ||||
| row.context_pointer_set("modifier", md) | row.context_pointer_set("modifier", md) | ||||
| row.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X') | row.operator("object.modifier_remove", text=name, text_ctxt=i18n_contexts.default, icon='X') | ||||
| if toggles: | if toggles: | ||||
| ▲ Show 20 Lines • Show All 287 Lines • Show Last 20 Lines | |||||