Update Modifier tools and 3d navigation T61000
This commit is contained in:
parent
4e8ddec4e1
commit
9b904ee25d
Notes:
blender-bot
2023-02-14 19:21:02 +01:00
Referenced by issue #61000, Modifier tools and 3d Navigation addons. Port to 2.8
|
@ -25,8 +25,8 @@
|
|||
bl_info = {
|
||||
"name": "3D Navigation",
|
||||
"author": "Demohero, uriel",
|
||||
"version": (1, 2, 2),
|
||||
"blender": (2, 77, 0),
|
||||
"version": (1, 2, 3),
|
||||
"blender": (2, 80, 0),
|
||||
"location": "View3D > Tool Shelf > Display Tab",
|
||||
"description": "Navigate the Camera & 3D View from the Toolshelf",
|
||||
"warning": "",
|
||||
|
@ -161,7 +161,7 @@ class LeftViewpoint1(Operator):
|
|||
bl_description = "View from the Left"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.view3d.viewnumpad(type='LEFT')
|
||||
bpy.ops.view3d.view_axis(type='LEFT')
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
@ -171,7 +171,7 @@ class RightViewpoint1(Operator):
|
|||
bl_description = "View from the Right"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.view3d.viewnumpad(type='RIGHT')
|
||||
bpy.ops.view3d.view_axis(type='RIGHT')
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
@ -181,7 +181,7 @@ class FrontViewpoint1(Operator):
|
|||
bl_description = "View from the Front"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.view3d.viewnumpad(type='FRONT')
|
||||
bpy.ops.view3d.view_axis(type='FRONT')
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
@ -191,7 +191,7 @@ class BackViewpoint1(Operator):
|
|||
bl_description = "View from the Back"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.view3d.viewnumpad(type='BACK')
|
||||
bpy.ops.view3d.view_axis(type='BACK')
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
@ -201,7 +201,7 @@ class TopViewpoint1(Operator):
|
|||
bl_description = "View from the Top"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.view3d.viewnumpad(type='TOP')
|
||||
bpy.ops.view3d.view_axis(type='TOP')
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
@ -211,7 +211,7 @@ class BottomViewpoint1(Operator):
|
|||
bl_description = "View from the Bottom"
|
||||
|
||||
def execute(self, context):
|
||||
bpy.ops.view3d.viewnumpad(type='BOTTOM')
|
||||
bpy.ops.view3d.view_axis(type='BOTTOM')
|
||||
return {'FINISHED'}
|
||||
|
||||
|
||||
|
@ -219,7 +219,7 @@ class BottomViewpoint1(Operator):
|
|||
class VIEW3D_PT_3dnavigationPanel(Panel):
|
||||
bl_category = "Display"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "TOOLS"
|
||||
bl_region_type = "UI"
|
||||
bl_label = "3D Nav"
|
||||
|
||||
def draw(self, context):
|
||||
|
@ -230,20 +230,20 @@ class VIEW3D_PT_3dnavigationPanel(Panel):
|
|||
col = layout.column(align=True)
|
||||
col.operator("view3d.localview", text="View Global / Local")
|
||||
col.operator("view3d.view_persportho", text="View Persp / Ortho")
|
||||
col.operator("view3d.viewnumpad", text="View Camera", icon='CAMERA_DATA').type = 'CAMERA'
|
||||
col.operator("view3d.view_camera", text="View Camera", icon='CAMERA_DATA')
|
||||
|
||||
# group of 6 buttons
|
||||
col = layout.column(align=True)
|
||||
col.label(text="Align view from:", icon="VIEW3D")
|
||||
row = col.row()
|
||||
row.operator("view3d.viewnumpad", text="Front").type = 'FRONT'
|
||||
row.operator("view3d.viewnumpad", text="Back").type = 'BACK'
|
||||
row.operator("view3d.view_axis", text="Front").type = 'FRONT'
|
||||
row.operator("view3d.view_axis", text="Back").type = 'BACK'
|
||||
row = col.row()
|
||||
row.operator("view3d.viewnumpad", text="Left").type = 'LEFT'
|
||||
row.operator("view3d.viewnumpad", text="Right").type = 'RIGHT'
|
||||
row.operator("view3d.view_axis", text="Left").type = 'LEFT'
|
||||
row.operator("view3d.view_axis", text="Right").type = 'RIGHT'
|
||||
row = col.row()
|
||||
row.operator("view3d.viewnumpad", text="Top").type = 'TOP'
|
||||
row.operator("view3d.viewnumpad", text="Bottom").type = 'BOTTOM'
|
||||
row.operator("view3d.view_axis", text="Top").type = 'TOP'
|
||||
row.operator("view3d.view_axis", text="Bottom").type = 'BOTTOM'
|
||||
|
||||
# group of 2 buttons
|
||||
col = layout.column(align=True)
|
||||
|
@ -263,7 +263,7 @@ class VIEW3D_PT_pan_navigation1(Panel):
|
|||
bl_idname = "pan.navigation1"
|
||||
bl_label = "Pan Orbit Zoom Roll"
|
||||
bl_space_type = "VIEW_3D"
|
||||
bl_region_type = "TOOLS"
|
||||
bl_region_type = "UI"
|
||||
bl_category = "Display"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
bl_info = {
|
||||
"name": "Modifier Tools",
|
||||
"author": "Meta Androcto, saidenka",
|
||||
"version": (0, 2, 5),
|
||||
"blender": (2, 77, 0),
|
||||
"version": (0, 2, 6),
|
||||
"blender": (2, 80, 0),
|
||||
"location": "Properties > Modifiers",
|
||||
"description": "Modifiers Specials Show/Hide/Apply Selected",
|
||||
"warning": "",
|
||||
|
@ -262,9 +262,18 @@ def menu_func(self, context):
|
|||
icon='IMPORT',
|
||||
text="Apply All Modifiers")
|
||||
|
||||
# Register
|
||||
classes = [
|
||||
ApplyAllModifiers,
|
||||
DeleteAllModifiers,
|
||||
ToggleApplyModifiersView,
|
||||
ToggleAllShowExpanded,
|
||||
]
|
||||
|
||||
def register():
|
||||
bpy.utils.register_module(__name__)
|
||||
from bpy.utils import register_class
|
||||
for cls in classes:
|
||||
register_class(cls)
|
||||
|
||||
# Add "Specials" menu to the "Modifiers" menu
|
||||
bpy.types.DATA_PT_modifiers.prepend(menu)
|
||||
|
@ -280,8 +289,9 @@ def unregister():
|
|||
# Remove apply operator to the Apply 3D View Menu
|
||||
bpy.types.VIEW3D_MT_object_apply.remove(menu_func)
|
||||
|
||||
bpy.utils.unregister_module(__name__)
|
||||
|
||||
from bpy.utils import unregister_class
|
||||
for cls in reversed(classes):
|
||||
unregister_class(cls)
|
||||
|
||||
if __name__ == "__main__":
|
||||
register()
|
||||
|
|
Loading…
Reference in New Issue