44
44
sub.menu("VIEW3D_MT_view")
47
if mode_string not in {'EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
47
if mode_string in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
49
if mesh.use_paint_mask:
50
sub.menu("VIEW3D_MT_select_paint_mask")
51
elif mesh.use_paint_mask_vertex and mode_string == 'PAINT_WEIGHT':
52
sub.menu("VIEW3D_MT_select_paint_mask_vertex")
53
elif mode_string not in {'EDIT_TEXT', 'SCULPT'}:
48
54
sub.menu("VIEW3D_MT_select_%s" % mode_string.lower())
55
61
if mode_string in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'PAINT_TEXTURE'}:
56
62
sub.menu("VIEW3D_MT_brush")
57
63
if mode_string == 'SCULPT':
58
sub.menu("VIEW3D_MT_hide")
64
sub.menu("VIEW3D_MT_hide_mask")
60
66
sub.menu("VIEW3D_MT_object")
64
70
layout.template_header_3D()
68
if obj.mode == 'PARTICLE_EDIT':
75
if mode == 'PARTICLE_EDIT':
69
76
row.prop(toolsettings.particle_edit, "select_mode", text="", expand=True)
72
if view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (obj.mode == 'PARTICLE_EDIT' or (obj.mode == 'EDIT' and obj.type == 'MESH')):
79
if ((view.viewport_shade not in {'BOUNDBOX', 'WIREFRAME'} and (mode == 'PARTICLE_EDIT' or (mode == 'EDIT' and obj.type == 'MESH'))) or
80
(mode == 'WEIGHT_PAINT')):
73
81
row.prop(view, "use_occlude_geometry", text="")
75
83
# Proportional editing
76
if obj.mode in {'EDIT', 'PARTICLE_EDIT'}:
84
if mode in {'EDIT', 'PARTICLE_EDIT'}:
77
85
row = layout.row(align=True)
78
86
row.prop(toolsettings, "proportional_edit", text="", icon_only=True)
79
87
if toolsettings.proportional_edit != 'DISABLED':
80
88
row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
81
elif obj.mode == 'OBJECT':
89
elif mode == 'OBJECT':
82
90
row = layout.row(align=True)
83
91
row.prop(toolsettings, "use_proportional_edit_objects", text="", icon_only=True)
84
92
if toolsettings.use_proportional_edit_objects:
85
93
row.prop(toolsettings, "proportional_edit_falloff", text="", icon_only=True)
88
if not obj or obj.mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT'}:
96
if not obj or mode not in {'SCULPT', 'VERTEX_PAINT', 'WEIGHT_PAINT', 'TEXTURE_PAINT'}:
89
97
snap_element = toolsettings.snap_element
90
98
row = layout.row(align=True)
91
99
row.prop(toolsettings, "use_snap", text="")
93
101
if snap_element != 'INCREMENT':
94
102
row.prop(toolsettings, "snap_target", text="")
96
if obj.mode == 'OBJECT' and snap_element != 'VOLUME':
104
if mode in {'OBJECT', 'POSE'} and snap_element != 'VOLUME':
97
105
row.prop(toolsettings, "use_snap_align_rotation", text="")
98
elif obj.mode == 'EDIT':
99
107
row.prop(toolsettings, "use_snap_self", text="")
101
109
if snap_element == 'VOLUME':
110
118
props.animation = True
113
if obj and obj.mode == 'POSE':
121
if obj and mode == 'POSE':
114
122
row = layout.row(align=True)
115
123
row.operator("pose.copy", text="", icon='COPYDOWN')
116
124
row.operator("pose.paste", text="", icon='PASTEDOWN')
164
172
def draw(self, context):
166
174
VIEW3D_MT_transform_base.draw(self, context)
169
177
layout = self.layout
178
layout.operator("transform.shrink_fatten", text="Shrink Fatten")
170
180
layout.separator()
172
182
layout.operator("transform.translate", text="Move Texture Space").texture_space = True
176
186
# Object-specific extensions to Transform menu
177
187
class VIEW3D_MT_transform_object(VIEW3D_MT_transform_base):
178
188
def draw(self, context):
180
192
VIEW3D_MT_transform_base.draw(self, context)
182
194
# object-specific option follow...
184
195
layout.separator()
186
197
layout.operator("transform.translate", text="Move Texture Space").texture_space = True
187
198
layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
189
200
layout.separator()
191
202
layout.operator_context = 'EXEC_REGION_WIN'
192
203
layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
198
209
layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN'
199
210
layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY'
200
211
layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR'
212
layout.operator("object.origin_set", text="Origin to Center of Mass").type = 'ORIGIN_TO_CENTER_OF_MASS'
202
213
layout.separator()
204
215
layout.operator("object.randomize_transform")
212
223
# Armature EditMode extensions to Transform menu
213
224
class VIEW3D_MT_transform_armature(VIEW3D_MT_transform_base):
214
225
def draw(self, context):
216
229
VIEW3D_MT_transform_base.draw(self, context)
218
231
# armature specific extensions follow...
220
232
layout.separator()
222
234
obj = context.object
223
if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
224
obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
235
if (obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and
236
obj.data.draw_type in {'BBONE', 'ENVELOPE'}):
225
237
layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
227
239
if context.edit_object and context.edit_object.type == 'ARMATURE':
354
366
layout.operator("view3d.clip_border", text="Clipping Border...")
355
367
layout.operator("view3d.zoom_border", text="Zoom Border...")
368
layout.operator("view3d.render_border", text="Render Border...")
357
370
layout.separator()
414
427
layout.operator("view3d.view_selected")
415
428
layout.operator("view3d.view_center_cursor")
432
layout.operator("view3d.view_lock_to_active")
433
layout.operator("view3d.view_lock_clear")
418
436
class VIEW3D_MT_view_align_selected(Menu):
419
437
bl_label = "Align View to Selected"
424
442
props = layout.operator("view3d.viewnumpad", text="Top")
425
443
props.align_active = True
426
444
props.type = 'TOP'
427
446
props = layout.operator("view3d.viewnumpad", text="Bottom")
428
447
props.align_active = True
429
448
props.type = 'BOTTOM'
430
450
props = layout.operator("view3d.viewnumpad", text="Front")
431
451
props.align_active = True
432
452
props.type = 'FRONT'
433
454
props = layout.operator("view3d.viewnumpad", text="Back")
434
455
props.align_active = True
435
456
props.type = 'BACK'
436
458
props = layout.operator("view3d.viewnumpad", text="Right")
437
459
props.align_active = True
438
460
props.type = 'RIGHT'
439
462
props = layout.operator("view3d.viewnumpad", text="Left")
440
463
props.align_active = True
441
464
props.type = 'LEFT'
558
581
layout.separator()
560
583
layout.operator("mesh.select_random", text="Random")
561
layout.operator("mesh.select_nth", text="Every N Number of Verts")
584
layout.operator("mesh.select_nth")
562
585
layout.operator("mesh.edges_select_sharp", text="Sharp Edges")
563
586
layout.operator("mesh.faces_select_linked_flat", text="Linked Flat Faces")
564
587
layout.operator("mesh.select_interior_faces", text="Interior Faces")
567
590
layout.separator()
569
layout.operator("mesh.select_by_number_vertices", text="By Number of Verts")
570
if context.scene.tool_settings.mesh_select_mode[2] == False:
592
layout.operator("mesh.select_face_by_sides")
593
if context.scene.tool_settings.mesh_select_mode[2] is False:
571
594
layout.operator("mesh.select_non_manifold", text="Non Manifold")
572
595
layout.operator("mesh.select_loose_verts", text="Loose Verts/Edges")
573
layout.operator("mesh.select_similar", text="Similar")
596
layout.operator_menu_enum("mesh.select_similar", "type", text="Similar")
575
598
layout.separator()
607
630
layout.operator("curve.select_all", text="Inverse").action = 'INVERT'
608
631
layout.operator("curve.select_random")
609
632
layout.operator("curve.select_nth", text="Every Nth Number of Points")
633
layout.operator("curve.select_linked", text="Select Linked")
611
635
layout.separator()
636
660
layout.operator("curve.select_all", text="Inverse").action = 'INVERT'
637
661
layout.operator("curve.select_random")
638
662
layout.operator("curve.select_nth", text="Every Nth Number of Points")
663
layout.operator("curve.select_linked", text="Select Linked")
640
665
layout.separator()
707
733
props.extend = True
708
734
props.direction = 'CHILD'
736
layout.operator_menu_enum("armature.select_similar", "type", text="Similar")
710
737
layout.operator("object.select_pattern", text="Select Pattern...")
713
class VIEW3D_MT_select_face(Menu): # XXX no matching enum
716
def draw(self, context):
717
# layout = self.layout
720
# see view3d_select_faceselmenu
740
class VIEW3D_MT_select_paint_mask(Menu):
743
def draw(self, context):
746
layout.operator("view3d.select_border")
747
layout.operator("view3d.select_circle")
751
layout.operator("paint.face_select_all").action = 'TOGGLE'
752
layout.operator("paint.face_select_all", text="Inverse").action = 'INVERT'
756
layout.operator("paint.face_select_linked", text="Linked")
759
class VIEW3D_MT_select_paint_mask_vertex(Menu):
762
def draw(self, context):
765
layout.operator("view3d.select_border")
766
layout.operator("view3d.select_circle")
770
layout.operator("paint.vert_select_all").action = 'TOGGLE'
771
layout.operator("paint.vert_select_all", text="Inverse").action = 'INVERT'
723
774
# ********** Object menu **********
791
842
layout = self.layout
793
844
layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...")
794
layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...")
845
layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframes...")
846
layout.operator("anim.keyframe_clear_v3d", text="Clear Keyframes...")
795
847
layout.operator("anim.keying_set_active_set", text="Change Keying Set...")
797
849
layout.separator()
951
1003
def draw(self, context):
952
1004
layout = self.layout
954
layout.operator_menu_enum("object.parent_set", "type", text="Set")
955
layout.operator_menu_enum("object.parent_clear", "type", text="Clear")
1006
layout.operator_enum("object.parent_set", "type")
1008
layout.operator_enum("object.parent_clear", "type")
958
1011
class VIEW3D_MT_object_track(Menu):
961
1014
def draw(self, context):
962
1015
layout = self.layout
964
layout.operator_menu_enum("object.track_set", "type", text="Set")
965
layout.operator_menu_enum("object.track_clear", "type", text="Clear")
1017
layout.operator_enum("object.track_set", "type")
1019
layout.operator_enum("object.track_clear", "type")
968
1022
class VIEW3D_MT_object_group(Menu):
972
1026
layout = self.layout
974
1028
layout.operator("group.create")
1029
# layout.operator_menu_enum("group.objects_remove", "group") # BUGGY
975
1030
layout.operator("group.objects_remove")
1031
layout.operator("group.objects_remove_all")
977
1033
layout.separator()
1042
1098
def draw(self, context):
1043
1099
layout = self.layout
1100
operator_context_default = layout.operator_context
1045
1101
if(len(bpy.data.scenes) > 10):
1046
layout.operator_context = 'INVOKE_DEFAULT'
1102
layout.operator_context = 'INVOKE_REGION_WIN'
1047
1103
layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
1105
layout.operator_context = 'EXEC_REGION_WIN'
1049
1106
layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
1107
layout.operator_context = operator_context_default
1051
1109
layout.operator_enum("object.make_links_data", "type") # inline
1112
1170
sculpt_tool = brush.sculpt_tool
1114
1172
layout.separator()
1115
layout.operator_menu_enum("brush.curve_preset", "shape", text='Curve Preset')
1173
layout.operator_menu_enum("brush.curve_preset", "shape", text="Curve Preset")
1116
1174
layout.separator()
1118
1176
if sculpt_tool != 'GRAB':
1165
1223
layout = self.layout
1166
1224
layout.operator_context = 'EXEC_AREA'
1167
1225
layout.operator("object.hook_add_newob")
1168
layout.operator("object.hook_add_selob")
1226
layout.operator("object.hook_add_selob").use_bone = False
1227
layout.operator("object.hook_add_selob", text="Hook to Selected Object Bone").use_bone = True
1170
1229
if [mod.type == 'HOOK' for mod in context.active_object.modifiers]:
1171
1230
layout.separator()
1189
1249
if ob.mode == 'EDIT' or (ob.mode == 'WEIGHT_PAINT' and ob.type == 'MESH' and ob.data.use_paint_mask_vertex):
1190
1250
if ob.vertex_groups.active:
1191
1251
layout.separator()
1192
layout.operator("object.vertex_group_assign", text="Assign to Active Group")
1252
layout.operator("object.vertex_group_assign", text="Assign to Active Group").new = False
1193
1253
layout.operator("object.vertex_group_remove_from", text="Remove from Active Group").all = False
1194
1254
layout.operator("object.vertex_group_remove_from", text="Remove from All").all = True
1195
1255
layout.separator()
1226
1286
layout.operator("object.vertex_group_clean", text="Clean")
1227
1287
layout.operator("object.vertex_group_levels", text="Levels")
1228
1288
layout.operator("object.vertex_group_blend", text="Blend")
1289
layout.operator("object.vertex_group_transfer_weight", text="Transfer Weights")
1290
layout.operator("object.vertex_group_limit_total", text="Limit Total")
1229
1291
layout.operator("object.vertex_group_fix", text="Fix Deforms")
1231
1293
layout.separator()
1262
1324
layout.prop(sculpt, "show_low_resolution")
1263
1325
layout.prop(sculpt, "show_brush")
1264
1326
layout.prop(sculpt, "use_deform_only")
1267
class VIEW3D_MT_hide(Menu):
1327
layout.prop(sculpt, "show_diffuse_color")
1330
class VIEW3D_MT_hide_mask(Menu):
1331
bl_label = "Hide/Mask"
1270
1333
def draw(self, context):
1271
1334
layout = self.layout
1282
1345
op.action = 'SHOW'
1283
1346
op.area = 'INSIDE'
1348
op = layout.operator("paint.hide_show", text="Hide Masked")
1354
op = layout.operator("paint.mask_flood_fill", text="Invert Mask")
1357
op = layout.operator("paint.mask_flood_fill", text="Fill Mask")
1361
op = layout.operator("paint.mask_flood_fill", text="Clear Mask")
1286
1366
# ********** Particle menu **********
1490
1571
def draw(self, context):
1491
1572
layout = self.layout
1492
layout.operator("pose.group_add")
1493
layout.operator("pose.group_remove")
1497
layout.operator("pose.group_assign")
1498
layout.operator("pose.group_unassign")
1574
pose = context.active_object.pose
1576
layout.operator_context = 'EXEC_AREA'
1577
layout.operator("pose.group_assign", text="Assign to New Group").type = 0
1578
if pose.bone_groups:
1579
active_group = pose.bone_groups.active_index + 1
1580
layout.operator("pose.group_assign", text="Assign to Group").type = active_group
1584
#layout.operator_context = 'INVOKE_AREA'
1585
layout.operator("pose.group_unassign")
1586
layout.operator("pose.group_remove")
1501
1589
class VIEW3D_MT_pose_ik(Menu):
1533
1621
layout.operator("pose.visual_transform_apply")
1624
class VIEW3D_MT_pose_specials(Menu):
1625
bl_label = "Specials"
1627
def draw(self, context):
1628
layout = self.layout
1629
layout.operator("pose.select_constraint_target")
1630
layout.operator("pose.flip_names")
1631
layout.operator("pose.paths_calculate")
1632
layout.operator("pose.paths_clear")
1633
layout.operator("pose.user_transforms_clear")
1634
layout.operator("pose.user_transforms_clear", text="Clear User Transforms (All)").only_selected = False
1635
layout.operator("pose.relax")
1639
layout.operator_menu_enum("pose.autoside_names", "axis")
1536
1642
class BoneOptions:
1537
1643
def draw(self, context):
1538
1644
layout = self.layout
1602
1708
layout.menu("VIEW3D_MT_uv_map", text="UV Unwrap...")
1604
1710
layout.separator()
1711
layout.operator("mesh.symmetrize")
1606
1712
layout.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region")
1607
1713
layout.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual")
1608
1714
layout.operator("mesh.duplicate_move")
1609
1715
layout.menu("VIEW3D_MT_edit_mesh_delete")
1610
layout.menu("VIEW3D_MT_edit_mesh_dissolve")
1612
1717
layout.separator()
1638
1743
layout.operator("mesh.subdivide", text="Subdivide").smoothness = 0.0
1639
1744
layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0
1640
1748
layout.operator("mesh.merge", text="Merge...")
1641
1749
layout.operator("mesh.remove_doubles")
1642
1753
layout.operator("mesh.hide", text="Hide").unselected = False
1643
1754
layout.operator("mesh.reveal", text="Reveal")
1644
1755
layout.operator("mesh.select_all", text="Select Inverse").action = 'INVERT'
1645
1759
layout.operator("mesh.flip_normals")
1646
1760
layout.operator("mesh.vertices_smooth", text="Smooth")
1761
layout.operator("mesh.vertices_smooth_laplacian", text="Laplacian Smooth")
1647
1765
layout.operator("mesh.inset")
1648
1766
layout.operator("mesh.bevel", text="Bevel")
1649
1767
layout.operator("mesh.bridge_edge_loops")
1650
1771
layout.operator("mesh.faces_shade_smooth")
1651
1772
layout.operator("mesh.faces_shade_flat")
1652
1776
layout.operator("mesh.blend_from_shape")
1653
1777
layout.operator("mesh.shape_propagate_to_all")
1654
1778
layout.operator("mesh.select_vertex_path")
1779
layout.operator("mesh.sort_elements")
1780
layout.operator("mesh.symmetrize")
1657
1783
class VIEW3D_MT_edit_mesh_select_mode(Menu):
1661
1787
layout = self.layout
1663
1789
layout.operator_context = 'INVOKE_REGION_WIN'
1665
props = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL')
1666
props.value = "(True, False, False)"
1667
props.data_path = "tool_settings.mesh_select_mode"
1669
props = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL')
1670
props.value = "(False, True, False)"
1671
props.data_path = "tool_settings.mesh_select_mode"
1673
props = layout.operator("wm.context_set_value", text="Face", icon='FACESEL')
1674
props.value = "(False, False, True)"
1675
props.data_path = "tool_settings.mesh_select_mode"
1790
layout.operator("mesh.select_mode", text="Vertex", icon='VERTEXSEL').type = 'VERT'
1791
layout.operator("mesh.select_mode", text="Edge", icon='EDGESEL').type = 'EDGE'
1792
layout.operator("mesh.select_mode", text="Face", icon='FACESEL').type = 'FACE'
1678
1795
class VIEW3D_MT_edit_mesh_extrude(Menu):
1719
1836
layout.operator("mesh.merge")
1720
1837
layout.operator("mesh.rip_move")
1838
layout.operator("mesh.rip_move_fill")
1721
1839
layout.operator("mesh.split")
1722
1840
layout.operator_menu_enum("mesh.separate", "type")
1723
1841
layout.operator("mesh.vert_connect")
1724
layout.operator("mesh.vert_slide")
1842
layout.operator("transform.vert_slide")
1726
1844
layout.separator()
1846
layout.operator("mesh.bevel").vertex_only = True
1728
1847
layout.operator("mesh.vertices_smooth")
1729
1848
layout.operator("mesh.remove_doubles")
1730
layout.operator("mesh.vertices_sort")
1731
layout.operator("mesh.vertices_randomize")
1849
layout.operator("mesh.sort_elements", text="Sort Vertices").elements = {'VERT'}
1733
1851
layout.operator("mesh.select_vertex_path")
1749
1867
def draw(self, context):
1750
1868
layout = self.layout
1751
1870
layout.operator_context = 'INVOKE_REGION_WIN'
1753
1872
layout.operator("mesh.edge_face_add")
1754
1873
layout.operator("mesh.subdivide")
1874
layout.operator("mesh.unsubdivide")
1878
layout.operator("transform.edge_crease")
1879
layout.operator("transform.edge_bevelweight")
1756
1881
layout.separator()
1766
1891
layout.separator()
1768
layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
1769
layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").direction = 'CCW'
1893
layout.operator("mesh.edge_rotate", text="Rotate Edge CW").use_ccw = False
1894
layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").use_ccw = True
1771
1896
layout.separator()
1773
1898
layout.operator("mesh.bevel")
1774
1899
layout.operator("mesh.edge_split")
1775
1900
layout.operator("mesh.bridge_edge_loops")
1901
layout.operator("mesh.sort_elements", text="Sort Edges").elements = {'EDGE'}
1777
1903
layout.separator()
1779
layout.operator("TRANSFORM_OT_edge_slide")
1780
layout.operator("TRANSFORM_OT_edge_crease")
1905
layout.operator("transform.edge_slide")
1781
1906
layout.operator("mesh.loop_multi_select", text="Edge Loop").ring = False
1783
#~ uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1);
1784
#~ uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0);
1786
1907
layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
1788
1908
layout.operator("mesh.loop_to_region")
1789
1909
layout.operator("mesh.region_to_loop")
1804
1925
layout.operator("mesh.inset")
1805
1926
layout.operator("mesh.bevel")
1806
1927
layout.operator("mesh.solidify")
1807
layout.operator("mesh.sort_faces")
1928
layout.operator("mesh.wireframe")
1929
layout.operator("mesh.sort_elements", text="Sort Faces").elements = {'FACE'}
1809
1931
layout.separator()
1819
1941
layout.separator()
1821
# uiItemO(layout, NULL, 0, "mesh.face_mode"); // mesh_set_face_flags(em, 1);
1822
# uiItemBooleanO(layout, NULL, 0, "mesh.face_mode", "clear", 1); // mesh_set_face_flags(em, 0);
1824
layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
1943
layout.operator("mesh.edge_rotate", text="Rotate Edge CW").use_ccw = False
1826
1945
layout.separator()
1828
layout.operator_menu_enum("mesh.uvs_rotate", "direction")
1947
layout.operator("mesh.uvs_rotate")
1829
1948
layout.operator("mesh.uvs_reverse")
1830
layout.operator_menu_enum("mesh.colors_rotate", "direction")
1949
layout.operator("mesh.colors_rotate")
1831
1950
layout.operator("mesh.colors_reverse")
1856
1975
layout.separator()
1858
1977
layout.operator("mesh.dissolve")
1978
layout.operator("mesh.dissolve_limited")
1859
1982
layout.operator("mesh.edge_collapse")
1860
layout.operator("mesh.delete_edgeloop")
1863
class VIEW3D_MT_edit_mesh_dissolve(Menu):
1864
bl_label = "Dissolve"
1866
def draw(self, context):
1867
layout = self.layout
1869
layout.operator("mesh.dissolve")
1873
layout.operator_enum("mesh.dissolve", "type")
1877
layout.operator("mesh.dissolve_limited")
1983
layout.operator("mesh.delete_edgeloop", text="Edge Loop")
1880
1986
class VIEW3D_MT_edit_mesh_showhide(ShowHideMenu, Menu):
1896
2002
layout.separator()
1898
layout.operator("curve.extrude")
1899
layout.operator("curve.duplicate")
2004
layout.operator("curve.extrude_move")
2005
layout.operator("curve.duplicate_move")
1900
2006
layout.operator("curve.separate")
1901
2007
layout.operator("curve.make_segment")
1902
2008
layout.operator("curve.cyclic_toggle")
2088
2194
layout.menu("VIEW3D_MT_transform")
2089
2195
layout.menu("VIEW3D_MT_mirror")
2090
2196
layout.menu("VIEW3D_MT_snap")
2197
layout.operator_menu_enum("lattice.flip", "axis")
2092
2199
layout.separator()
2225
2332
if lock_object.type == 'ARMATURE':
2226
2333
col.prop_search(view, "lock_bone", lock_object.data,
2227
2334
"edit_bones" if lock_object.mode == 'EDIT'
2231
2338
col.prop(view, "lock_cursor", text="Lock to Cursor")
2243
2350
subcol.label(text="Local Camera:")
2244
2351
subcol.prop(view, "camera", text="")
2353
col = layout.column(align=True)
2354
col.prop(view, "use_render_border")
2247
2357
class VIEW3D_PT_view3d_cursor(Panel):
2248
2358
bl_space_type = 'VIEW_3D'
2314
2424
col.prop(view, "show_outline_selected")
2315
2425
col.prop(view, "show_all_objects_origin")
2316
2426
col.prop(view, "show_relationship_lines")
2317
if ob and ob.type == 'MESH':
2319
col.prop(mesh, "show_all_edges")
2321
2428
col = layout.column()
2322
2429
col.active = display_all
2341
2448
col.label(text="Shading:")
2342
2449
col.prop(gs, "material_mode", text="")
2343
2450
col.prop(view, "show_textured_solid")
2451
if view.viewport_shade == 'SOLID':
2452
col.prop(view, "use_matcap")
2454
col.template_icon_view(view, "matcap_icon")
2455
col.prop(view, "show_backface_culling")
2345
2457
layout.separator()
2500
2612
if bg.source == 'IMAGE':
2501
2613
row = box.row()
2502
2614
row.template_ID(bg, "image", open="image.open")
2615
if bg.image is not None:
2504
2616
box.template_image(bg, "image", bg.image_user, compact=True)
2507
2619
elif bg.source == 'MOVIE_CLIP':
2508
box.prop(bg, 'use_camera_clip')
2620
box.prop(bg, "use_camera_clip")
2510
2622
column = box.column()
2511
2623
column.active = not bg.use_camera_clip
2526
2638
col = box.column()
2527
col.prop(bg, "show_on_foreground")
2528
2639
col.prop(bg, "opacity", slider=True)
2642
rowsub.prop(bg, "draw_depth", expand=True)
2644
if bg.view_axis in {'CAMERA', 'ALL'}:
2646
rowsub.prop(bg, "frame_method", expand=True)
2648
row = col.row(align=True)
2649
row.prop(bg, "offset_x", text="X")
2650
row.prop(bg, "offset_y", text="Y")
2529
2652
if bg.view_axis != 'CAMERA':
2530
2653
col.prop(bg, "size")
2531
row = col.row(align=True)
2532
row.prop(bg, "offset_x", text="X")
2533
row.prop(bg, "offset_y", text="Y")
2536
2656
class VIEW3D_PT_transform_orientations(Panel):
2587
2708
col.prop(toolsettings, "use_etch_quick")
2588
2709
col.prop(toolsettings, "use_etch_overdraw")
2590
2713
col.prop(toolsettings, "etch_convert_mode")
2592
2715
if toolsettings.etch_convert_mode == 'LENGTH':
2598
2721
elif toolsettings.etch_convert_mode == 'RETARGET':
2599
2722
col.prop(toolsettings, "etch_template")
2600
2723
col.prop(toolsettings, "etch_roll_mode")
2601
col.prop(toolsettings, "use_etch_autoname")
2602
col.prop(toolsettings, "etch_number")
2603
col.prop(toolsettings, "etch_side")
2605
col.operator("sketch.convert", text="Convert")
2727
colsub = col.column(align=True)
2728
colsub.prop(toolsettings, "use_etch_autoname")
2729
sub = colsub.column()
2730
sub.enabled = not toolsettings.use_etch_autoname
2731
sub.prop(toolsettings, "etch_number")
2732
sub.prop(toolsettings, "etch_side")
2736
col.operator("sketch.convert", text="Convert to Bones")
2737
col.operator("sketch.delete", text="Delete Strokes")
2608
2740
class VIEW3D_PT_context_properties(Panel):