[Bf-extensions-cvs] [b2b015a3] master: Update for changes to Blender

Campbell Barton noreply at git.blender.org
Tue Mar 12 01:05:58 CET 2019


Commit: b2b015a396372e39a7035f394f06405b68423fed
Author: Campbell Barton
Date:   Tue Mar 12 11:05:44 2019 +1100
Branches: master
https://developer.blender.org/rBAb2b015a396372e39a7035f394f06405b68423fed

Update for changes to Blender

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

M	add_curve_extra_objects/add_curve_simple.py
M	animation_add_corrective_shape_key.py
M	bone_selection_sets.py
M	materials_utils/__init__.py
M	materials_utils/materials_cycles_converter.py
M	materials_utils/warning_messages_utils.py
M	mesh_extra_tools/__init__.py
M	mesh_looptools.py
M	mesh_relax.py
M	mesh_tiny_cad/__init__.py
M	oscurart_tools/__init__.py
M	rigify/legacy/rigs/pitchipoy/super_face.py
M	rigify/rigs/faces/super_face.py
M	rigify/ui.py
M	space_view3d_spacebar_menu.py

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

diff --git a/add_curve_extra_objects/add_curve_simple.py b/add_curve_extra_objects/add_curve_simple.py
index 39a5f159..fae815d4 100644
--- a/add_curve_extra_objects/add_curve_simple.py
+++ b/add_curve_extra_objects/add_curve_simple.py
@@ -1476,7 +1476,7 @@ def register():
         register_class(cls)
 
     bpy.types.VIEW3D_MT_curve_add.append(menu)
-    bpy.types.VIEW3D_MT_edit_curve_specials.prepend(Simple_curve_edit_menu)
+    bpy.types.VIEW3D_MT_edit_curve_context_menu.prepend(Simple_curve_edit_menu)
 
 def unregister():
     from bpy.utils import unregister_class
@@ -1484,7 +1484,7 @@ def unregister():
         unregister_class(cls)
 
     bpy.types.VIEW3D_MT_curve_add.remove(menu)
-    bpy.types.VIEW3D_MT_edit_curve_specials.remove(Simple_curve_edit_menu)
+    bpy.types.VIEW3D_MT_edit_curve_context_menu.remove(Simple_curve_edit_menu)
 
 if __name__ == "__main__":
     register()
diff --git a/animation_add_corrective_shape_key.py b/animation_add_corrective_shape_key.py
index c18d3b89..ed72fcae 100644
--- a/animation_add_corrective_shape_key.py
+++ b/animation_add_corrective_shape_key.py
@@ -419,7 +419,7 @@ def modifiers_draw(self, context):
 def register():
     bpy.utils.register_module(__name__)
 
-    bpy.types.MESH_MT_shape_key_specials.append(vgroups_draw)
+    bpy.types.MESH_MT_shape_key_context_menu.append(vgroups_draw)
     bpy.types.DATA_PT_modifiers.append(modifiers_draw)
 
 
diff --git a/bone_selection_sets.py b/bone_selection_sets.py
index e91d5557..0278bd23 100644
--- a/bone_selection_sets.py
+++ b/bone_selection_sets.py
@@ -62,7 +62,7 @@ class SelectionSet(PropertyGroup):
 
 # UI Panel w/ UIList ##########################################################
 
-class POSE_MT_selection_sets_specials(Menu):
+class POSE_MT_selection_sets_context_menu(Menu):
     bl_label = "Selection Sets Specials"
 
     def draw(self, context):
@@ -107,7 +107,7 @@ class POSE_PT_selection_sets(Panel):
         col = row.column(align=True)
         col.operator("pose.selection_set_add", icon='ADD', text="")
         col.operator("pose.selection_set_remove", icon='REMOVE', text="")
-        col.menu("POSE_MT_selection_sets_specials", icon='DOWNARROW_HLT', text="")
+        col.menu("POSE_MT_selection_sets_context_menu", icon='DOWNARROW_HLT', text="")
 
         # move up/down arrows
         if len(arm.selection_sets) > 0:
@@ -512,7 +512,7 @@ def uniqify(name: str, other_names: list) -> str:
 
 classes = (
     POSE_MT_selection_set_create,
-    POSE_MT_selection_sets_specials,
+    POSE_MT_selection_sets_context_menu,
     POSE_MT_selection_sets_select,
     POSE_PT_selection_sets,
     POSE_UL_selection_set,
diff --git a/materials_utils/__init__.py b/materials_utils/__init__.py
index 8c606742..6c2c1349 100644
--- a/materials_utils/__init__.py
+++ b/materials_utils/__init__.py
@@ -949,7 +949,7 @@ class VIEW3D_OT_set_new_material_name(Operator):
 
     def draw(self, context):
         layout = self.layout
-        scene = context.scene.mat_specials
+        scene = context.scene.mat_context_menu
 
         box = layout.box()
         box.label(text="Base name:")
@@ -1004,7 +1004,7 @@ class VIEW3D_OT_assign_material(Operator):
 
     def execute(self, context):
         actob = context.active_object
-        scene = context.scene.mat_specials
+        scene = context.scene.mat_context_menu
         mn = self.matname
         tweak = scene.use_tweak
 
@@ -1206,7 +1206,7 @@ class VIEW3D_OT_select_material_by_name(Operator):
     def execute(self, context):
         if use_mat_menu_type() == 'POPUP':
             mats_col = context.scene.mat_specials_mats
-            scene = context.scene.mat_specials
+            scene = context.scene.mat_context_menu
             len_mats = len(mats_col)
             mat_index = scene.index_mat
 
@@ -1579,7 +1579,7 @@ class MATERIAL_OT_check_converter_path(Operator):
 
     def check_valid_path(self, context):
         sc = context.scene
-        paths = bpy.path.abspath(sc.mat_specials.conv_path)
+        paths = bpy.path.abspath(sc.mat_context_menu.conv_path)
 
         if bpy.data.filepath == "":
             warning_messages(self, "DIR_PATH_EMPTY", override=True)
@@ -1665,10 +1665,10 @@ def draw_ui_list_popups(self, context, obj_data=False):
 
     col.template_list(
         "VIEW3D_UL_assign_material_popup_ui",
-        'mat_specials',
+        'mat_context_menu',
         context.scene,
         'mat_specials_mats',
-        context.scene.mat_specials,
+        context.scene.mat_context_menu,
         'index_mat',
         rows=10
     )
@@ -1689,7 +1689,7 @@ class VIEW3D_MT_assign_material(Menu):
             layout.label(text="*No active Object in the Scene*", icon="INFO")
             use_separator(self, context)
 
-        mat_prop_name = context.scene.mat_specials.set_material_name
+        mat_prop_name = context.scene.mat_context_menu.set_material_name
         add_new = layout.operator(
                         "view3d.assign_material",
                         text="Add New", icon='ZOOMIN'
@@ -1975,7 +1975,7 @@ class MATERIAL_MT_scenemassive_opt(Menu):
 
     def draw(self, context):
         layout = self.layout
-        scene = context.scene.mat_specials
+        scene = context.scene.mat_context_menu
 
         layout.prop(scene, "EXTRACT_ALPHA",
                     text="Extract Alpha Textures (slow)")
@@ -2037,7 +2037,7 @@ class MATERIAL_PT_scenemassive(Panel):
         box = col.box()
         box.label(text="Save Directory")
         split = box.split(0.85)
-        split.prop(sc.mat_specials, "conv_path", text="", icon="RENDER_RESULT")
+        split.prop(sc.mat_context_menu, "conv_path", text="", icon="RENDER_RESULT")
         split.operator("material.check_converter_path",
                        text="", icon="EXTERNAL_DATA")
 
@@ -2378,7 +2378,7 @@ class VIEW3D_MT_material_utils_pref(AddonPreferences):
         box = col_m.box()
         box.label(text="Save Directory")
         split = box.split(0.85)
-        split.prop(sc.mat_specials, "conv_path", text="", icon="RENDER_RESULT")
+        split.prop(sc.mat_context_menu, "conv_path", text="", icon="RENDER_RESULT")
         split.operator(
             "material.check_converter_path",
             text="", icon="EXTERNAL_DATA"
@@ -2664,7 +2664,7 @@ def register():
     warning_messages_utils.MAT_SPEC_NAME = __name__
 
     # Register Scene Properties
-    bpy.types.Scene.mat_specials = PointerProperty(
+    bpy.types.Scene.mat_context_menu = PointerProperty(
         type=material_specials_scene_props
     )
     bpy.types.Scene.mat_specials_mats = CollectionProperty(
@@ -2678,8 +2678,8 @@ def register():
         kmi = km.keymap_items.new('wm.call_menu', 'Q', 'PRESS', shift=True)
         kmi.properties.name = "VIEW3D_MT_master_material"
 
-    bpy.types.MATERIAL_MT_specials.prepend(menu_move)
-    bpy.types.MATERIAL_MT_specials.append(menu_func)
+    bpy.types.MATERIAL_MT_context_menu.prepend(menu_move)
+    bpy.types.MATERIAL_MT_context_menu.append(menu_func)
 
 
 def unregister():
@@ -2692,10 +2692,10 @@ def unregister():
                     km.keymap_items.remove(kmi)
                     break
 
-    bpy.types.MATERIAL_MT_specials.remove(menu_move)
-    bpy.types.MATERIAL_MT_specials.remove(menu_func)
+    bpy.types.MATERIAL_MT_context_menu.remove(menu_move)
+    bpy.types.MATERIAL_MT_context_menu.remove(menu_func)
 
-    del bpy.types.Scene.mat_specials
+    del bpy.types.Scene.mat_context_menu
     del bpy.types.Scene.mat_specials_mats
 
     bpy.utils.unregister_module(__name__)
diff --git a/materials_utils/materials_cycles_converter.py b/materials_utils/materials_cycles_converter.py
index 11d2affa..573e4309 100644
--- a/materials_utils/materials_cycles_converter.py
+++ b/materials_utils/materials_cycles_converter.py
@@ -117,8 +117,8 @@ def BakingText(tex, mode, tex_type=None):
         sizeX = tex.texture.image.size[0]
         sizeY = tex.texture.image.size[1]
     else:
-        bake_size = (int(sc.mat_specials.img_bake_size) if
-                     sc.mat_specials.img_bake_size else 1024)
+        bake_size = (int(sc.mat_context_menu.img_bake_size) if
+                     sc.mat_context_menu.img_bake_size else 1024)
         sizeX = bake_size
         sizeY = bake_size
 
@@ -143,7 +143,7 @@ def BakingText(tex, mode, tex_type=None):
         check_area = False
 
     if check_area:
-        paths = bpy.path.abspath(sc.mat_specials.conv_path)
+        paths = bpy.path.abspath(sc.mat_context_menu.conv_path)
         tex_name = getattr(getattr(tex.texture, "image", None), "name", None)
         texture_name = (tex_name.rpartition(".")[0] if tex_name else tex.texture.name)
         new_tex_name = "baked"
@@ -207,7 +207,7 @@ def AutoNodeInitiate(active=False, operator=None):
         CHECK_AUTONODE = True
         collect_report("_______________________", True, False)
         AutoNode(active, operator)
-        if sc.mat_specials.SET_FAKE_USER:
+        if sc.mat_context_menu.SET_FAKE_USER:
             SetFakeUserTex()
     else:
         warning_messages(operator, 'DIR_PATH_CONVERT', override=True)
@@ -281,7 +281,7 @@ def AutoNode(active=False, operator=None):
                 link_fail = True
 
             # Create other shader types only sculpt/texture paint mode is False
-            sculpt_paint = sc.mat_specials.SCULPT_PAINT
+            sculpt_paint = sc.mat_context_menu.SCULPT_PAINT
             if sculpt_paint is False:
 
                 cmat_is_transp = cmat.use_transparency and cmat.alpha < 1
@@ -451,10 +451,10 @@ def AutoNode(active=False, operator=None):
                         img = None
 
                         if tex.texture.type == 'IMAGE':
-                            if sc.mat_specials.EXTRACT_ALPHA and tex.texture.use_alpha:
+                            if sc.mat_context_menu.EXTRACT_ALPHA and tex.texture.use_alpha:
                                 if (not
                                    os_path.exists(bpy.path.abspath(tex.texture.image.filepath + "_BAKING.png")) or
-                                   sc.mat_specials.EXTRACT_OW):
+                                   sc.mat_context_menu.EXTRACT_OW):
                                     baked_path = BakingText(tex, 'ALPHA')
 
                          

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-extensions-cvs mailing list