[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [1491] trunk/py/scripts/addons: changes Operator names for new, stricter checking.

Campbell Barton ideasman42 at gmail.com
Mon Jan 24 14:19:06 CET 2011


Revision: 1491
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=1491
Author:   campbellbarton
Date:     2011-01-24 13:19:05 +0000 (Mon, 24 Jan 2011)
Log Message:
-----------
changes Operator names for new, stricter checking.

Modified Paths:
--------------
    trunk/py/scripts/addons/add_curve_aceous_galore.py
    trunk/py/scripts/addons/add_mesh_BoltFactory/Boltfactory.py
    trunk/py/scripts/addons/add_mesh_ant_landscape.py
    trunk/py/scripts/addons/development_icon_get.py
    trunk/py/scripts/addons/io_coat3D/coat.py
    trunk/py/scripts/addons/io_export_pc2.py
    trunk/py/scripts/addons/io_export_unreal_psk_psa.py
    trunk/py/scripts/addons/mesh_surface_sketch.py
    trunk/py/scripts/addons/space_view3d_copy_attributes.py
    trunk/py/scripts/addons/space_view3d_materials_utils.py
    trunk/py/scripts/addons/space_view3d_panel_measure.py
    trunk/py/scripts/addons/system_icon_get.py

Modified: trunk/py/scripts/addons/add_curve_aceous_galore.py
===================================================================
--- trunk/py/scripts/addons/add_curve_aceous_galore.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/add_curve_aceous_galore.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -765,7 +765,7 @@
 
 class Curveaceous_galore(bpy.types.Operator):
     ''''''
-    bl_idname = "curveaceous_galore"
+    bl_idname = "mesh.curveaceous_galore"
     bl_label = "Curveaceous galore"
     bl_options = {'REGISTER', 'UNDO'}
     bl_description = "adds many types of curves"

Modified: trunk/py/scripts/addons/add_mesh_BoltFactory/Boltfactory.py
===================================================================
--- trunk/py/scripts/addons/add_mesh_BoltFactory/Boltfactory.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/add_mesh_BoltFactory/Boltfactory.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -43,7 +43,7 @@
 
 class add_mesh_bolt(bpy.types.Operator):
     ''''''
-    bl_idname = 'add_mesh_bolt'
+    bl_idname = "mesh.bolt_add"
     bl_label = "Add Bolt"
     bl_options = {'REGISTER', 'UNDO'}
     bl_description = "adds many types of Bolts"
@@ -71,7 +71,7 @@
                         ('bf_Head_Cap','CAP','Cap Head'),
                         ('bf_Head_Dome','DOME','Dome Head'),
                         ('bf_Head_Pan','PAN','Pan Head'),
-			('bf_Head_CounterSink','COUNTER SINK','Counter Sink Head')]
+                        ('bf_Head_CounterSink','COUNTER SINK','Counter Sink Head')]
     bf_Head_Type = EnumProperty( attr='bf_Head_Type',
             name='Head',
             description='Choose the type off Head you would like',
@@ -298,7 +298,7 @@
         #self.bf_Minor_Dia = self.bf_Major_Dia - (1.082532 * self.bf_Pitch)
         
         Create_New_Mesh(self, context, self.align_matrix)
-	
+
         return {'FINISHED'}
         
     ##### INVOKE #####

Modified: trunk/py/scripts/addons/add_mesh_ant_landscape.py
===================================================================
--- trunk/py/scripts/addons/add_mesh_ant_landscape.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/add_mesh_ant_landscape.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -516,7 +516,7 @@
 # Add landscape
 class landscape_add(bpy.types.Operator):
     '''Add a landscape mesh'''
-    bl_idname = "Add_landscape"
+    bl_idname = "mesh.landscape_add"
     bl_label = "Landscape"
     bl_options = {'REGISTER', 'UNDO'}
     bl_description = "Add landscape mesh"

Modified: trunk/py/scripts/addons/development_icon_get.py
===================================================================
--- trunk/py/scripts/addons/development_icon_get.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/development_icon_get.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -62,6 +62,7 @@
 
 
 class WM_OT_icon_info(bpy.types.Operator):
+    bl_idname = "wm.icon_info"
     bl_label = "Icon Info"
     bl_description = "Click to copy this icon name to the clipboard"
     icon = bpy.props.StringProperty()
@@ -74,6 +75,7 @@
 
 
 class WM_OT_icon_prop_update(bpy.types.Operator):
+    bl_idname = "wm.icon_prop_update"
     bl_label = "Icon Search"
     bl_description = "Update icon_prop values"
     

Modified: trunk/py/scripts/addons/io_coat3D/coat.py
===================================================================
--- trunk/py/scripts/addons/io_coat3D/coat.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/io_coat3D/coat.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -174,7 +174,7 @@
 
 
 class SCENE_OT_export(bpy.types.Operator):
-    bl_idname = "exportbutton"
+    bl_idname = "export_applink.pilgway_3d_coat"
     bl_label = "Export your custom property"
     bl_description = "Export your custom property"
 
@@ -239,7 +239,7 @@
 
 
 class SCENE_OT_import(bpy.types.Operator):
-    bl_idname = "importbutton"
+    bl_idname = "import_applink.pilgway_3d_coat"
     bl_label = "import your custom property"
     bl_description = "import your custom property"
     
@@ -374,7 +374,7 @@
         return('FINISHED')
 
 class SCENE_OT_load3b(bpy.types.Operator):
-    bl_idname = "load3b"
+    bl_idname = "import_applink.pilgway_3d_coat_3b"
     bl_label = "Loads 3b linked into object"
     bl_description = "Loads 3b linked into object"
 
@@ -399,7 +399,7 @@
         return('FINISHED')
 
 class SCENE_OT_deltex(bpy.types.Operator):
-    bl_idname = "deltex"
+    bl_idname = "import_applink.pilgway_3d_deltex"  # XXX, name?
     bl_label = "Picks Object's name into path"
     bl_description = "Loads 3b linked into object"
 

Modified: trunk/py/scripts/addons/io_export_pc2.py
===================================================================
--- trunk/py/scripts/addons/io_export_pc2.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/io_export_pc2.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -107,7 +107,7 @@
 ###### EXPORT OPERATOR #######
 class Export_pc2(bpy.types.Operator, ExportHelper):
     '''Exports the active Object as a .pc2 Pointcache file.'''
-    bl_idname = "export_pc2"
+    bl_idname = "export_shape.pc2"
     bl_label = "Export Pointcache (.pc2)"
 
     filename_ext = ".pc2"

Modified: trunk/py/scripts/addons/io_export_unreal_psk_psa.py
===================================================================
--- trunk/py/scripts/addons/io_export_unreal_psk_psa.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/io_export_unreal_psk_psa.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -1660,7 +1660,7 @@
 class ExportUDKAnimData(bpy.types.Operator):
     global exportmessage
     '''Export Skeleton Mesh / Animation Data file(s)'''
-    bl_idname = "export.udk_anim_data" # this is important since its how bpy.ops.export.udk_anim_data is constructed
+    bl_idname = "export_anim.udk" # this is important since its how bpy.ops.export.udk_anim_data is constructed
     bl_label = "Export PSK/PSA"
     __doc__ = "One mesh and one armature else select one mesh or armature to be exported."
 
@@ -1742,7 +1742,7 @@
         
 class OBJECT_OT_UnrealExport(bpy.types.Operator):
     global exportmessage
-    bl_idname = "OBJECT_OT_UnrealExport"
+    bl_idname = "export_mesh.udk"  # XXX, name???
     bl_label = "Unreal Export"
     __doc__ = "Select export setting for .psk/.psa or both."
     
@@ -1772,7 +1772,7 @@
     #bpy.context.scene.unrealexportpsk = True
     #bpy.context.scene.unrealexportpsa = True
     default_path = os.path.splitext(bpy.data.filepath)[0] + ".psk"
-    self.layout.operator("export.udk_anim_data", text="Skeleton Mesh / Animation Data (.psk/.psa)").filepath = default_path
+    self.layout.operator(ExportUDKAnimData.bl_idname, text="Skeleton Mesh / Animation Data (.psk/.psa)").filepath = default_path
 
 def register():
     bpy.types.INFO_MT_file_export.append(menu_func)

Modified: trunk/py/scripts/addons/mesh_surface_sketch.py
===================================================================
--- trunk/py/scripts/addons/mesh_surface_sketch.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/mesh_surface_sketch.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -58,19 +58,19 @@
         col = layout.column(align=True)
         row = layout.row()
         row.separator()
-        col.operator("GPENCIL_OT_SURFSK_add_surface", text="Add Surface")
+        col.operator(GPENCIL_OT_surfsk_surface_add.bl_idname, text="Add Surface")
         col.prop(scn, "SURFSK_edges_U")
         col.prop(scn, "SURFSK_edges_V")
         row.separator()
         col.prop(scn, "SURFSK_keep_strokes")
         col.separator()
         row.separator()
-        col.operator("GPENCIL_OT_SURFSK_strokes_to_curves", text="Strokes to curves")
+        col.operator(GPENCIL_OT_surfsk_strokes_to_curves.bl_idname, text="Strokes to curves")
         
 
 
-class GPENCIL_OT_SURFSK_add_surface(bpy.types.Operator):
-    bl_idname = "GPENCIL_OT_SURFSK_add_surface"
+class GPENCIL_OT_surfsk_surface_add(bpy.types.Operator):
+    bl_idname = "gpencil.surfsk_surface_add"
     bl_label = "Surface generation from grease pencil strokes"
     bl_description = "Surface generation from grease pencil strokes"
     
@@ -734,12 +734,11 @@
 
 
 
-class GPENCIL_OT_SURFSK_strokes_to_curves(bpy.types.Operator):
-    bl_idname = "GPENCIL_OT_SURFSK_strokes_to_curves"
+class GPENCIL_OT_surfsk_strokes_to_curves(bpy.types.Operator):
+    bl_idname = "gpencil.surfsk_strokes_to_curves"
     bl_label = "Convert grease pencil strokes into curves and enter edit mode"
     bl_description = "Convert grease pencil strokes into curves and enter edit mode"
-    
-    
+
     def execute(self, context):
         #### Convert grease pencil strokes to curve.
         bpy.ops.gpencil.convert(type='CURVE')
@@ -797,8 +796,8 @@
     km = kc.keymaps.get("3D View")
     if km is None:
         km = kc.keymaps.new(name="3D View")
-    keymap_item_add_surf = km.items.new("GPENCIL_OT_SURFSK_add_surface","E","PRESS", key_modifier="D")
-    keymap_item_stroke_to_curve = km.items.new("GPENCIL_OT_SURFSK_strokes_to_curves","C","PRESS", key_modifier="D")
+    keymap_item_add_surf = km.items.new(GPENCIL_OT_surfsk_surface_add.bl_idname,"E","PRESS", key_modifier="D")
+    keymap_item_stroke_to_curve = km.items.new(GPENCIL_OT_surfsk_strokes_to_curves.bl_idname,"C","PRESS", key_modifier="D")
 
 
 def unregister():
@@ -811,9 +810,9 @@
     km = kc.keymaps["3D View"]
     for kmi in km.items:
         if kmi.idname == 'wm.call_menu':
-            if kmi.properties.name == "GPENCIL_OT_SURFSK_add_surface":
+            if kmi.properties.name == GPENCIL_OT_surfsk_surface_add.bl_idname:
                 km.items.remove(kmi)
-            elif kmi.properties.name == "GPENCIL_OT_SURFSK_strokes_to_curves":
+            elif kmi.properties.name == GPENCIL_OT_surfsk_strokes_to_curves.bl_idname:
                 km.items.remove(kmi)   
             else:
                 continue

Modified: trunk/py/scripts/addons/space_view3d_copy_attributes.py
===================================================================
--- trunk/py/scripts/addons/space_view3d_copy_attributes.py	2011-01-24 12:03:15 UTC (rev 1490)
+++ trunk/py/scripts/addons/space_view3d_copy_attributes.py	2011-01-24 13:19:05 UTC (rev 1491)
@@ -192,25 +192,25 @@
 def pIKsExec(bone, active, context):
     generic_copy(active, bone, "ik_")
 
-pose_copies = (('POSE_LOC_LOC', "Local Location",
+pose_copies = (('pose_loc_loc', "Local Location",
                 "Copy Location from Active to Selected", pLocLocExec),

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list