[Bf-extensions-cvs] [410ea07a] blender2.8: Pie menu official: Updates for latest API changes

Sergey Sharybin noreply at git.blender.org
Fri Sep 7 11:40:54 CEST 2018


Commit: 410ea07adc66c4ddd11d2f25e262daccba1ad391
Author: Sergey Sharybin
Date:   Fri Sep 7 11:40:33 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBA410ea07adc66c4ddd11d2f25e262daccba1ad391

Pie menu official: Updates for latest API changes

Also restpored name of menu entry in previous commit.

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

M	pie_menus_official/__init__.py
M	pie_menus_official/pie_manipulator_of.py
M	pie_menus_official/pie_view_of.py
M	space_view3d_pie_menus/pie_manipulator_menu.py

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

diff --git a/pie_menus_official/__init__.py b/pie_menus_official/__init__.py
index 91318e0d..52c8d346 100644
--- a/pie_menus_official/__init__.py
+++ b/pie_menus_official/__init__.py
@@ -129,42 +129,42 @@ class UIToolsPreferences(AddonPreferences):
             op = sub.operator('wm.context_toggle', text='', icon=icon,
                               emboss=False)
             op.data_path = 'addon_prefs.show_expanded_' + mod_name
-            sub.label('{}: {}'.format(info['category'], info['name']))
+            sub.label(text='{}: {}'.format(info['category'], info['name']))
             sub = row.row()
             sub.alignment = 'RIGHT'
             if info.get('warning'):
-                sub.label('', icon='ERROR')
+                sub.label(text='', icon='ERROR')
             sub.prop(self, 'use_' + mod_name, text='')
 
             # The second stage
             if expand:
                 if info.get('description'):
-                    split = col.row().split(percentage=0.15)
-                    split.label('Description:')
-                    split.label(info['description'])
+                    split = col.row().split(factor=0.15)
+                    split.label(text='Description:')
+                    split.label(text=info['description'])
                 if info.get('location'):
-                    split = col.row().split(percentage=0.15)
-                    split.label('Location:')
-                    split.label(info['location'])
+                    split = col.row().split(factor=0.15)
+                    split.label(text='Location:')
+                    split.label(text=info['location'])
                 """
                 if info.get('author'):
-                    split = col.row().split(percentage=0.15)
-                    split.label('Author:')
-                    split.label(info['author'])
+                    split = col.row().split(factor=0.15)
+                    split.label(text='Author:')
+                    split.label(text=info['author'])
                 """
                 if info.get('version'):
-                    split = col.row().split(percentage=0.15)
-                    split.label('Version:')
-                    split.label('.'.join(str(x) for x in info['version']),
+                    split = col.row().split(factor=0.15)
+                    split.label(text='Version:')
+                    split.label(text='.'.join(str(x) for x in info['version']),
                                 translate=False)
                 if info.get('warning'):
-                    split = col.row().split(percentage=0.15)
-                    split.label('Warning:')
-                    split.label('  ' + info['warning'], icon='ERROR')
+                    split = col.row().split(factor=0.15)
+                    split.label(text='Warning:')
+                    split.label(text='  ' + info['warning'], icon='ERROR')
 
                 tot_row = int(bool(info.get('wiki_url')))
                 if tot_row:
-                    split = col.row().split(percentage=0.15)
+                    split = col.row().split(factor=0.15)
                     split.label(text='Internet:')
                     if info.get('wiki_url'):
                         op = split.operator('wm.url_open',
diff --git a/pie_menus_official/pie_manipulator_of.py b/pie_menus_official/pie_manipulator_of.py
index 9e36e729..eb475cf7 100644
--- a/pie_menus_official/pie_manipulator_of.py
+++ b/pie_menus_official/pie_manipulator_of.py
@@ -26,7 +26,7 @@ class VIEW3D_manipulator_set_of(Operator):
     bl_label = "Set Manipulator"
     bl_idname = "view3d.manipulator_set"
 
-    type = EnumProperty(
+    type: EnumProperty(
             name="Type",
             items=(('TRANSLATE', "Translate", "Use the manipulator for movement transformations"),
                    ('ROTATE', "Rotate", "Use the manipulator for rotation transformations"),
@@ -36,7 +36,7 @@ class VIEW3D_manipulator_set_of(Operator):
 
     def execute(self, context):
         # show manipulator if user selects an option
-        context.space_data.show_manipulator = True
+        context.space_data.show_gizmo = True
         context.space_data.transform_manipulators = {self.type}
 
         return {'FINISHED'}
@@ -50,10 +50,10 @@ class VIEW3D_PIE_manipulator_of(Menu):
         layout = self.layout
 
         pie = layout.menu_pie()
-        pie.operator("wm.tool_set_by_name", icon='MAN_TRANS', text="Translate").name = "Grab"
+        pie.operator("wm.tool_set_by_name", icon='MAN_TRANS', text="Translate").name = "Move"
         pie.operator("wm.tool_set_by_name", icon='MAN_ROT', text="Rotate").name = "Rotate"
         pie.operator("wm.tool_set_by_name", icon='MAN_SCALE', text="Scale").name = "Scale"
-        pie.prop(context.space_data, "show_manipulator")
+        pie.prop(context.space_data, "show_gizmo")
 
 
 classes = (
diff --git a/pie_menus_official/pie_view_of.py b/pie_menus_official/pie_view_of.py
index 65a2e262..30b85d8d 100644
--- a/pie_menus_official/pie_view_of.py
+++ b/pie_menus_official/pie_view_of.py
@@ -38,7 +38,7 @@ class VIEW3D_PIE_view_of(Menu):
         layout = self.layout
 
         pie = layout.menu_pie()
-        pie.operator_enum("VIEW3D_OT_viewnumpad", "type")
+        pie.operator_enum("VIEW3D_OT_view_axis", "type")
         pie.operator("wm.call_menu_pie", text="More", icon='PLUS').name = "VIEW3D_PIE_view_more_of"
 
 
diff --git a/space_view3d_pie_menus/pie_manipulator_menu.py b/space_view3d_pie_menus/pie_manipulator_menu.py
index 200a87b4..3a599483 100644
--- a/space_view3d_pie_menus/pie_manipulator_menu.py
+++ b/space_view3d_pie_menus/pie_manipulator_menu.py
@@ -63,7 +63,7 @@ class PieManipulator(Menu):
         layout = self.layout
         pie = layout.menu_pie()
         # 4 - LEFT
-        pie.operator("wm.tool_set_by_name", text="Move", icon='MAN_TRANS').name = "Move"
+        pie.operator("wm.tool_set_by_name", text="Translate", icon='MAN_TRANS').name = "Move"
         # 6 - RIGHT
         pie.operator("wm.tool_set_by_name", text="Scale", icon='MAN_SCALE').name = "Scale"
         # 2 - BOTTOM



More information about the Bf-extensions-cvs mailing list