Changeset View
Changeset View
Standalone View
Standalone View
release/scripts/startup/bl_ui/properties_scene.py
| Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
| class SceneButtonsPanel: | class SceneButtonsPanel: | ||||
| bl_space_type = 'PROPERTIES' | bl_space_type = 'PROPERTIES' | ||||
| bl_region_type = 'WINDOW' | bl_region_type = 'WINDOW' | ||||
| bl_context = "scene" | bl_context = "scene" | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| return context.scene and (rd.engine in cls.COMPAT_ENGINES) | return context.scene and (view_render.engine in cls.COMPAT_ENGINES) | ||||
| class SCENE_PT_scene(SceneButtonsPanel, Panel): | class SCENE_PT_scene(SceneButtonsPanel, Panel): | ||||
| bl_label = "Scene" | bl_label = "Scene" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| scene = context.scene | scene = context.scene | ||||
| layout.prop(scene, "camera") | layout.prop(scene, "camera") | ||||
| layout.prop(scene, "background_set", text="Background") | layout.prop(scene, "background_set", text="Background") | ||||
| if context.scene.render.engine != 'BLENDER_GAME': | if context.engine != 'BLENDER_GAME': | ||||
| layout.prop(scene, "active_clip", text="Active Clip") | layout.prop(scene, "active_clip", text="Active Clip") | ||||
| class SCENE_PT_unit(SceneButtonsPanel, Panel): | class SCENE_PT_unit(SceneButtonsPanel, Panel): | ||||
| bl_label = "Units" | bl_label = "Units" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| def draw(self, context): | def draw(self, context): | ||||
| ▲ Show 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | |||||
| class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): | class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): | ||||
| bl_label = "Rigid Body World" | bl_label = "Rigid Body World" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| rd = scene.render | rd = scene.render | ||||
| return scene and (rd.engine in cls.COMPAT_ENGINES) | return scene and (view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| rbw = scene.rigidbody_world | rbw = scene.rigidbody_world | ||||
| if rbw is not None: | if rbw is not None: | ||||
| self.layout.prop(rbw, "enabled", text="") | self.layout.prop(rbw, "enabled", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| Show All 28 Lines | |||||
| class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): | class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): | ||||
| bl_label = "Rigid Body Cache" | bl_label = "Rigid Body Cache" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| rd = context.scene.render | |||||
| scene = context.scene | scene = context.scene | ||||
| return scene and scene.rigidbody_world and (rd.engine in cls.COMPAT_ENGINES) | view_render = scene.view_render | ||||
| return scene and scene.rigidbody_world and (view_render.engine in cls.COMPAT_ENGINES) | |||||
| def draw(self, context): | def draw(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| rbw = scene.rigidbody_world | rbw = scene.rigidbody_world | ||||
| point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.is_baked is False and rbw.enabled, 'RIGID_BODY') | point_cache_ui(self, context, rbw.point_cache, rbw.point_cache.is_baked is False and rbw.enabled, 'RIGID_BODY') | ||||
| class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): | class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): | ||||
| bl_label = "Rigid Body Field Weights" | bl_label = "Rigid Body Field Weights" | ||||
| bl_options = {'DEFAULT_CLOSED'} | bl_options = {'DEFAULT_CLOSED'} | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER'} | COMPAT_ENGINES = {'BLENDER_RENDER'} | ||||
| @classmethod | @classmethod | ||||
| def poll(cls, context): | def poll(cls, context): | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| scene = context.scene | scene = context.scene | ||||
| return scene and scene.rigidbody_world and (rd.engine in cls.COMPAT_ENGINES) | return scene and scene.rigidbody_world and (view_render.engine in cls.COMPAT_ENGINES) | ||||
| def draw(self, context): | def draw(self, context): | ||||
| scene = context.scene | scene = context.scene | ||||
| rbw = scene.rigidbody_world | rbw = scene.rigidbody_world | ||||
| effector_weights_ui(self, context, rbw.effector_weights, 'RIGID_BODY') | effector_weights_ui(self, context, rbw.effector_weights, 'RIGID_BODY') | ||||
| class SCENE_PT_simplify(SceneButtonsPanel, Panel): | class SCENE_PT_simplify(SceneButtonsPanel, Panel): | ||||
| bl_label = "Simplify" | bl_label = "Simplify" | ||||
| COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_CLAY', 'BLENDER_EEVEE'} | ||||
| def draw_header(self, context): | def draw_header(self, context): | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| self.layout.prop(rd, "use_simplify", text="") | self.layout.prop(rd, "use_simplify", text="") | ||||
| def draw(self, context): | def draw(self, context): | ||||
| layout = self.layout | layout = self.layout | ||||
| rd = context.scene.render | view_render = context.scene.view_render | ||||
| layout.active = rd.use_simplify | layout.active = rd.use_simplify | ||||
| split = layout.split() | split = layout.split() | ||||
| col = split.column() | col = split.column() | ||||
| col.label(text="Viewport:") | col.label(text="Viewport:") | ||||
| col.prop(rd, "simplify_subdivision", text="Subdivision") | col.prop(rd, "simplify_subdivision", text="Subdivision") | ||||
| Show All 38 Lines | |||||