[Bf-blender-cvs] [f2b31b510a2] topbar: Fix errors in UI scripts after last merge

Julian Eisel noreply at git.blender.org
Thu Oct 19 19:37:43 CEST 2017


Commit: f2b31b510a23ce8db52712462367dc4c941e5372
Author: Julian Eisel
Date:   Thu Oct 19 19:36:18 2017 +0200
Branches: topbar
https://developer.blender.org/rBf2b31b510a23ce8db52712462367dc4c941e5372

Fix errors in UI scripts after last merge

Patch by @sergey, with minor fixes.

===================================================================

M	release/scripts/startup/bl_ui/space_topbar.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py
index 028fd848c6e..314826b0110 100644
--- a/release/scripts/startup/bl_ui/space_topbar.py
+++ b/release/scripts/startup/bl_ui/space_topbar.py
@@ -71,11 +71,11 @@ class TOPBAR_HT_upper_bar(Header):
         layout = self.layout
 
         window = context.window
-        scene = context.scene
-        rd = scene.render
+        workspace = context.workspace
+        view_render = workspace.view_render
 
-        if rd.has_multiple_engines:
-            layout.prop(rd, "engine", text="")
+        if view_render.has_multiple_engines:
+            layout.prop(view_render, "engine", text="")
 
         layout.template_ID(window, "scene", new="scene.new", unlink="scene.delete")
 
@@ -127,12 +127,11 @@ class TOPBAR_MT_editor_menus(Menu):
 
     @staticmethod
     def draw_menus(layout, context):
-        scene = context.scene
-        rd = scene.render
+        view_render = context.view_render
 
         layout.menu("TOPBAR_MT_file")
 
-        if rd.use_game_engine:
+        if view_render.use_game_engine:
             layout.menu("TOPBAR_MT_game")
         else:
             layout.menu("TOPBAR_MT_render")



More information about the Bf-blender-cvs mailing list