import bpy
from bpy.types import Menu
import os
import importlib
from .. utils.registration import get_prefs, get_addon
from .. utils.ui import get_icon
from .. utils.collection import get_scene_collections
from .. utils.system import abspath
from .. utils.tools import get_tools_from_context, get_tool_options
grouppro = None
decalmachine = None
boxcutter = None
hardops = None
class PieModes(Menu):
bl_idname = "MACHIN3_MT_modes_pie"
bl_label = "Modes"
def draw(self, context):
layout = self.layout
toolsettings = context.tool_settings
global grouppro
global decalmachine
if grouppro is None:
grouppro, _, _, _ = get_addon("Group Pro")
if decalmachine is None:
decalmachine, _, _, _ = get_addon("DECALmachine")
active = context.active_object
pie = layout.menu_pie()
if active:
if context.mode in ['OBJECT', 'EDIT_MESH', 'EDIT_ARMATURE', 'POSE', 'EDIT_CURVE', 'EDIT_TEXT', 'EDIT_SURFACE', 'EDIT_METABALL', 'EDIT_LATTICE', 'EDIT_GPENCIL', 'PAINT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL']:
if active.type == 'MESH':
if context.area.type == "VIEW_3D":
if active.library:
blendpath = abspath(active.library.filepath)
library = active.library.name
op = pie.operator("machin3.open_library_blend", text="Open %s" % (os.path.basename(blendpath)))
op.blendpath = blendpath
op.library = library
else:
pie.operator("machin3.mesh_mode", text="Vertex", icon_value=get_icon('vertex')).mode = 'VERT'
pie.operator("machin3.mesh_mode", text="Face", icon_value=get_icon('face')).mode = 'FACE'
pie.operator("machin3.mesh_mode", text="Edge", icon_value=get_icon('edge')).mode = 'EDGE'
if context.mode == 'OBJECT' and grouppro and len(context.scene.storedGroupSettings):
pie.operator("object.close_grouppro", text="Close Group")
else:
text, icon = ("Edit", get_icon('edit_mesh')) if active.mode == "OBJECT" else ("Object", get_icon('object'))
pie.operator("machin3.edit_mode", text=text, icon_value=icon)
self.draw_mesh_modes(context, pie)
if context.mode == 'OBJECT' and grouppro:
self.draw_grouppro(context, pie)
else:
pie.separator()
pie.separator()
if context.mode == "EDIT_MESH":
box = pie.split()
column = box.column()
row = column.row()
row.scale_y = 1.2
row.prop(context.scene.M3, "pass_through", text="Pass Through" if context.scene.M3.pass_through else "Occlude", icon="XRAY")
column.prop(toolsettings, "use_mesh_automerge", text="Auto Merge")
else:
pie.separator()
if context.area.type == "IMAGE_EDITOR":
toolsettings = context.scene.tool_settings
if context.mode == "OBJECT":
pie.operator("machin3.image_mode", text="UV Edit", icon="GROUP_UVS").mode = "UV"
pie.operator("machin3.image_mode", text="Paint", icon="TPAINT_HLT").mode = "PAINT"
pie.operator("machin3.image_mode", text="Mask", icon="MOD_MASK").mode = "MASK"
pie.operator("machin3.image_mode", text="View", icon="FILE_IMAGE").mode = "VIEW"
elif context.mode == "EDIT_MESH":
pie.operator("machin3.uv_mode", text="Vertex", icon_value=get_icon('vertex')).mode = "VERTEX"
pie.operator("machin3.uv_mode", text="Face", icon_value=get_icon('face')).mode = "FACE"
pie.operator("machin3.uv_mode", text="Edge", icon_value=get_icon('edge')).mode = "EDGE"
pie.operator("object.mode_set", text="Object", icon_value=get_icon('object')).mode = "OBJECT"
pie.prop(context.scene.M3, "uv_sync_select", text="Sync Selection", icon="UV_SYNC_SELECT")
if toolsettings.use_uv_select_sync:
pie.separator()
else:
pie.operator("machin3.uv_mode", text="Island", icon_value=get_icon('island')).mode = "ISLAND"
pie.separator()
pie.separator()
elif active.type == 'ARMATURE':
pie.operator("object.mode_set", text="Edit Mode", icon='EDITMODE_HLT').mode = "EDIT"
pie.operator("object.mode_set", text="Pose", icon='POSE_HLT').mode = "POSE"
pie.separator()
if context.mode == "OBJECT" and grouppro and len(context.scene.storedGroupSettings):
pie.operator("object.close_grouppro", text="Close Group")
else:
text, icon = ("Edit", "EDITMODE_HLT") if active.mode == "OBJECT" else ("Object", "OBJECT_DATAMODE")
if active.mode == "POSE":
pie.operator("object.posemode_toggle", text=text, icon=icon)
else:
pie.operator("object.editmode_toggle", text=text, icon=icon)
pie.separator()
if context.mode == 'OBJECT' and grouppro:
self.draw_grouppro(context, pie)
else:
pie.separator()
pie.separator()
pie.separator()
elif active.type in ['CURVE', 'FONT', 'SURFACE', 'META', 'LATTICE']:
pie.operator("object.mode_set", text="Edit Mode", icon='EDITMODE_HLT').mode = "EDIT"
pie.separator()
pie.separator()
if context.mode == 'OBJECT' and grouppro and len(context.scene.storedGroupSettings):
pie.operator("object.close_grouppro", text="Close Group")
else:
text, icon = ("Edit", "EDITMODE_HLT") if active.mode == "OBJECT" else ("Object", "OBJECT_DATAMODE")
pie.operator("object.editmode_toggle", text=text, icon=icon)
pie.separator()
if context.mode == 'OBJECT' and grouppro:
self.draw_grouppro(context, pie)
else:
pie.separator()
pie.separator()
if bpy.context.mode in ['EDIT_SURFACE', 'EDIT_METABALL']:
box = pie.split()
column = box.column()
row = column.row()
row.scale_y = 1.2
row.prop(context.scene.M3, "pass_through", text="Pass Through" if context.scene.M3.pass_through else "Occlude", icon="XRAY")
else:
pie.separator()
elif active.type == 'GPENCIL':
gpd = context.gpencil_data
pie.operator("object.mode_set", text="Draw", icon='GREASEPENCIL').mode = "PAINT_GPENCIL"
pie.operator("object.mode_set", text="Sculpt", icon='SCULPTMODE_HLT').mode = "SCULPT_GPENCIL"
没有合适的资源?快使用搜索试试~ 我知道了~
MACHIN3tools_0.4.1.zip
共103个文件
py:65个
png:32个
exr:4个
需积分: 50 17 下载量 66 浏览量
2020-12-04
13:24:52
上传
评论
收藏 7.13MB ZIP 举报
温馨提示
此为blender的插件m3,官方下载,安全可靠。版本为0.4.1。直接在blender中加载此插件即可
资源详情
资源评论
资源推荐
收起资源包目录
MACHIN3tools_0.4.1.zip (103个子文件)
matcap_shiny_red.exr 2.9MB
matcap_base.exr 2.24MB
matcap_zebra_vertical.exr 873KB
matcap_zebra_horizontal.exr 867KB
license 717B
link.png 10KB
cancel.png 10KB
wireframe_overlay.png 10KB
wireframe.png 9KB
external_data.png 9KB
append.png 9KB
recover_auto_save.png 8KB
export.png 8KB
import.png 8KB
save_incremental.png 8KB
open_recent.png 7KB
open_next.png 7KB
open_previous.png 7KB
new.png 7KB
world.png 7KB
edit_mesh.png 6KB
save_as.png 6KB
revert.png 5KB
object.png 5KB
island.png 5KB
material.png 5KB
open.png 5KB
save.png 5KB
vertex.png 5KB
smooth.png 5KB
face.png 4KB
edge.png 4KB
flat.png 4KB
plus.png 3KB
separator.png 3KB
open_world.png 2KB
open_material.png 2KB
pies.py 85KB
customize.py 32KB
preferences.py 24KB
registration.py 16KB
registration.py 16KB
align.py 14KB
properties.py 13KB
save.py 12KB
draw.py 9KB
unity.py 9KB
viewport.py 9KB
align.py 9KB
workspace.py 9KB
mirror.py 8KB
smart_vert.py 8KB
origin.py 8KB
clean_up.py 7KB
shading.py 7KB
smart_face.py 7KB
focus.py 6KB
smart_drive.py 6KB
colorize.py 5KB
collection.py 5KB
panels.py 5KB
smart_edge.py 5KB
mode.py 5KB
math.py 5KB
mesh.py 5KB
cursor.py 4KB
clipping_toggle.py 4KB
mesh.py 4KB
__init__.py 4KB
appendmats.py 4KB
ui.py 4KB
overlay.py 3KB
items.py 3KB
apply.py 3KB
mesh_cut.py 3KB
menus.py 2KB
uv.py 2KB
quadsphere.py 2KB
filebrowser.py 2KB
graph.py 2KB
developer.py 2KB
append.py 1KB
object.py 1KB
view.py 1KB
bc_preset.py 1KB
selection.py 1KB
select.py 1KB
tools.py 1KB
property.py 1KB
call_pie.py 1KB
system.py 1KB
snapping_preset.py 898B
collection.py 849B
transform_preset.py 818B
open_blend.py 786B
handlers.py 706B
material.py 543B
scene.py 530B
modifier.py 404B
world.py 300B
共 103 条
- 1
- 2
草原上有什么
- 粉丝: 4
- 资源: 18
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0