diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-10-16 22:15:03 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-10-16 22:29:04 +0300 |
commit | e4f2b2be26adbb5c34231598526a270559c6e183 (patch) | |
tree | 40601b1349372904cffe619003dcc83b7011d8be /release/scripts/startup/bl_ui/properties_material.py | |
parent | e8962f90de4222d6f750d3d3478eff65490365d8 (diff) |
Workspace: Move engines to workspace and Properties Editor cleanup
Engine is not stored in WorkSpaces. That defines the "context" engine, which
is used for the entire UI.
The engine used for the poll of nodes (add node menu, new nodes when "Use Nodes")
is obtained from context.
Introduce a ViewRender struct for viewport settings that are defined for
workspaces and scene. This struct will be populated with the hand-picked
settings that can be defined per workspace as per the 2.8 design.
* use_scene_settings
* properties editor: workshop + organize context path
Use Scene Settings
==================
For viewport drawing, Workspaces have an option to use the Scene render
settings (F12) instead of the viewport settings.
This way users can quickly preview the final render settings, engine and
View Layer. This will affect all the editors in that workspace, and it will be
clearly indicated in the top-bar.
Properties Editor: Add Workspace and organize context path
==========================================================
We now have the properties of:
Scene, Scene > Layer, Scene > World, Workspace
[Scene | Workspace] > Render Layer > Object
[Scene | Workspace] > Render Layer > Object > Data
(...)
Reviewers: Campbell Barton, Julian Eisel
Differential Revision: https://developer.blender.org/D2842
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_material.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material.py | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 29cb2466ee5..42a132004d4 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -82,7 +82,7 @@ class MATERIAL_UL_matslots(UIList): layout.prop(ma, "name", text="", emboss=False, icon_value=icon) else: layout.label(text="", icon_value=icon) - if ma and not context.scene.render.use_shading_nodes: + if ma and not context.view_render.use_shading_nodes: manode = ma.active_node_material if manode: layout.label(text=iface_("Node %s") % manode.name, translate=False, icon_value=layout.icon(manode)) @@ -101,7 +101,7 @@ class MaterialButtonsPanel: @classmethod def poll(cls, context): - return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES) + return context.material and (context.engine in cls.COMPAT_ENGINES) class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): @@ -114,7 +114,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): # An exception, don't call the parent poll func because # this manages materials for all engine types - engine = context.scene.render.engine + engine = context.engine return (context.material or context.object) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -197,7 +197,7 @@ class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (not simple_material(mat)) and (mat.type in {'SURFACE', 'WIRE', 'VOLUME'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -250,7 +250,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -307,7 +307,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -360,7 +360,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -394,7 +394,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -460,7 +460,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -518,7 +518,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -569,7 +569,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -622,7 +622,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -656,7 +656,7 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES) + return context.material and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -685,7 +685,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES) + return context.material and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -718,7 +718,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type in {'SURFACE', 'WIRE', 'HALO'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -764,7 +764,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -814,7 +814,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -864,7 +864,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -897,7 +897,7 @@ class VolumeButtonsPanel: @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES) @@ -982,7 +982,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and simple_material(mat) and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1023,7 +1023,7 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1061,7 +1061,7 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - engine = context.scene.render.engine + engine = context.engine return (context.material or context.object) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1135,7 +1135,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - engine = context.scene.render.engine + engine = context.engine return context.material and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1163,7 +1163,7 @@ class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - engine = context.scene.render.engine + engine = context.engine return context.material and (engine in cls.COMPAT_ENGINES) def draw(self, context): |