diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-03-26 17:41:56 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-03-26 17:43:12 +0300 |
commit | 16a04dccd556d2969e0868aa91667449deae90d2 (patch) | |
tree | b0cc04a018deeb359b1e6223891e2e587fdc1781 /release/scripts/startup | |
parent | 8e0eb4125d46458a59cbf44613ee79ee2f7df71a (diff) |
Fix T62955: Missing panels in workbench engine
Afaik all the panels in the scene settings are render
engine independent. So it does not make sense to have
this extra complexity in every panel class.
Reviewers: brecht, billreynish
Differential Revision: https://developer.blender.org/D4594
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_scene.py | 44 |
1 files changed, 8 insertions, 36 deletions
diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index f3243d92520..5687caa8be0 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -50,14 +50,9 @@ class SceneButtonsPanel: bl_region_type = 'WINDOW' bl_context = "scene" - @classmethod - def poll(cls, context): - return (context.engine in cls.COMPAT_ENGINES) - class SCENE_PT_scene(SceneButtonsPanel, Panel): bl_label = "Scene" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} def draw(self, context): layout = self.layout @@ -74,7 +69,6 @@ class SCENE_PT_scene(SceneButtonsPanel, Panel): class SCENE_PT_unit(SceneButtonsPanel, Panel): bl_label = "Units" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} def draw(self, context): layout = self.layout @@ -158,7 +152,6 @@ class SceneKeyingSetsPanel: class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Keying Sets" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} def draw(self, context): layout = self.layout @@ -192,7 +185,6 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Keyframing Settings" bl_parent_id = "SCENE_PT_keying_sets" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): @@ -229,7 +221,6 @@ class SCENE_PT_keyframing_settings(SceneButtonsPanel, SceneKeyingSetsPanel, Pane class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): bl_label = "Active Keying Set" bl_parent_id = "SCENE_PT_keying_sets" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} @classmethod def poll(cls, context): @@ -292,7 +283,6 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, SceneKeyingSetsPanel, Panel): class SCENE_PT_audio(SceneButtonsPanel, Panel): bl_label = "Audio" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} def draw(self, context): layout = self.layout @@ -331,7 +321,6 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel): class SCENE_PT_physics(SceneButtonsPanel, Panel): bl_label = "Gravity" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} def draw_header(self, context): self.layout.prop(context.scene, "use_gravity", text="") @@ -350,11 +339,6 @@ class SCENE_PT_physics(SceneButtonsPanel, Panel): class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): bl_label = "Rigid Body World" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - - @classmethod - def poll(cls, context): - return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -375,15 +359,17 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): layout.operator("rigidbody.world_remove") -class SCENE_PT_rigid_body_world_settings(SceneButtonsPanel, Panel): - bl_label = "Settings" +class RigidBodySubPanel(SceneButtonsPanel): bl_parent_id = "SCENE_PT_rigid_body_world" - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE'} @classmethod def poll(cls, context): scene = context.scene - return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) + return scene and scene.rigidbody_world + + +class SCENE_PT_rigid_body_world_settings(RigidBodySubPanel, Panel): + bl_label = "Settings" def draw(self, context): layout = self.layout @@ -414,16 +400,9 @@ class SCENE_PT_rigid_body_world_settings(SceneButtonsPanel, Panel): col.prop(rbw, "solver_iterations", text="Solver Iterations") -class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): +class SCENE_PT_rigid_body_cache(RigidBodySubPanel, Panel): bl_label = "Cache" - bl_parent_id = "SCENE_PT_rigid_body_world" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - - @classmethod - def poll(cls, context): - scene = context.scene - return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): scene = context.scene @@ -432,16 +411,10 @@ class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): 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(RigidBodySubPanel, Panel): bl_label = "Field Weights" bl_parent_id = "SCENE_PT_rigid_body_world" bl_options = {'DEFAULT_CLOSED'} - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} - - @classmethod - def poll(cls, context): - scene = context.scene - return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): scene = context.scene @@ -451,7 +424,6 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): - COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'} _context_path = "scene" _property_type = bpy.types.Scene |