Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_game.py
| Show First 20 Lines • Show All 740 Lines • ▼ Show 20 Lines | |||||
| class DATA_PT_shadow_game(DataButtonsPanel, Panel): | class DATA_PT_shadow_game(DataButtonsPanel, Panel): | ||||
| bl_label = "Shadow" | bl_label = "Shadow" | ||||
| COMPAT_ENGINES = {'BLENDER_GAME'} | COMPAT_ENGINES = {'BLENDER_GAME'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| COMPAT_LIGHTS = {'SPOT', 'SUN'} | COMPAT_LIGHTS = {'SPOT', 'SUN'} | ||||
| lamp = context.lamp | lamp = context.lamp | ||||
| engine = context.scene.render.engine | engine = context.engine | ||||
| return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES) | return (lamp and lamp.type in COMPAT_LIGHTS) and (engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| lamp = context.lamp | lamp = context.lamp | ||||
| self.layout.prop(lamp, "use_shadow", text="") | self.layout.prop(lamp, "use_shadow", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| ▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | |||||
| class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel): | class OBJECT_PT_levels_of_detail(ObjectButtonsPanel, Panel): | ||||
| bl_label = "Levels of Detail" | bl_label = "Levels of Detail" | ||||
| COMPAT_ENGINES = {'BLENDER_GAME'} | COMPAT_ENGINES = {'BLENDER_GAME'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| return context.scene.render.engine in cls.COMPAT_ENGINES | return 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 | ||||
| gs = context.scene.game_settings | gs = context.scene.game_settings | ||||
| col = layout.column() | col = layout.column() | ||||
| ▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines | |||||