-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsymmetry_menu.py
64 lines (48 loc) · 2.05 KB
/
symmetry_menu.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# gpl author: Ryan Inch (Imaginer)
from bpy.types import Menu
from . import utils_core
class MasterSymmetryMenu(Menu):
bl_label = "Symmetry Options"
bl_idname = "VIEW3D_MT_sv3_master_symmetry_menu"
@classmethod
def poll(self, context):
return utils_core.get_mode() in (
'SCULPT',
'TEXTURE_PAINT'
)
def draw(self, context):
layout = self.layout
if utils_core.get_mode() == 'TEXTURE_PAINT':
layout.row().prop(context.tool_settings.image_paint,
"use_symmetry_x", toggle=True)
layout.row().prop(context.tool_settings.image_paint,
"use_symmetry_y", toggle=True)
layout.row().prop(context.tool_settings.image_paint,
"use_symmetry_z", toggle=True)
else:
layout.row().menu(SymmetryMenu.bl_idname)
layout.row().menu(SymmetryRadialMenu.bl_idname)
layout.row().prop(context.tool_settings.sculpt,
"use_symmetry_feather", toggle=True)
class SymmetryMenu(Menu):
bl_label = "Symmetry"
bl_idname = "VIEW3D_MT_sv3_symmetry_menu"
def draw(self, context):
layout = self.layout
layout.row().label(text="Symmetry")
layout.row().separator()
layout.row().prop(context.tool_settings.sculpt,
"use_symmetry_x", toggle=True)
layout.row().prop(context.tool_settings.sculpt,
"use_symmetry_y", toggle=True)
layout.row().prop(context.tool_settings.sculpt,
"use_symmetry_z", toggle=True)
class SymmetryRadialMenu(Menu):
bl_label = "Radial"
bl_idname = "VIEW3D_MT_sv3_symmetry_radial_menu"
def draw(self, context):
layout = self.layout
layout.row().label(text="Radial")
layout.row().separator()
layout.column().prop(context.tool_settings.sculpt,
"radial_symmetry", text="", slider=True)