From 131ea02a4c0cc0c245c39488113fbe4b433afdee Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 2 Sep 2017 19:33:06 +1000 Subject: [PATCH] Cleanup: quiet strict name warnings for addons a..h. --- add_advanced_objects_menu/arrange_on_curve.py | 1 + add_advanced_objects_menu/cubester.py | 2 +- add_curve_extra_objects/__init__.py | 6 ++-- add_curve_extra_objects/add_curve_simple.py | 1 + .../add_curve_spirofit_bouncespline.py | 1 + add_curve_sapling/__init__.py | 4 +-- add_mesh_extra_objects/mesh_discombobulator.py | 8 ++--- ant_landscape/__init__.py | 2 ++ archimesh/__init__.py | 4 +-- archimesh/achm_main_panel.py | 2 +- archimesh/achm_window_panel.py | 2 +- archipack/__init__.py | 13 ++++---- bone_selection_sets.py | 4 +-- btrace/__init__.py | 38 +++++++++++----------- btrace/bTrace_props.py | 1 + camera_dolly_crane_rigs.py | 2 ++ camera_turnaround.py | 1 + development_api_navigator.py | 2 +- development_edit_operator.py | 1 + development_iskeyfree.py | 1 + light_field_tools/__init__.py | 4 +-- light_field_tools/light_field_tools.py | 2 +- materials_utils/__init__.py | 4 +-- measureit/__init__.py | 4 +-- rigify/ui.py | 8 ++--- uv_texture_atlas.py | 1 + 26 files changed, 65 insertions(+), 54 deletions(-) diff --git a/add_advanced_objects_menu/arrange_on_curve.py b/add_advanced_objects_menu/arrange_on_curve.py index b811263b..c292e341 100644 --- a/add_advanced_objects_menu/arrange_on_curve.py +++ b/add_advanced_objects_menu/arrange_on_curve.py @@ -31,6 +31,7 @@ FLT_MIN = 0.004 class PanelDupliCurve(Panel): + bl_idname = "VIEW3D_PT_arranjar_numa_curva" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" bl_context = "objectmode" diff --git a/add_advanced_objects_menu/cubester.py b/add_advanced_objects_menu/cubester.py index 1a516bd0..f1a8f581 100644 --- a/add_advanced_objects_menu/cubester.py +++ b/add_advanced_objects_menu/cubester.py @@ -695,7 +695,7 @@ def material_frame_handler(scene): class CubeSterPanel(Panel): - bl_idname = "OBJECT_PT.cubester" + bl_idname = "OBJECT_PT_cubester" bl_label = "CubeSter" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" diff --git a/add_curve_extra_objects/__init__.py b/add_curve_extra_objects/__init__.py index ae8cdf89..42ae2d44 100644 --- a/add_curve_extra_objects/__init__.py +++ b/add_curve_extra_objects/__init__.py @@ -225,9 +225,9 @@ class CurveExtraObjectsAddonPreferences(AddonPreferences): icon="LAYER_USED") -class INFO_MT_curve_knots_add1(Menu): +class INFO_MT_curve_knots_add(Menu): # Define the "Extras" menu - bl_idname = "curve_knots_add" + bl_idname = "INFO_MT_curve_knots_add" bl_label = "Plants" def draw(self, context): @@ -253,7 +253,7 @@ def menu_func(self, context): icon='CURVE_DATA') layout.separator() - layout.menu("curve_knots_add", text="Knots", icon='CURVE_DATA') + layout.menu(INFO_MT_curve_knots_add.bl_idname, text="Knots", icon='CURVE_DATA') layout.separator() layout.operator("curve.curlycurve", text="Curly Curve", icon='CURVE_DATA') diff --git a/add_curve_extra_objects/add_curve_simple.py b/add_curve_extra_objects/add_curve_simple.py index 3e85fa18..c6908ce9 100644 --- a/add_curve_extra_objects/add_curve_simple.py +++ b/add_curve_extra_objects/add_curve_simple.py @@ -1399,6 +1399,7 @@ class BezierDivide(Operator): # Simple change panel class SimplePanel(Panel): + bl_idname = "VIEW3D_PT_simple_curve" bl_label = "Simple Curve" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" diff --git a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py index 33caf120..d0c1c747 100644 --- a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py +++ b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py @@ -979,6 +979,7 @@ def draw_spline_settings(self): # Tools Panel > Create # ------------------------------------------------------------ class SplinePanel(Panel): + bl_idname = "VIEW3D_PT_spirofit_spline" bl_space_type = "VIEW_3D" bl_context = "objectmode" bl_region_type = "TOOLS" diff --git a/add_curve_sapling/__init__.py b/add_curve_sapling/__init__.py index 48b45d31..274c1fef 100644 --- a/add_curve_sapling/__init__.py +++ b/add_curve_sapling/__init__.py @@ -235,7 +235,7 @@ class ImportData(Operator): class PresetMenu(Menu): """Create the preset menu by finding all preset files in the preset directory""" - bl_idname = "sapling.presetmenu" + bl_idname = "SAPLING_MT_preset" bl_label = "Presets" def draw(self, context): @@ -930,7 +930,7 @@ class AddTree(Operator): row.label(" ") row.prop(self, 'overwrite') row = box.row() - row.menu('sapling.presetmenu', text='Load Preset') + row.menu('SAPLING_MT_preset', text='Load Preset') row.prop(self, 'limitImport') elif self.chooseSet == '1': diff --git a/add_mesh_extra_objects/mesh_discombobulator.py b/add_mesh_extra_objects/mesh_discombobulator.py index 9d9469d2..b677fc6c 100644 --- a/add_mesh_extra_objects/mesh_discombobulator.py +++ b/add_mesh_extra_objects/mesh_discombobulator.py @@ -627,7 +627,7 @@ class discombobulator(Operator): class discombobulator_dodads_list(Menu): - bl_idname = "object.discombobulator_dodad_list" + bl_idname = "OBJECT_MT_discombobulator_dodad_list" bl_label = "List of saved Doodads" bl_description = "List of the saved Doodad Object Names" bl_options = {'REGISTER'} @@ -644,7 +644,7 @@ class discombobulator_dodads_list(Menu): class discombob_help(Menu): - bl_idname = "help.discombobulator" + bl_idname = "HELP_MT_discombobulator" bl_label = "Usage Information" bl_description = "Help" bl_options = {'REGISTER'} @@ -688,7 +688,7 @@ class VIEW3D_OT_tools_discombobulate(Operator): layout = self.layout row = layout.row() - row.menu('help.discombobulator', icon='INFO') + row.menu('HELP_MT_discombobulator', icon='INFO') box = layout.box() box.label("Protusions settings") row = box.row() @@ -740,7 +740,7 @@ class VIEW3D_OT_tools_discombobulate(Operator): doodle = len(bpy.context.scene.discomb.DISC_doodads) col.enabled = (True if doodle > 0 else False) - col.menu("object.discombobulator_dodad_list", + col.menu("OBJECT_MT_discombobulator_dodad_list", text="List of saved Doodads ({})".format(doodle)) box = layout.box() diff --git a/ant_landscape/__init__.py b/ant_landscape/__init__.py index e4ae01d1..ba6e8b6f 100644 --- a/ant_landscape/__init__.py +++ b/ant_landscape/__init__.py @@ -76,6 +76,7 @@ def menu_func_landscape(self, context): # Landscape Add Panel class panel_func_add_landscape(bpy.types.Panel): + bl_idname = "ANTLANDSCAPE_PT_add" bl_space_type = "VIEW_3D" bl_context = "objectmode" bl_region_type = "TOOLS" @@ -90,6 +91,7 @@ class panel_func_add_landscape(bpy.types.Panel): # Landscape Tools: class AntLandscapeToolsPanel(bpy.types.Panel): + bl_idname = "ANTLANDSCAPE_PT_tools" bl_space_type = "VIEW_3D" bl_context = "objectmode" bl_region_type = "TOOLS" diff --git a/archimesh/__init__.py b/archimesh/__init__.py index e9ba3883..cb22e157 100644 --- a/archimesh/__init__.py +++ b/archimesh/__init__.py @@ -58,7 +58,7 @@ if "bpy" in locals(): importlib.reload(achm_venetian_maker) importlib.reload(achm_main_panel) importlib.reload(achm_window_panel) - print("archimesh: Reloaded multifiles") + # print("archimesh: Reloaded multifiles") else: from . import achm_books_maker from . import achm_column_maker @@ -75,7 +75,7 @@ else: from . import achm_window_maker from . import achm_window_panel - print("archimesh: Imported multifiles") + # print("archimesh: Imported multifiles") # noinspection PyUnresolvedReferences import bpy diff --git a/archimesh/achm_main_panel.py b/archimesh/achm_main_panel.py index 288922f3..d12c2a6b 100644 --- a/archimesh/achm_main_panel.py +++ b/archimesh/achm_main_panel.py @@ -388,7 +388,7 @@ class AchmPencilAction(Operator): # Define panel class for main functions. # ------------------------------------------------------------------ class ArchimeshMainPanel(Panel): - bl_idname = "archimesh_main_panel" + bl_idname = "ARCHIMESH_PT_main" bl_label = "Archimesh" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" diff --git a/archimesh/achm_window_panel.py b/archimesh/achm_window_panel.py index ce7cb34e..592e13a6 100644 --- a/archimesh/achm_window_panel.py +++ b/archimesh/achm_window_panel.py @@ -1772,7 +1772,7 @@ Object.WindowPanelGenerator = CollectionProperty(type=GeneralPanelProperties) # Define panel class to modify myobjects. # ------------------------------------------------------------------ class AchmWindowEditPanel(Panel): - bl_idname = "window.edit_panel2" + bl_idname = "ARCHIMESH_PT_window_edit" bl_label = "Window Panel" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' diff --git a/archipack/__init__.py b/archipack/__init__.py index 7707abd3..0f5d3a86 100644 --- a/archipack/__init__.py +++ b/archipack/__init__.py @@ -63,7 +63,7 @@ if "bpy" in locals(): imp.reload(archipack_floor) imp.reload(archipack_rendering) - print("archipack: reload ready") + # print("archipack: reload ready") else: from . import archipack_progressbar from . import archipack_material @@ -82,7 +82,7 @@ else: from . import archipack_floor from . import archipack_rendering - print("archipack: ready") + # print("archipack: ready") # noinspection PyUnresolvedReferences import bpy @@ -433,9 +433,8 @@ def draw_menu(self, context): ).preset_operator = "archipack.roof" -class ARCHIPACK_create_menu(Menu): +class ARCHIPACK_MT_create(Menu): bl_label = 'Archipack' - bl_idname = 'ARCHIPACK_create_menu' def draw(self, context): draw_menu(self, context) @@ -450,7 +449,7 @@ def menu_func(self, context): # either draw sub menu or right at end of this one if context.user_preferences.addons[__name__].preferences.create_submenu: layout.operator_context = 'INVOKE_REGION_WIN' - layout.menu("ARCHIPACK_create_menu", icon_value=icons["archipack"].icon_id) + layout.menu("ARCHIPACK_MT_create", icon_value=icons["archipack"].icon_id) else: draw_menu(self, context) @@ -504,14 +503,14 @@ def register(): WindowManager.archipack = PointerProperty(type=archipack_data) bpy.utils.register_class(Archipack_Pref) update_panel(None, bpy.context) - bpy.utils.register_class(ARCHIPACK_create_menu) + bpy.utils.register_class(ARCHIPACK_MT_create) bpy.types.INFO_MT_mesh_add.append(menu_func) def unregister(): global icons_collection bpy.types.INFO_MT_mesh_add.remove(menu_func) - bpy.utils.unregister_class(ARCHIPACK_create_menu) + bpy.utils.unregister_class(ARCHIPACK_MT_create) bpy.utils.unregister_class(TOOLS_PT_Archipack_Tools) bpy.utils.unregister_class(TOOLS_PT_Archipack_Create) diff --git a/bone_selection_sets.py b/bone_selection_sets.py index bd7b26c0..46aa7f25 100644 --- a/bone_selection_sets.py +++ b/bone_selection_sets.py @@ -129,7 +129,7 @@ class POSE_UL_selection_set(UIList): class POSE_MT_create_new_selection_set(Menu): - bl_idname = "pose.selection_set_create_new_popup" + bl_idname = "POSE_MT_selection_set_create" bl_label = "Choose Selection Set" def draw(self, context): @@ -293,7 +293,7 @@ class POSE_OT_selection_set_assign(PluginOperator): if not (arm.active_selection_set < len(arm.selection_sets)): bpy.ops.wm.call_menu("INVOKE_DEFAULT", - name="pose.selection_set_create_new_popup") + name="POSE_MT_selection_set_create") else: bpy.ops.pose.selection_set_assign('EXEC_DEFAULT') diff --git a/btrace/__init__.py b/btrace/__init__.py index c1f62512..8f00f2c3 100644 --- a/btrace/__init__.py +++ b/btrace/__init__.py @@ -39,27 +39,27 @@ else: import bpy from bpy.types import AddonPreferences from .bTrace_props import ( - TracerProperties, - addTracerObjectPanel, - ) + TracerProperties, + addTracerObjectPanel, +) from .bTrace import ( - OBJECT_OT_convertcurve, - OBJECT_OT_objecttrace, - OBJECT_OT_objectconnect, - OBJECT_OT_writing, - OBJECT_OT_particletrace, - OBJECT_OT_traceallparticles, - OBJECT_OT_curvegrow, - OBJECT_OT_reset, - OBJECT_OT_fcnoise, - OBJECT_OT_meshfollow, - OBJECT_OT_materialChango, - OBJECT_OT_clearColorblender, - ) + OBJECT_OT_convertcurve, + OBJECT_OT_objecttrace, + OBJECT_OT_objectconnect, + OBJECT_OT_writing, + OBJECT_OT_particletrace, + OBJECT_OT_traceallparticles, + OBJECT_OT_curvegrow, + OBJECT_OT_reset, + OBJECT_OT_fcnoise, + OBJECT_OT_meshfollow, + OBJECT_OT_materialChango, + OBJECT_OT_clearColorblender, +) from bpy.props import ( - EnumProperty, - PointerProperty, - ) + EnumProperty, + PointerProperty, +) # Add-on Preferences diff --git a/btrace/bTrace_props.py b/btrace/bTrace_props.py index bff3b88f..70c57532 100644 --- a/btrace/bTrace_props.py +++ b/btrace/bTrace_props.py @@ -568,6 +568,7 @@ class TracerProperties(PropertyGroup): # Draw Brush panel in Toolbar class addTracerObjectPanel(Panel): + bl_idname = "BTRACE_PT_object_brush" bl_label = "Btrace" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" diff --git a/camera_dolly_crane_rigs.py b/camera_dolly_crane_rigs.py index 8175ac3f..16443675 100644 --- a/camera_dolly_crane_rigs.py +++ b/camera_dolly_crane_rigs.py @@ -754,6 +754,7 @@ def build_crane_rig(context): # This is the UI for the Dolly Camera Rig # ========================================================================= class DollyCameraUI(Panel): + bl_idname = "CAMERA_DOLLY_PT_ui" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' bl_label = "Dolly Camera UI" @@ -819,6 +820,7 @@ class DollyCameraUI(Panel): # This is the UI for the Crane Rig Camera # ========================================================================= class CraneCameraUI(Panel): + bl_idname = "CAMERA_CRANE_PT_ui" bl_space_type = 'VIEW_3D' bl_region_type = 'UI' bl_label = "Crane Camera UI" diff --git a/camera_turnaround.py b/camera_turnaround.py index afae29e5..d1a27e98 100644 --- a/camera_turnaround.py +++ b/camera_turnaround.py @@ -262,6 +262,7 @@ class CameraTurnProps(PropertyGroup): # UI Class # ------------------------------------------------------ class PanelUI(Panel): + bl_idname = "CAMERA_TURN_PT_main" bl_label = "Turnaround Camera" bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" diff --git a/development_api_navigator.py b/development_api_navigator.py index 599f6f4e..15622ec7 100644 --- a/development_api_navigator.py +++ b/development_api_navigator.py @@ -457,7 +457,7 @@ class Toggle_doc(ApiNavigator, Operator): # ######### UI Panels ############ class OBJECT_PT_api_navigator(ApiNavigator, Panel): - bl_idname = 'api_navigator' + bl_idname = 'OBJECT_PT_api_navigator' bl_space_type = "TEXT_EDITOR" bl_region_type = "UI" bl_label = "API Navigator" diff --git a/development_edit_operator.py b/development_edit_operator.py index 3124146b..54d5424e 100644 --- a/development_edit_operator.py +++ b/development_edit_operator.py @@ -139,6 +139,7 @@ class EditOperator(Operator): class EditOperatorPanel(Panel): + bl_idname = "DEVEDIT_PT_operator" bl_space_type = 'TEXT_EDITOR' bl_region_type = 'UI' bl_label = "Edit Operator" diff --git a/development_iskeyfree.py b/development_iskeyfree.py index bf703b2e..0408a648 100644 --- a/development_iskeyfree.py +++ b/development_iskeyfree.py @@ -216,6 +216,7 @@ class RunActionCheck(Operator): # Defines UI panel # ------------------------------------------------------ class UIControlPanel(Panel): + bl_idname = "DEVISKEYFREE_PT_ui" bl_space_type = "TEXT_EDITOR" bl_region_type = "UI" bl_label = "Is Key Free" diff --git a/light_field_tools/__init__.py b/light_field_tools/__init__.py index 66c7d61a..386e767a 100644 --- a/light_field_tools/__init__.py +++ b/light_field_tools/__init__.py @@ -125,8 +125,8 @@ class LightFieldPropertyGroup(PropertyGroup): # Define Panel classes for updating panels = ( - light_field_tools.VIEW3D_OT_lightfield_tools, - ) + light_field_tools.VIEW3D_PT_lightfield_tools, +) def update_panel(self, context): diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py index f32f0a9b..b4693d52 100644 --- a/light_field_tools/light_field_tools.py +++ b/light_field_tools/light_field_tools.py @@ -384,7 +384,7 @@ class OBJECT_OT_create_lightfield_basemesh(Operator): return {'FINISHED'} -class VIEW3D_OT_lightfield_tools(Panel): +class VIEW3D_PT_lightfield_tools(Panel): bl_space_type = "VIEW_3D" bl_region_type = "TOOLS" bl_context = "objectmode" diff --git a/materials_utils/__init__.py b/materials_utils/__init__.py index 1cfec059..3bc94ddf 100644 --- a/materials_utils/__init__.py +++ b/materials_utils/__init__.py @@ -1764,7 +1764,7 @@ class MATERIAL_PT_scenemassive(Panel): box = layout.box() row = box.row() row.menu("scenemassive.opt", text="Advanced Options", icon='SCRIPTWIN') - row.menu("help.biconvert", + row.menu("HELP_MT_biconvert", text="Usage Information Guide", icon="INFO") box = layout.box() @@ -1812,7 +1812,7 @@ class MATERIAL_PT_xps_convert(Panel): # Converters Help # class MATERIAL_MT_biconv_help(Menu): - bl_idname = "help.biconvert" + bl_idname = "HELP_MT_biconvert" bl_description = "Read Instructions & Current Limitations" bl_label = "Usage Information Guide" bl_options = {'REGISTER'} diff --git a/measureit/__init__.py b/measureit/__init__.py index a07eb662..489e0a9e 100644 --- a/measureit/__init__.py +++ b/measureit/__init__.py @@ -47,10 +47,10 @@ if "bpy" in locals(): import importlib importlib.reload(measureit_main) - print("measureit: Reloaded multifiles") + # print("measureit: Reloaded multifiles") else: from . import measureit_main - print("measureit: Imported multifiles") + # print("measureit: Imported multifiles") # noinspection PyUnresolvedReferences import bpy diff --git a/rigify/ui.py b/rigify/ui.py index 77e06f01..458dceed 100644 --- a/rigify/ui.py +++ b/rigify/ui.py @@ -507,7 +507,7 @@ class DATA_UL_rigify_bone_groups(bpy.types.UIList): row2.enabled = not bpy.context.object.data.rigify_colors_lock -class DATA_PT_rigify_bone_groups_specials(bpy.types.Menu): +class DATA_MT_rigify_bone_groups_specials(bpy.types.Menu): bl_label = 'Rigify Bone Groups Specials' def draw(self, context): @@ -549,7 +549,7 @@ class DATA_PT_rigify_bone_groups(bpy.types.Panel): col = row.column(align=True) col.operator("armature.rigify_bone_group_add", icon='ZOOMIN', text="") col.operator("armature.rigify_bone_group_remove", icon='ZOOMOUT', text="").idx = obj.data.rigify_colors_index - col.menu("DATA_PT_rigify_bone_groups_specials", icon='DOWNARROW_HLT', text="") + col.menu("DATA_MT_rigify_bone_groups_specials", icon='DOWNARROW_HLT', text="") row = layout.row() row.prop(armature, 'rigify_theme_to_add', text = 'Theme') op = row.operator("armature.rigify_bone_group_add_theme", text="Add From Theme") @@ -1320,7 +1320,7 @@ def register(): bpy.utils.register_class(DATA_OT_rigify_bone_group_remove) bpy.utils.register_class(DATA_OT_rigify_bone_group_remove_all) bpy.utils.register_class(DATA_UL_rigify_bone_groups) - bpy.utils.register_class(DATA_PT_rigify_bone_groups_specials) + bpy.utils.register_class(DATA_MT_rigify_bone_groups_specials) bpy.utils.register_class(DATA_PT_rigify_bone_groups) bpy.utils.register_class(DATA_PT_rigify_layer_names) bpy.utils.register_class(DATA_PT_rigify_buttons) @@ -1356,7 +1356,7 @@ def unregister(): bpy.utils.unregister_class(DATA_OT_rigify_bone_group_remove) bpy.utils.unregister_class(DATA_OT_rigify_bone_group_remove_all) bpy.utils.unregister_class(DATA_UL_rigify_bone_groups) - bpy.utils.unregister_class(DATA_PT_rigify_bone_groups_specials) + bpy.utils.unregister_class(DATA_MT_rigify_bone_groups_specials) bpy.utils.unregister_class(DATA_PT_rigify_bone_groups) bpy.utils.unregister_class(DATA_PT_rigify_layer_names) bpy.utils.unregister_class(DATA_PT_rigify_buttons) diff --git a/uv_texture_atlas.py b/uv_texture_atlas.py index 14db2e87..974d998c 100644 --- a/uv_texture_atlas.py +++ b/uv_texture_atlas.py @@ -77,6 +77,7 @@ def check_group_exist(self, context, use_report=True): class TexAtl_Main(Panel): + bl_idname = "UVTEX_ATLAS_PT_main" bl_label = "Texture Atlas" bl_space_type = 'PROPERTIES' bl_region_type = 'WINDOW' -- 2.11.4.GIT