diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-29 16:02:21 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-08-29 17:25:50 +0300 |
commit | 0d085790d13b2c261210addb12fabc1fea82bdef (patch) | |
tree | a7f778e09368e9691bb413b3c665acd90e435c16 /release/scripts | |
parent | 42f7767dab56ce6cf26e490c3cb2c689b2b0d507 (diff) |
Python / Cleanup: rename INFO_MT to TOPBAR_MT/VIEW3D_MT to reflect actual location.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/presets/keyconfig/3dsmax.py | 10 | ||||
-rw-r--r-- | release/scripts/presets/keyconfig/blender_27x.py | 10 | ||||
-rw-r--r-- | release/scripts/presets/keyconfig/maya.py | 10 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_topbar.py | 108 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 101 | ||||
-rw-r--r-- | release/scripts/templates_py/addon_add_object.py | 4 | ||||
-rw-r--r-- | release/scripts/templates_py/operator_file_export.py | 4 | ||||
-rw-r--r-- | release/scripts/templates_py/operator_file_import.py | 4 | ||||
-rw-r--r-- | release/scripts/templates_py/operator_mesh_add.py | 4 |
9 files changed, 109 insertions, 146 deletions
diff --git a/release/scripts/presets/keyconfig/3dsmax.py b/release/scripts/presets/keyconfig/3dsmax.py index 8bce68a0a30..fa5d40b1868 100644 --- a/release/scripts/presets/keyconfig/3dsmax.py +++ b/release/scripts/presets/keyconfig/3dsmax.py @@ -11,7 +11,7 @@ kmi = km.keymap_items.new('wm.window_new', 'W', 'PRESS', ctrl=True, alt=True) kmi = km.keymap_items.new('wm.read_homefile', 'N', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.save_homefile', 'U', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.call_menu', 'O', 'PRESS', shift=True, ctrl=True) -kmi.properties.name = 'INFO_MT_file_open_recent' +kmi.properties.name = 'TOPBAR_MT_file_open_recent' kmi = km.keymap_items.new('wm.open_mainfile', 'O', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.open_mainfile', 'F1', 'PRESS') kmi = km.keymap_items.new('wm.link', 'O', 'PRESS', ctrl=True, alt=True) @@ -214,7 +214,7 @@ km = kc.keymaps.new('Pose', space_type='EMPTY', region_type='WINDOW', modal=Fals kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_add' +kmi.properties.name = 'VIEW3D_MT_add' kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS') kmi.properties.unselected = False kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS', shift=True) @@ -333,7 +333,7 @@ kmi = km.keymap_items.new('object.delete', 'DEL', 'PRESS') kmi = km.keymap_items.new('object.delete', 'DEL', 'PRESS', shift=True) kmi.properties.use_global = True kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_add' +kmi.properties.name = 'VIEW3D_MT_add' kmi = km.keymap_items.new('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True) kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True, ctrl=True) kmi.properties.name = 'VIEW3D_MT_object_apply' @@ -2157,7 +2157,7 @@ kmi = km.keymap_items.new('transform.shrink_fatten', 'S', 'PRESS', alt=True) kmi = km.keymap_items.new('mesh.edge_face_add', 'F', 'PRESS', ctrl=True) kmi = km.keymap_items.new('mesh.duplicate_move', 'D', 'PRESS', shift=True) kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_mesh_add' +kmi.properties.name = 'VIEW3D_MT_mesh_add' kmi = km.keymap_items.new('mesh.separate', 'P', 'PRESS') kmi = km.keymap_items.new('mesh.split', 'Y', 'PRESS') kmi = km.keymap_items.new('mesh.vert_connect', 'J', 'PRESS') @@ -2227,7 +2227,7 @@ kmi.properties.value = '(False,False,True)' km = kc.keymaps.new('Curve', space_type='EMPTY', region_type='WINDOW', modal=False) kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_edit_curve_add' +kmi.properties.name = 'TOPBAR_MT_edit_curve_add' kmi = km.keymap_items.new('curve.handle_type_set', 'V', 'PRESS') kmi = km.keymap_items.new('curve.vertex_add', 'LEFTMOUSE', 'CLICK', ctrl=True) kmi = km.keymap_items.new('curve.select_all', 'LEFTMOUSE', 'CLICK') diff --git a/release/scripts/presets/keyconfig/blender_27x.py b/release/scripts/presets/keyconfig/blender_27x.py index c71b7456cff..cf736e1a5a5 100644 --- a/release/scripts/presets/keyconfig/blender_27x.py +++ b/release/scripts/presets/keyconfig/blender_27x.py @@ -8,7 +8,7 @@ keyconfig_data = \ ("wm.call_menu", {"type": 'O', "value": 'PRESS', "shift": True, "ctrl": True}, {"properties": - [("name", 'INFO_MT_file_open_recent'), + [("name", 'TOPBAR_MT_file_open_recent'), ], }, ), @@ -1020,7 +1020,7 @@ keyconfig_data = \ ("wm.call_menu", {"type": 'A', "value": 'PRESS', "shift": True}, {"properties": - [("name", 'INFO_MT_add'), + [("name", 'VIEW3D_MT_add'), ], }, ), @@ -1321,7 +1321,7 @@ keyconfig_data = \ ("wm.call_menu", {"type": 'A', "value": 'PRESS', "shift": True}, {"properties": - [("name", 'INFO_MT_add'), + [("name", 'VIEW3D_MT_add'), ], }, ), @@ -1460,7 +1460,7 @@ keyconfig_data = \ [("wm.call_menu", {"type": 'A', "value": 'PRESS', "shift": True}, {"properties": - [("name", 'INFO_MT_edit_curve_add'), + [("name", 'TOPBAR_MT_edit_curve_add'), ], }, ), @@ -3249,7 +3249,7 @@ keyconfig_data = \ ("wm.call_menu", {"type": 'A', "value": 'PRESS', "shift": True}, {"properties": - [("name", 'INFO_MT_mesh_add'), + [("name", 'VIEW3D_MT_mesh_add'), ], }, ), diff --git a/release/scripts/presets/keyconfig/maya.py b/release/scripts/presets/keyconfig/maya.py index da1446f6f43..676ccb8bec3 100644 --- a/release/scripts/presets/keyconfig/maya.py +++ b/release/scripts/presets/keyconfig/maya.py @@ -12,7 +12,7 @@ kmi = km.keymap_items.new('wm.window_new', 'W', 'PRESS', ctrl=True, alt=True) kmi = km.keymap_items.new('wm.read_homefile', 'N', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.save_homefile', 'U', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.call_menu', 'O', 'PRESS', shift=True, ctrl=True) -kmi.properties.name = 'INFO_MT_file_open_recent' +kmi.properties.name = 'TOPBAR_MT_file_open_recent' kmi = km.keymap_items.new('wm.open_mainfile', 'O', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.open_mainfile', 'F1', 'PRESS') kmi = km.keymap_items.new('wm.link', 'O', 'PRESS', ctrl=True, alt=True) @@ -274,7 +274,7 @@ km = kc.keymaps.new('Pose', space_type='EMPTY', region_type='WINDOW', modal=Fals kmi = km.keymap_items.new('object.parent_set', 'P', 'PRESS') kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_add' +kmi.properties.name = 'VIEW3D_MT_add' kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS', ctrl=True) kmi.properties.unselected = False kmi = km.keymap_items.new('pose.hide', 'H', 'PRESS', alt=True) @@ -383,7 +383,7 @@ kmi.properties.unselected = True kmi = km.keymap_items.new('object.delete', 'BACK_SPACE', 'PRESS') kmi = km.keymap_items.new('object.delete', 'DEL', 'PRESS') kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_add' +kmi.properties.name = 'VIEW3D_MT_add' kmi = km.keymap_items.new('object.duplicates_make_real', 'A', 'PRESS', shift=True, ctrl=True) kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', ctrl=True, alt=True) kmi.properties.name = 'VIEW3D_MT_object_apply' @@ -650,7 +650,7 @@ kmi = km.keymap_items.new('mesh.merge', 'M', 'PRESS', alt=True) kmi = km.keymap_items.new('mesh.edge_face_add', 'F', 'PRESS', alt=True) kmi = km.keymap_items.new('mesh.duplicate_move', 'D', 'PRESS', ctrl=True) kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_mesh_add' +kmi.properties.name = 'VIEW3D_MT_mesh_add' kmi = km.keymap_items.new('mesh.dupli_extrude_cursor', 'MIDDLEMOUSE', 'CLICK', ctrl=True) kmi = km.keymap_items.new('wm.call_menu', 'BACK_SPACE', 'PRESS') kmi.properties.name = 'VIEW3D_MT_edit_mesh_delete' @@ -720,7 +720,7 @@ kmi = km.keymap_items.new_modal('CUT_THROUGH_TOGGLE', 'Z', 'PRESS') km = kc.keymaps.new('Curve', space_type='EMPTY', region_type='WINDOW', modal=False) kmi = km.keymap_items.new('wm.call_menu', 'A', 'PRESS', shift=True) -kmi.properties.name = 'INFO_MT_edit_curve_add' +kmi.properties.name = 'TOPBAR_MT_edit_curve_add' kmi = km.keymap_items.new('curve.handle_type_set', 'RIGHTMOUSE', 'PRESS') kmi = km.keymap_items.new('curve.vertex_add', 'MIDDLEMOUSE', 'CLICK', ctrl=True) kmi = km.keymap_items.new('curve.select_all', 'A', 'PRESS', ctrl=True) diff --git a/release/scripts/startup/bl_ui/space_topbar.py b/release/scripts/startup/bl_ui/space_topbar.py index cc3d92547e3..b6a68f06785 100644 --- a/release/scripts/startup/bl_ui/space_topbar.py +++ b/release/scripts/startup/bl_ui/space_topbar.py @@ -40,7 +40,7 @@ class TOPBAR_HT_upper_bar(Header): layout.operator("wm.splash", text="", icon='BLENDER', emboss=False) - INFO_MT_editor_menus.draw_collapsible(context, layout) + TOPBAR_MT_editor_menus.draw_collapsible(context, layout) layout.separator() @@ -262,8 +262,8 @@ class _draw_left_context_mode: layout.prop(brush, "use_puff_volume") -class INFO_MT_editor_menus(Menu): - bl_idname = "INFO_MT_editor_menus" +class TOPBAR_MT_editor_menus(Menu): + bl_idname = "TOPBAR_MT_editor_menus" bl_label = "" def draw(self, context): @@ -271,16 +271,16 @@ class INFO_MT_editor_menus(Menu): @staticmethod def draw_menus(layout, context): - layout.menu("INFO_MT_file") - layout.menu("INFO_MT_edit") + layout.menu("TOPBAR_MT_file") + layout.menu("TOPBAR_MT_edit") - layout.menu("INFO_MT_render") + layout.menu("TOPBAR_MT_render") - layout.menu("INFO_MT_window") - layout.menu("INFO_MT_help") + layout.menu("TOPBAR_MT_window") + layout.menu("TOPBAR_MT_help") -class INFO_MT_file(Menu): +class TOPBAR_MT_file(Menu): bl_label = "File" def draw(self, context): @@ -289,7 +289,7 @@ class INFO_MT_file(Menu): layout.operator_context = 'INVOKE_AREA' layout.operator("wm.read_homefile", text="New", icon='NEW') layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER') - layout.menu("INFO_MT_file_open_recent") + layout.menu("TOPBAR_MT_file_open_recent") layout.operator("wm.revert_mainfile") layout.operator("wm.recover_last_session") layout.operator("wm.recover_auto_save", text="Recover Auto Save...") @@ -315,16 +315,16 @@ class INFO_MT_file(Menu): layout.operator_context = 'INVOKE_AREA' layout.operator("wm.link", text="Link...", icon='LINK_BLEND') layout.operator("wm.append", text="Append...", icon='APPEND_BLEND') - layout.menu("INFO_MT_file_previews") + layout.menu("TOPBAR_MT_file_previews") layout.separator() - layout.menu("INFO_MT_file_import", icon='IMPORT') - layout.menu("INFO_MT_file_export", icon='EXPORT') + layout.menu("TOPBAR_MT_file_import", icon='IMPORT') + layout.menu("TOPBAR_MT_file_export", icon='EXPORT') layout.separator() - layout.menu("INFO_MT_file_external_data") + layout.menu("TOPBAR_MT_file_external_data") layout.separator() @@ -334,8 +334,8 @@ class INFO_MT_file(Menu): layout.operator("wm.quit_blender", text="Quit", icon='QUIT') -class INFO_MT_file_import(Menu): - bl_idname = "INFO_MT_file_import" +class TOPBAR_MT_file_import(Menu): + bl_idname = "TOPBAR_MT_file_import" bl_label = "Import" def draw(self, context): @@ -345,8 +345,8 @@ class INFO_MT_file_import(Menu): self.layout.operator("wm.alembic_import", text="Alembic (.abc)") -class INFO_MT_file_export(Menu): - bl_idname = "INFO_MT_file_export" +class TOPBAR_MT_file_export(Menu): + bl_idname = "TOPBAR_MT_file_export" bl_label = "Export" def draw(self, context): @@ -356,7 +356,7 @@ class INFO_MT_file_export(Menu): self.layout.operator("wm.alembic_export", text="Alembic (.abc)") -class INFO_MT_file_external_data(Menu): +class TOPBAR_MT_file_external_data(Menu): bl_label = "External Data" def draw(self, context): @@ -383,7 +383,7 @@ class INFO_MT_file_external_data(Menu): layout.operator("file.find_missing_files") -class INFO_MT_file_previews(Menu): +class TOPBAR_MT_file_previews(Menu): bl_label = "Data Previews" def draw(self, context): @@ -398,28 +398,7 @@ class INFO_MT_file_previews(Menu): layout.operator("wm.previews_batch_clear") -class INFO_MT_game(Menu): - bl_label = "Game" - - def draw(self, context): - layout = self.layout - - gs = context.scene.game_settings - - layout.operator("view3d.game_start") - - layout.separator() - - layout.prop(gs, "show_debug_properties") - layout.prop(gs, "show_framerate_profile") - layout.prop(gs, "show_physics_visualization") - layout.prop(gs, "use_deprecation_warnings") - layout.prop(gs, "use_animation_record") - layout.separator() - layout.prop(gs, "use_auto_start") - - -class INFO_MT_render(Menu): +class TOPBAR_MT_render(Menu): bl_label = "Render" def draw(self, context): @@ -447,21 +426,7 @@ class INFO_MT_render(Menu): layout.prop(rd, "use_lock_interface", text="Lock Interface") -class INFO_MT_opengl_render(Menu): - bl_label = "OpenGL Render Options" - - def draw(self, context): - layout = self.layout - - rd = context.scene.render - layout.prop(rd, "use_antialiasing") - layout.prop(rd, "use_full_sample") - - layout.prop_menu_enum(rd, "antialiasing_samples") - layout.prop_menu_enum(rd, "alpha_mode") - - -class INFO_MT_edit(Menu): +class TOPBAR_MT_edit(Menu): bl_label = "Edit" def draw(self, context): @@ -498,7 +463,7 @@ class INFO_MT_edit(Menu): layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES') -class INFO_MT_window(Menu): +class TOPBAR_MT_window(Menu): bl_label = "Window" def draw(self, context): @@ -536,7 +501,7 @@ class INFO_MT_window(Menu): layout.operator("wm.set_stereo_3d") -class INFO_MT_help(Menu): +class TOPBAR_MT_help(Menu): bl_label = "Help" def draw(self, context): @@ -607,8 +572,8 @@ class TOPBAR_MT_file_specials(Menu): layout.separator() - layout.menu("INFO_MT_file_import", icon='IMPORT') - layout.menu("INFO_MT_file_export", icon='EXPORT') + layout.menu("TOPBAR_MT_file_import", icon='IMPORT') + layout.menu("TOPBAR_MT_file_export", icon='EXPORT') class TOPBAR_MT_window_specials(Menu): @@ -655,17 +620,16 @@ classes = ( TOPBAR_MT_file_specials, TOPBAR_MT_window_specials, TOPBAR_MT_workspace_menu, - INFO_MT_editor_menus, - INFO_MT_file, - INFO_MT_file_import, - INFO_MT_file_export, - INFO_MT_file_external_data, - INFO_MT_file_previews, - INFO_MT_edit, - INFO_MT_game, - INFO_MT_render, - INFO_MT_window, - INFO_MT_help, + TOPBAR_MT_editor_menus, + TOPBAR_MT_file, + TOPBAR_MT_file_import, + TOPBAR_MT_file_export, + TOPBAR_MT_file_external_data, + TOPBAR_MT_file_previews, + TOPBAR_MT_edit, + TOPBAR_MT_render, + TOPBAR_MT_window, + TOPBAR_MT_help, ) if __name__ == "__main__": # only for live edit. diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 987430b2335..07ded525d61 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -276,17 +276,17 @@ class VIEW3D_MT_editor_menus(Menu): if gp_edit: pass elif mode_string == 'OBJECT': - layout.menu("INFO_MT_add", text="Add") + layout.menu("VIEW3D_MT_add", text="Add") elif mode_string == 'EDIT_MESH': - layout.menu("INFO_MT_mesh_add", text="Add") + layout.menu("VIEW3D_MT_mesh_add", text="Add") elif mode_string == 'EDIT_CURVE': - layout.menu("INFO_MT_curve_add", text="Add") + layout.menu("VIEW3D_MT_curve_add", text="Add") elif mode_string == 'EDIT_SURFACE': - layout.menu("INFO_MT_surface_add", text="Add") + layout.menu("VIEW3D_MT_surface_add", text="Add") elif mode_string == 'EDIT_METABALL': - layout.menu("INFO_MT_metaball_add", text="Add") + layout.menu("VIEW3D_MT_metaball_add", text="Add") elif mode_string == 'EDIT_ARMATURE': - layout.menu("INFO_MT_edit_armature_add", text="Add") + layout.menu("TOPBAR_MT_edit_armature_add", text="Add") if gp_edit: if obj and obj.mode == 'GPENCIL_PAINT': @@ -1314,9 +1314,8 @@ class VIEW3D_MT_angle_control(Menu): layout.prop(tex_slot, "use_random", text="Random") -# XXX: INFO_MT_ names used to keep backwards compatibility (Add-ons etc. that hook into the menu) -class INFO_MT_mesh_add(Menu): - bl_idname = "INFO_MT_mesh_add" +class VIEW3D_MT_mesh_add(Menu): + bl_idname = "VIEW3D_MT_mesh_add" bl_label = "Mesh" def draw(self, context): @@ -1339,8 +1338,8 @@ class INFO_MT_mesh_add(Menu): layout.operator("mesh.primitive_monkey_add", text="Monkey", icon='MESH_MONKEY') -class INFO_MT_curve_add(Menu): - bl_idname = "INFO_MT_curve_add" +class VIEW3D_MT_curve_add(Menu): + bl_idname = "VIEW3D_MT_curve_add" bl_label = "Curve" def draw(self, context): @@ -1362,8 +1361,8 @@ class INFO_MT_curve_add(Menu): layout.operator("curve.draw", icon='LINE_DATA') -class INFO_MT_surface_add(Menu): - bl_idname = "INFO_MT_surface_add" +class VIEW3D_MT_surface_add(Menu): + bl_idname = "VIEW3D_MT_surface_add" bl_label = "Surface" def draw(self, context): @@ -1380,8 +1379,8 @@ class INFO_MT_surface_add(Menu): layout.operator("surface.primitive_nurbs_surface_torus_add", text="Nurbs Torus", icon='SURFACE_NTORUS') -class INFO_MT_metaball_add(Menu): - bl_idname = "INFO_MT_metaball_add" +class VIEW3D_MT_metaball_add(Menu): + bl_idname = "VIEW3D_MT_metaball_add" bl_label = "Metaball" def draw(self, context): @@ -1391,8 +1390,8 @@ class INFO_MT_metaball_add(Menu): layout.operator_enum("object.metaball_add", "type") -class INFO_MT_edit_curve_add(Menu): - bl_idname = "INFO_MT_edit_curve_add" +class TOPBAR_MT_edit_curve_add(Menu): + bl_idname = "TOPBAR_MT_edit_curve_add" bl_label = "Add" def draw(self, context): @@ -1402,13 +1401,13 @@ class INFO_MT_edit_curve_add(Menu): layout.operator_context = 'EXEC_REGION_WIN' if is_surf: - INFO_MT_surface_add.draw(self, context) + VIEW3D_MT_surface_add.draw(self, context) else: - INFO_MT_curve_add.draw(self, context) + VIEW3D_MT_curve_add.draw(self, context) -class INFO_MT_edit_armature_add(Menu): - bl_idname = "INFO_MT_edit_armature_add" +class TOPBAR_MT_edit_armature_add(Menu): + bl_idname = "TOPBAR_MT_edit_armature_add" bl_label = "Armature" def draw(self, context): @@ -1418,8 +1417,8 @@ class INFO_MT_edit_armature_add(Menu): layout.operator("armature.bone_primitive_add", text="Single Bone", icon='BONE_DATA') -class INFO_MT_armature_add(Menu): - bl_idname = "INFO_MT_armature_add" +class VIEW3D_MT_armature_add(Menu): + bl_idname = "VIEW3D_MT_armature_add" bl_label = "Armature" def draw(self, context): @@ -1429,8 +1428,8 @@ class INFO_MT_armature_add(Menu): layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA') -class INFO_MT_light_add(Menu): - bl_idname = "INFO_MT_light_add" +class VIEW3D_MT_light_add(Menu): + bl_idname = "VIEW3D_MT_light_add" bl_label = "Light" def draw(self, context): @@ -1440,8 +1439,8 @@ class INFO_MT_light_add(Menu): layout.operator_enum("object.light_add", "type") -class INFO_MT_lightprobe_add(Menu): - bl_idname = "INFO_MT_lightprobe_add" +class VIEW3D_MT_lightprobe_add(Menu): + bl_idname = "VIEW3D_MT_lightprobe_add" bl_label = "Light Probe" def draw(self, context): @@ -1451,8 +1450,8 @@ class INFO_MT_lightprobe_add(Menu): layout.operator_enum("object.lightprobe_add", "type") -class INFO_MT_camera_add(Menu): - bl_idname = "INFO_MT_camera_add" +class VIEW3D_MT_camera_add(Menu): + bl_idname = "VIEW3D_MT_camera_add" bl_label = "Camera" def draw(self, context): @@ -1461,7 +1460,7 @@ class INFO_MT_camera_add(Menu): layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA') -class INFO_MT_add(Menu): +class VIEW3D_MT_add(Menu): bl_label = "Add" def draw(self, context): @@ -1474,18 +1473,18 @@ class INFO_MT_add(Menu): layout.operator_context = 'EXEC_REGION_WIN' # layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH') - layout.menu("INFO_MT_mesh_add", icon='OUTLINER_OB_MESH') + layout.menu("VIEW3D_MT_mesh_add", icon='OUTLINER_OB_MESH') # layout.operator_menu_enum("object.curve_add", "type", text="Curve", icon='OUTLINER_OB_CURVE') - layout.menu("INFO_MT_curve_add", icon='OUTLINER_OB_CURVE') + layout.menu("VIEW3D_MT_curve_add", icon='OUTLINER_OB_CURVE') # layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE') - layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE') - layout.menu("INFO_MT_metaball_add", text="Metaball", icon='OUTLINER_OB_META') + layout.menu("VIEW3D_MT_surface_add", icon='OUTLINER_OB_SURFACE') + layout.menu("VIEW3D_MT_metaball_add", text="Metaball", icon='OUTLINER_OB_META') layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT') layout.operator_menu_enum("object.gpencil_add", "type", text="Grease Pencil", icon='OUTLINER_OB_GREASEPENCIL') layout.separator() - layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE') + layout.menu("VIEW3D_MT_armature_add", icon='OUTLINER_OB_ARMATURE') layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE' layout.operator_menu_enum("object.empty_add", "type", text="Empty", icon='OUTLINER_OB_EMPTY') layout.separator() @@ -1493,14 +1492,14 @@ class INFO_MT_add(Menu): layout.operator("object.speaker_add", text="Speaker", icon='OUTLINER_OB_SPEAKER') layout.separator() - if INFO_MT_camera_add.is_extended(): - layout.menu("INFO_MT_camera_add", icon='OUTLINER_OB_CAMERA') + if VIEW3D_MT_camera_add.is_extended(): + layout.menu("VIEW3D_MT_camera_add", icon='OUTLINER_OB_CAMERA') else: - INFO_MT_camera_add.draw(self, context) + VIEW3D_MT_camera_add.draw(self, context) - layout.menu("INFO_MT_light_add", icon='OUTLINER_OB_LIGHT') + layout.menu("VIEW3D_MT_light_add", icon='OUTLINER_OB_LIGHT') layout.separator() - layout.menu("INFO_MT_lightprobe_add", icon='OUTLINER_OB_LIGHTPROBE') + layout.menu("VIEW3D_MT_lightprobe_add", icon='OUTLINER_OB_LIGHTPROBE') layout.separator() layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_FORCE_FIELD') @@ -5053,17 +5052,17 @@ classes = ( VIEW3D_MT_select_paint_mask, VIEW3D_MT_select_paint_mask_vertex, VIEW3D_MT_angle_control, - INFO_MT_mesh_add, - INFO_MT_curve_add, - INFO_MT_surface_add, - INFO_MT_metaball_add, - INFO_MT_edit_curve_add, - INFO_MT_edit_armature_add, - INFO_MT_armature_add, - INFO_MT_light_add, - INFO_MT_lightprobe_add, - INFO_MT_camera_add, - INFO_MT_add, + VIEW3D_MT_mesh_add, + VIEW3D_MT_curve_add, + VIEW3D_MT_surface_add, + VIEW3D_MT_metaball_add, + TOPBAR_MT_edit_curve_add, + TOPBAR_MT_edit_armature_add, + VIEW3D_MT_armature_add, + VIEW3D_MT_light_add, + VIEW3D_MT_lightprobe_add, + VIEW3D_MT_camera_add, + VIEW3D_MT_add, VIEW3D_MT_object, VIEW3D_MT_object_animation, VIEW3D_MT_object_rigid_body, diff --git a/release/scripts/templates_py/addon_add_object.py b/release/scripts/templates_py/addon_add_object.py index d26f3d351bf..d7ee145175f 100644 --- a/release/scripts/templates_py/addon_add_object.py +++ b/release/scripts/templates_py/addon_add_object.py @@ -80,13 +80,13 @@ def add_object_manual_map(): def register(): bpy.utils.register_class(OBJECT_OT_add_object) bpy.utils.register_manual_map(add_object_manual_map) - bpy.types.INFO_MT_mesh_add.append(add_object_button) + bpy.types.VIEW3D_MT_mesh_add.append(add_object_button) def unregister(): bpy.utils.unregister_class(OBJECT_OT_add_object) bpy.utils.unregister_manual_map(add_object_manual_map) - bpy.types.INFO_MT_mesh_add.remove(add_object_button) + bpy.types.VIEW3D_MT_mesh_add.remove(add_object_button) if __name__ == "__main__": diff --git a/release/scripts/templates_py/operator_file_export.py b/release/scripts/templates_py/operator_file_export.py index 4ea817d3507..45910772dc7 100644 --- a/release/scripts/templates_py/operator_file_export.py +++ b/release/scripts/templates_py/operator_file_export.py @@ -60,12 +60,12 @@ def menu_func_export(self, context): def register(): bpy.utils.register_class(ExportSomeData) - bpy.types.INFO_MT_file_export.append(menu_func_export) + bpy.types.TOPBAR_MT_file_export.append(menu_func_export) def unregister(): bpy.utils.unregister_class(ExportSomeData) - bpy.types.INFO_MT_file_export.remove(menu_func_export) + bpy.types.TOPBAR_MT_file_export.remove(menu_func_export) if __name__ == "__main__": diff --git a/release/scripts/templates_py/operator_file_import.py b/release/scripts/templates_py/operator_file_import.py index b932b008c49..5438a7a6f9d 100644 --- a/release/scripts/templates_py/operator_file_import.py +++ b/release/scripts/templates_py/operator_file_import.py @@ -63,12 +63,12 @@ def menu_func_import(self, context): def register(): bpy.utils.register_class(ImportSomeData) - bpy.types.INFO_MT_file_import.append(menu_func_import) + bpy.types.TOPBAR_MT_file_import.append(menu_func_import) def unregister(): bpy.utils.unregister_class(ImportSomeData) - bpy.types.INFO_MT_file_import.remove(menu_func_import) + bpy.types.TOPBAR_MT_file_import.remove(menu_func_import) if __name__ == "__main__": diff --git a/release/scripts/templates_py/operator_mesh_add.py b/release/scripts/templates_py/operator_mesh_add.py index 6b39ef7bbba..5a9acce3026 100644 --- a/release/scripts/templates_py/operator_mesh_add.py +++ b/release/scripts/templates_py/operator_mesh_add.py @@ -123,12 +123,12 @@ def menu_func(self, context): def register(): bpy.utils.register_class(AddBox) - bpy.types.INFO_MT_mesh_add.append(menu_func) + bpy.types.VIEW3D_MT_mesh_add.append(menu_func) def unregister(): bpy.utils.unregister_class(AddBox) - bpy.types.INFO_MT_mesh_add.remove(menu_func) + bpy.types.VIEW3D_MT_mesh_add.remove(menu_func) if __name__ == "__main__": |