2.5 - A few bugfixes...
[blender.git] / release / ui / space_view3d.py
1
2 import bpy
3
4 # ********** Header **********
5
6 class VIEW3D_HT_header(bpy.types.Header):
7         __space_type__ = 'VIEW_3D'
8
9         def draw(self, context):
10                 layout = self.layout
11                 
12                 view = context.space_data
13                 mode_string = context.mode
14                 edit_object = context.edit_object
15                 object = context.active_object
16                 
17                 row = layout.row(align=True)
18                 row.template_header()
19
20                 # Menus
21                 if context.area.show_menus:
22                         sub = row.row(align=True)
23
24                         sub.itemM("VIEW3D_MT_view")
25                         
26                         # Select Menu
27                         if mode_string not in ('EDIT_TEXT', 'SCULPT', 'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'):
28                                 sub.itemM("VIEW3D_MT_select_%s" % mode_string)
29                         
30                         if edit_object:
31                                 sub.itemM("VIEW3D_MT_edit_%s" % edit_object.type)
32                         elif object:
33                                 ob_mode_string = object.mode
34                                 
35                                 if mode_string not in ['PAINT_WEIGHT', 'PAINT_TEXTURE']:
36                                         sub.itemM("VIEW3D_MT_%s" % mode_string)
37
38                 layout.template_header_3D()
39
40 # ********** Menu **********
41
42 # ********** Utilities **********
43
44 class VIEW3D_MT_showhide(bpy.types.Menu):
45         __space_type__ = 'VIEW_3D'
46         __label__ = "Show/Hide"
47         _operator_name = ""
48
49         def draw(self, context):
50                 layout = self.layout
51                 
52                 layout.itemO("%s.reveal" % self._operator_name, text="Show Hidden")
53                 layout.itemO("%s.hide" % self._operator_name, text="Hide Selected")
54                 layout.item_booleanO("%s.hide" % self._operator_name, "unselected", True, text="Hide Unselected")
55
56 class VIEW3D_MT_snap(bpy.types.Menu):
57         __space_type__ = 'VIEW_3D'
58         __label__ = "Snap"
59
60         def draw(self, context):
61                 layout = self.layout
62                 
63                 layout.itemO("view3d.snap_selected_to_grid", text="Selection to Grid")
64                 layout.itemO("view3d.snap_selected_to_cursor", text="Selection to Cursor")
65                 layout.itemO("view3d.snap_selected_to_center", text="Selection to Center")
66                 
67                 layout.itemS()
68                 
69                 layout.itemO("view3d.snap_cursor_to_selected", text="Cursor to Selected")
70                 layout.itemO("view3d.snap_cursor_to_grid", text="Cursor to Grid")
71                 layout.itemO("view3d.snap_cursor_to_active", text="Cursor to Active")
72
73 # ********** View menus **********
74
75 class VIEW3D_MT_view(bpy.types.Menu):
76         __space_type__ = 'VIEW_3D'
77         __label__ = "View"
78
79         def draw(self, context):
80                 layout = self.layout
81
82                 layout.itemO("view3d.properties", icon='ICON_MENU_PANEL')
83                 layout.itemO("view3d.toolbar", icon='ICON_MENU_PANEL')
84                 
85                 layout.itemS()
86                 
87                 layout.item_enumO("view3d.viewnumpad", "type", 'CAMERA')
88                 layout.item_enumO("view3d.viewnumpad", "type", 'TOP')
89                 layout.item_enumO("view3d.viewnumpad", "type", 'FRONT')
90                 layout.item_enumO("view3d.viewnumpad", "type", 'RIGHT')
91                 
92                 layout.itemM("VIEW3D_MT_view_cameras", text="Cameras")
93                 
94                 layout.itemS()
95                 
96                 layout.itemO("view3d.view_persportho")
97                 
98                 layout.itemS()
99                 
100                 layout.itemM("VIEW3D_MT_view_navigation")
101                 layout.itemM("VIEW3D_MT_view_align")
102                 
103                 layout.itemS()
104
105                 layout.operator_context = "INVOKE_REGION_WIN"
106                 
107                 layout.itemO("view3d.clip_border", text="Clipping Border...")
108                 layout.itemO("view3d.zoom_border", text="Zoom Border...")
109                 
110                 layout.itemS()
111                 
112                 layout.itemO("view3d.view_center")
113                 layout.itemO("view3d.view_all")
114                 
115                 layout.itemS()
116                 
117                 layout.itemO("screen.region_foursplit", text="Toggle Quad View")
118                 layout.itemO("screen.screen_full_area", text="Toggle Full Screen")
119
120 class VIEW3D_MT_view_navigation(bpy.types.Menu):
121         __space_type__ = 'VIEW_3D'
122         __label__ = "Navigation"
123
124         def draw(self, context):
125                 layout = self.layout
126
127                 layout.items_enumO("view3d.view_orbit", "type")
128                 
129                 layout.itemS()
130                 
131                 layout.items_enumO("view3d.view_pan", "type")
132                 
133                 layout.itemS()
134                 
135                 layout.item_floatO("view3d.zoom", "delta", 1.0, text="Zoom In")
136                 layout.item_floatO("view3d.zoom", "delta", -1.0, text="Zoom Out")
137
138 class VIEW3D_MT_view_align(bpy.types.Menu):
139         __space_type__ = 'VIEW_3D'
140         __label__ = "Align View"
141
142         def draw(self, context):
143                 layout = self.layout
144                 
145                 layout.itemO("view3d.view_center")
146                 
147 class VIEW3D_MT_view_cameras(bpy.types.Menu):
148         __space_type__ = 'VIEW_3D'
149         __label__ = "Cameras"
150
151         def draw(self, context):
152                 layout = self.layout
153
154 # ********** Select menus, suffix from context.mode **********
155
156 class VIEW3D_MT_select_OBJECT(bpy.types.Menu):
157         __space_type__ = 'VIEW_3D'
158         __label__ = "Select"
159
160         def draw(self, context):
161                 layout = self.layout
162
163                 layout.itemO("view3d.select_border")
164
165                 layout.itemS()
166
167                 layout.itemO("object.select_all_toggle", text="Select/Deselect All")
168                 layout.itemO("object.select_inverse", text="Inverse")
169                 layout.itemO("object.select_random", text="Random")
170                 layout.itemO("object.select_mirror", text="Mirror")
171                 layout.itemO("object.select_by_layer", text="Select All by Layer")
172                 layout.item_enumO("object.select_by_type", "type", "", text="Select All by Type...")
173                 layout.itemO("object.select_grouped", text="Select Grouped...")
174
175 class VIEW3D_MT_select_POSE(bpy.types.Menu):
176         __space_type__ = 'VIEW_3D'
177         __label__ = "Select"
178
179         def draw(self, context):
180                 layout = self.layout
181
182                 layout.itemO("view3d.select_border", text="Border Select...")
183
184                 layout.itemS()
185                 
186                 layout.itemO("pose.select_all_toggle", text="Select/Deselect All")
187                 layout.itemO("pose.select_inverse", text="Inverse")
188                 layout.itemO("pose.select_constraint_target", text="Constraint Target")
189                 
190                 layout.itemS()
191                 
192                 layout.item_enumO("pose.select_hierarchy", "direction", 'PARENT')
193                 layout.item_enumO("pose.select_hierarchy", "direction", 'CHILD')
194                 
195                 layout.itemS()
196                 
197                 props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Parent")
198                 props.extend = True
199                 props.direction = 'PARENT'
200
201                 props = layout.itemO("pose.select_hierarchy", properties=True, text="Extend Child")
202                 props.extend = True
203                 props.direction = 'CHILD'
204
205 class VIEW3D_MT_select_PARTICLE(bpy.types.Menu):
206         __space_type__ = 'VIEW_3D'
207         __label__ = "Select"
208
209         def draw(self, context):
210                 layout = self.layout
211
212                 layout.itemO("view3d.select_border")
213
214                 layout.itemS()
215                 
216                 layout.itemO("particle.select_all_toggle", text="Select/Deselect All")
217                 layout.itemO("particle.select_linked")
218                 
219                 layout.itemS()
220                 
221                 layout.itemO("particle.select_more")
222                 layout.itemO("particle.select_less")
223
224 class VIEW3D_MT_select_EDIT_MESH(bpy.types.Menu):
225         __space_type__ = 'VIEW_3D'
226         __label__ = "Select"
227
228         def draw(self, context):
229                 layout = self.layout
230
231                 layout.itemO("view3d.select_border", text="Border Select...")
232
233                 layout.itemS()
234
235                 layout.itemO("mesh.select_all_toggle", text="Select/Deselect All")
236                 layout.itemO("mesh.select_inverse", text="Inverse")
237
238                 layout.itemS()
239
240                 layout.itemO("mesh.select_random", text="Random...")
241                 layout.itemO("mesh.edges_select_sharp", text="Sharp Edges")
242                 layout.itemO("mesh.faces_select_linked_flat", text="Linked Flat Faces")
243
244                 layout.itemS()
245
246                 layout.item_enumO("mesh.select_by_number_vertices", "type", 'TRIANGLES', text="Triangles")
247                 layout.item_enumO("mesh.select_by_number_vertices", "type", 'QUADS', text="Quads")
248                 layout.item_enumO("mesh.select_by_number_vertices", "type", 'OTHER', text="Loose Verts/Edges")
249                 layout.itemO("mesh.select_similar", text="Similar...")
250
251                 layout.itemS()
252
253                 layout.itemO("mesh.select_less", text="Less")
254                 layout.itemO("mesh.select_more", text="More")
255
256                 layout.itemS()
257
258                 layout.itemO("mesh.select_linked", text="Linked")
259                 layout.itemO("mesh.select_vertex_path", text="Vertex Path")
260                 layout.itemO("mesh.loop_multi_select", text="Edge Loop")
261                 layout.item_booleanO("mesh.loop_multi_select", "ring", True, text="Edge Ring")
262
263                 layout.itemS()
264
265                 layout.itemO("mesh.loop_to_region")
266                 layout.itemO("mesh.region_to_loop")
267
268 class VIEW3D_MT_select_EDIT_CURVE(bpy.types.Menu):
269         __space_type__ = 'VIEW_3D'
270         __label__ = "Select"
271
272         def draw(self, context):
273                 layout = self.layout
274
275                 layout.itemO("view3d.select_border", text="Border Select...")
276                 layout.itemO("view3d.select_circle", text="Circle Select...")
277
278                 layout.itemS()
279                 
280                 layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
281                 layout.itemO("curve.select_inverse")
282                 layout.itemO("curve.select_random")
283                 layout.itemO("curve.select_every_nth")
284
285                 layout.itemS()
286                 
287                 layout.itemO("curve.de_select_first")
288                 layout.itemO("curve.de_select_last")
289                 layout.itemO("curve.select_next")
290                 layout.itemO("curve.select_previous")
291
292                 layout.itemS()
293                 
294                 layout.itemO("curve.select_more")
295                 layout.itemO("curve.select_less")
296
297 class VIEW3D_MT_select_EDIT_SURFACE(bpy.types.Menu):
298         __space_type__ = 'VIEW_3D'
299         __label__ = "Select"
300
301         def draw(self, context):
302                 layout = self.layout
303
304                 layout.itemO("view3d.select_border", text="Border Select...")
305                 layout.itemO("view3d.select_circle", text="Circle Select...")
306
307                 layout.itemS()
308                 
309                 layout.itemO("curve.select_all_toggle", text="Select/Deselect All")
310                 layout.itemO("curve.select_inverse")
311                 layout.itemO("curve.select_random")
312                 layout.itemO("curve.select_every_nth")
313
314                 layout.itemS()
315                 
316                 layout.itemO("curve.select_row")
317
318                 layout.itemS()
319                 
320                 layout.itemO("curve.select_more")
321                 layout.itemO("curve.select_less")
322
323 class VIEW3D_MT_select_EDIT_METABALL(bpy.types.Menu):
324         __space_type__ = 'VIEW_3D'
325         __label__ = "Select"
326
327         def draw(self, context):
328                 layout = self.layout
329
330                 layout.itemO("view3d.select_border")
331                 
332                 layout.itemS()
333                 
334                 layout.itemO("mball.select_deselect_all_metaelems")
335                 layout.itemO("mball.select_inverse_metaelems")
336                 
337                 layout.itemS()
338                 
339                 layout.itemO("mball.select_random_metaelems")
340
341 class VIEW3D_MT_select_EDIT_LATTICE(bpy.types.Menu):
342         __space_type__ = 'VIEW_3D'
343         __label__ = "Select"
344
345         def draw(self, context):
346                 layout = self.layout
347
348                 layout.itemO("view3d.select_border")
349
350                 layout.itemS()
351                 
352                 layout.itemO("lattice.select_all_toggle", text="Select/Deselect All")
353
354 class VIEW3D_MT_select_EDIT_ARMATURE(bpy.types.Menu):
355         __space_type__ = 'VIEW_3D'
356         __label__ = "Select"
357
358         def draw(self, context):
359                 layout = self.layout
360
361                 layout.itemO("view3d.select_border", text="Border Select...")
362
363                 layout.itemS()
364                 
365                 layout.itemO("armature.select_all_toggle", text="Select/Deselect All")
366                 layout.itemO("armature.select_inverse", text="Inverse")
367
368                 layout.itemS()
369                 
370                 layout.item_enumO("armature.select_hierarchy", "direction", 'PARENT', text="Parent")
371                 layout.item_enumO("armature.select_hierarchy", "direction", 'CHILD', text="Child")
372                 
373                 layout.itemS()
374                 
375                 props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Parent")
376                 props.extend = True
377                 props.direction = 'PARENT'
378
379                 props = layout.itemO("armature.select_hierarchy", properties=True, text="Extend Child")
380                 props.extend = True
381                 props.direction = 'CHILD'
382
383 class VIEW3D_MT_select_FACE(bpy.types.Menu):# XXX no matching enum
384         __space_type__ = 'VIEW_3D'
385         __label__ = "Select"
386
387         def draw(self, context):
388                 layout = self.layout
389
390                 layout.view3d_select_faceselmenu()
391
392 # ********** Object menu **********
393
394 class VIEW3D_MT_OBJECT(bpy.types.Menu):
395         __space_type__ = 'VIEW_3D'
396         __context__ = "objectmode"
397         __label__ = "Object"
398
399         def draw(self, context):
400                 layout = self.layout
401
402                 layout.itemM("VIEW3D_MT_OBJECT_clear")
403                 layout.itemM("VIEW3D_MT_snap")
404                 
405                 layout.itemS()
406                 
407                 layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
408                 layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
409                 
410                 layout.itemS()
411                 
412                 layout.itemO("object.duplicate")
413                 layout.item_booleanO("object.duplicate", "linked", True, text="Duplicate Linked")
414                 layout.itemO("object.delete", text="Delete...")
415                 layout.itemO("object.proxy_make", text="Make Proxy...")
416                 
417                 layout.itemS()
418                 
419                 layout.itemM("VIEW3D_MT_OBJECT_parent")
420                 layout.itemM("VIEW3D_MT_OBJECT_track")
421                 layout.itemM("VIEW3D_MT_OBJECT_group")
422                 layout.itemM("VIEW3D_MT_OBJECT_constraints")
423                 
424                 layout.itemS()
425                 
426                 layout.itemO("object.join")
427                 
428                 layout.itemS()
429                 
430                 layout.itemM("VIEW3D_MT_OBJECT_showhide")
431                 
432 class VIEW3D_MT_OBJECT_clear(bpy.types.Menu):
433         __space_type__ = 'VIEW_3D'
434         __label__ = "Clear"
435
436         def draw(self, context):
437                 layout = self.layout
438                 
439                 layout.itemO("object.location_clear", text="Location")
440                 layout.itemO("object.rotation_clear", text="Rotation")
441                 layout.itemO("object.scale_clear", text="Scale")
442                 layout.itemO("object.origin_clear", text="Origin")
443                 
444 class VIEW3D_MT_OBJECT_parent(bpy.types.Menu):
445         __space_type__ = 'VIEW_3D'
446         __label__ = "Parent"
447
448         def draw(self, context):
449                 layout = self.layout
450                 
451                 layout.itemO("object.parent_set", text="Set")
452                 layout.itemO("object.parent_clear", text="Clear")
453                 
454 class VIEW3D_MT_OBJECT_track(bpy.types.Menu):
455         __space_type__ = 'VIEW_3D'
456         __label__ = "Track"
457
458         def draw(self, context):
459                 layout = self.layout
460                 
461                 layout.itemO("object.track_set", text="Set")
462                 layout.itemO("object.track_clear", text="Clear")
463                 
464 class VIEW3D_MT_OBJECT_group(bpy.types.Menu):
465         __space_type__ = 'VIEW_3D'
466         __label__ = "Group"
467
468         def draw(self, context):
469                 layout = self.layout
470                 
471                 layout.itemO("group.group_create")
472                 layout.itemO("group.objects_remove")
473                 
474                 layout.itemS()
475                 
476                 layout.itemO("group.objects_add_active")
477                 layout.itemO("group.objects_remove_active")
478                 
479 class VIEW3D_MT_OBJECT_constraints(bpy.types.Menu):
480         __space_type__ = 'VIEW_3D'
481         __label__ = "Constraints"
482
483         def draw(self, context):
484                 layout = self.layout
485                 
486                 layout.itemO("object.constraint_add_with_targets")
487                 layout.itemO("object.constraints_clear")
488                 
489 class VIEW3D_MT_OBJECT_showhide(bpy.types.Menu):
490         __space_type__ = 'VIEW_3D'
491         __label__ = "Show/Hide"
492
493         def draw(self, context):
494                 layout = self.layout
495                 
496                 layout.itemO("object.restrictview_clear", text="Show Hidden")
497                 layout.itemO("object.restrictview_set", text="Hide Selected")
498                 layout.item_booleanO("object.restrictview_set", "unselected", True, text="Hide Unselected")
499
500 # ********** Vertex paint menu **********       
501         
502 class VIEW3D_MT_PAINT_VERTEX(bpy.types.Menu):
503         __space_type__ = 'VIEW_3D'
504         __label__ = "Paint"
505
506         def draw(self, context):
507                 layout = self.layout
508                 
509                 sculpt = context.tool_settings.sculpt
510
511                 layout.itemO("paint.vertex_color_set")
512                 props = layout.itemO("paint.vertex_color_set", text="Set Selected Vertex Colors", properties=True)
513                 props.selected = True
514
515 # ********** Sculpt menu **********     
516         
517 class VIEW3D_MT_SCULPT(bpy.types.Menu):
518         __space_type__ = 'VIEW_3D'
519         __label__ = "Sculpt"
520
521         def draw(self, context):
522                 layout = self.layout
523                 
524                 sculpt = context.tool_settings.sculpt
525                 brush = context.tool_settings.sculpt.brush
526                 
527                 layout.itemR(sculpt, "symmetry_x")
528                 layout.itemR(sculpt, "symmetry_y")
529                 layout.itemR(sculpt, "symmetry_z")
530                 layout.itemS()
531                 layout.itemR(sculpt, "lock_x")
532                 layout.itemR(sculpt, "lock_y")
533                 layout.itemR(sculpt, "lock_z")
534                 layout.itemS()
535                 layout.item_menu_enumO("brush.curve_preset", property="shape")
536                 layout.itemS()
537                 
538                 if brush.sculpt_tool != 'GRAB':
539                         layout.itemR(brush, "airbrush")
540                         
541                         if brush.sculpt_tool != 'LAYER':
542                                 layout.itemR(brush, "anchored")
543                         
544                         if brush.sculpt_tool in ('DRAW', 'PINCH', 'INFLATE', 'LAYER', 'CLAY'):
545                                 layout.itemR(brush, "flip_direction")
546
547                         if brush.sculpt_tool == 'LAYER':
548                                 layout.itemR(brush, "persistent")
549                                 layout.itemO("sculpt.set_persistent_base")
550
551 # ********** Particle menu **********   
552         
553 class VIEW3D_MT_PARTICLE(bpy.types.Menu):
554         __space_type__ = 'VIEW_3D'
555         __label__ = "Particle"
556
557         def draw(self, context):
558                 layout = self.layout
559                 
560                 particle_edit = context.tool_settings.particle_edit
561                 
562                 layout.itemO("particle.mirror")
563                 
564                 layout.itemS()
565                 
566                 layout.itemO("particle.remove_doubles")
567                 layout.itemO("particle.delete")
568                 
569                 if particle_edit.selection_mode == 'POINT':
570                         layout.itemO("particle.subdivide")
571                 
572                 layout.itemO("particle.rekey")
573                 
574                 layout.itemS()
575                 
576                 layout.itemM("VIEW3D_MT_PARTICLE_showhide")
577
578 class VIEW3D_MT_PARTICLE_showhide(VIEW3D_MT_showhide):
579         _operator_name = "particle"
580
581 # ********** Pose Menu **********
582
583 class VIEW3D_MT_POSE(bpy.types.Menu):
584         __space_type__ = 'VIEW_3D'
585         __label__ = "Pose"
586
587         def draw(self, context):
588                 layout = self.layout
589                 
590                 arm = context.active_object.data
591                 
592                 if arm.drawtype in ('BBONE', 'ENVELOPE'):
593                         layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
594                 
595                 layout.itemM("VIEW3D_MT_POSE_transform")
596                 
597                 layout.itemS()
598                 
599                 layout.itemO("anim.insert_keyframe_menu", text="Insert Keyframe...")
600                 layout.itemO("anim.delete_keyframe_v3d", text="Delete Keyframe...")
601                 
602                 layout.itemS()
603                 
604                 layout.itemO("pose.apply")
605                 
606                 layout.itemS()
607                 
608                 layout.itemO("pose.copy")
609                 layout.itemO("pose.paste")
610                 layout.item_booleanO("pose.paste", "flipped", True, text="Paste X-Flipped Pose")
611                 
612                 layout.itemS()
613                 
614                 layout.itemM("VIEW3D_MT_POSE_pose")
615                 layout.itemM("VIEW3D_MT_POSE_motion")
616                 layout.itemM("VIEW3D_MT_POSE_group")
617                 
618                 layout.itemS()
619                 
620                 layout.itemM("VIEW3D_MT_POSE_ik")
621                 layout.itemM("VIEW3D_MT_POSE_constraints")
622                 
623                 layout.itemS()
624                 
625                 layout.item_enumO("pose.autoside_names", "axis", 'XAXIS', text="AutoName Left/Right")
626                 layout.item_enumO("pose.autoside_names", "axis", 'YAXIS', text="AutoName Front/Back")
627                 layout.item_enumO("pose.autoside_names", "axis", 'ZAXIS', text="AutoName Top/Bottom")
628                 
629                 layout.itemO("pose.flip_names")
630                 
631                 layout.itemS()
632                 
633                 layout.itemO("pose.armature_layers", text="Change Armature Layers...")
634                 layout.itemO("pose.bone_layers", text="Change Bone Layers...")
635                 
636                 layout.itemS()
637                 
638                 layout.itemM("VIEW3D_MT_POSE_showhide")
639                 layout.item_menu_enumO("pose.flags_set", 'mode', text="Bone Settings")
640
641 class VIEW3D_MT_POSE_transform(bpy.types.Menu):
642         __space_type__ = 'VIEW_3D'
643         __label__ = "Clear Transform"
644
645         def draw(self, context):
646                 layout = self.layout
647                 
648                 layout.itemL(text="User Transform")
649                 
650                 layout.itemO("pose.loc_clear", text="Location")
651                 layout.itemO("pose.rot_clear", text="Rotation")
652                 layout.itemO("pose.scale_clear", text="Scale")
653                 
654                 layout.itemL(text="Origin")
655                 
656 class VIEW3D_MT_POSE_pose(bpy.types.Menu):
657         __space_type__ = 'VIEW_3D'
658         __label__ = "Pose Library"
659
660         def draw(self, context):
661                 layout = self.layout
662                 
663                 layout.itemO("poselib.browse_interactive", text="Browse Poses...")
664                 
665                 layout.itemS()
666                 
667                 layout.itemO("poselib.pose_add", text="Add Pose...")
668                 layout.itemO("poselib.pose_rename", text="Rename Pose...")
669                 layout.itemO("poselib.pose_remove", text="Remove Pose...")
670
671 class VIEW3D_MT_POSE_motion(bpy.types.Menu):
672         __space_type__ = 'VIEW_3D'
673         __label__ = "Motion Paths"
674
675         def draw(self, context):
676                 layout = self.layout
677                 
678                 layout.itemO("pose.paths_calculate", text="Calculate")
679                 layout.itemO("pose.paths_clear", text="Clear")
680                 
681 class VIEW3D_MT_POSE_group(bpy.types.Menu):
682         __space_type__ = 'VIEW_3D'
683         __label__ = "Bone Groups"
684
685         def draw(self, context):
686                 layout = self.layout
687                 layout.itemO("pose.group_add")
688                 layout.itemO("pose.group_remove")
689                 
690                 layout.itemS()
691                 
692                 layout.itemO("pose.group_assign")
693                 layout.itemO("pose.group_unassign")
694                 
695                 
696 class VIEW3D_MT_POSE_ik(bpy.types.Menu):
697         __space_type__ = 'VIEW_3D'
698         __label__ = "Inverse Kinematics"
699
700         def draw(self, context):
701                 layout = self.layout
702                 
703                 layout.itemO("pose.ik_add")
704                 layout.itemO("pose.ik_clear")
705                 
706 class VIEW3D_MT_POSE_constraints(bpy.types.Menu):
707         __space_type__ = 'VIEW_3D'
708         __label__ = "Constraints"
709
710         def draw(self, context):
711                 layout = self.layout
712                 
713                 layout.itemO("pose.constraint_add_with_targets", text="Add (With Targets)...")
714                 layout.itemO("pose.constraints_clear")
715                 
716 class VIEW3D_MT_POSE_showhide(VIEW3D_MT_showhide):
717         _operator_name = "pose"
718
719 # ********** Edit Menus, suffix from ob.type **********
720
721 # Edit MESH
722 class VIEW3D_MT_edit_MESH(bpy.types.Menu):
723         __space_type__ = 'VIEW_3D'
724         __label__ = "Mesh"
725
726         def draw(self, context):
727                 layout = self.layout
728                 
729                 settings = context.tool_settings
730
731                 layout.itemO("ed.undo")
732                 layout.itemO("ed.redo")
733                 
734                 layout.itemS()
735                 
736                 layout.itemM("VIEW3D_MT_snap")
737                 
738                 layout.itemS()
739                 
740                 layout.itemO("uv.mapping_menu", text="UV Unwrap...")
741                 
742                 layout.itemS()
743                 
744                 layout.itemO("mesh.extrude")
745                 layout.itemO("mesh.duplicate")
746                 layout.itemO("mesh.delete", text="Delete...")
747                 
748                 layout.itemS()
749                 
750                 layout.itemM("VIEW3D_MT_edit_MESH_vertices")
751                 layout.itemM("VIEW3D_MT_edit_MESH_edges")
752                 layout.itemM("VIEW3D_MT_edit_MESH_faces")
753                 layout.itemM("VIEW3D_MT_edit_MESH_normals")
754                 
755                 layout.itemS()
756                 
757                 layout.itemR(settings, "automerge_editing")
758                 layout.itemR(settings, "proportional_editing")
759                 layout.item_menu_enumR(settings, "proportional_editing_falloff")
760                 
761                 layout.itemS()
762                 
763                 layout.itemM("VIEW3D_MT_edit_MESH_showhide")
764
765 class VIEW3D_MT_edit_MESH_vertices(bpy.types.Menu):
766         __space_type__ = 'VIEW_3D'
767         __label__ = "Vertices"
768
769         def draw(self, context):
770                 layout = self.layout
771                 
772                 layout.itemO("mesh.merge")
773                 layout.itemO("mesh.rip")
774                 layout.itemO("mesh.split")
775                 layout.itemO("mesh.separate")
776
777                 layout.itemS()
778                 
779                 layout.itemO("mesh.vertices_smooth")
780                 layout.itemO("mesh.remove_doubles")
781
782 class VIEW3D_MT_edit_MESH_edges(bpy.types.Menu):
783         __space_type__ = 'VIEW_3D'
784         __label__ = "Edges"
785
786         def draw(self, context):
787                 layout = self.layout
788
789                 layout.itemO("mesh.edge_face_add")
790                 layout.itemO("mesh.subdivide")
791
792                 layout.itemS()
793                 
794                 layout.itemO("mesh.mark_seam")
795                 layout.item_booleanO("mesh.mark_seam", "clear", True, text="Clear Seam")
796                 
797                 layout.itemS()
798                 
799                 layout.itemO("mesh.mark_sharp")
800                 layout.item_booleanO("mesh.mark_sharp", "clear", True, text="Clear Sharp")
801                 
802                 layout.itemS()
803                 
804                 layout.item_enumO("mesh.edge_rotate", "direction", 'CW', text="Rotate Edge CW")
805                 layout.item_enumO("mesh.edge_rotate", "direction", 'CCW', text="Rotate Edge CCW")
806
807 class VIEW3D_MT_edit_MESH_faces(bpy.types.Menu):
808         __space_type__ = 'VIEW_3D'
809         __label__ = "Faces"
810
811         def draw(self, context):
812                 layout = self.layout
813
814                 layout.itemO("mesh.edge_face_add")
815                 layout.itemO("mesh.fill")
816                 layout.itemO("mesh.beauty_fill")
817
818                 layout.itemS()
819                 
820                 layout.itemO("mesh.quads_convert_to_tris")
821                 layout.itemO("mesh.tris_convert_to_quads")
822                 layout.itemO("mesh.edge_flip")
823                 
824                 layout.itemS()
825                 
826                 layout.itemO("mesh.faces_shade_smooth")
827                 layout.itemO("mesh.faces_shade_flat")
828
829 class VIEW3D_MT_edit_MESH_normals(bpy.types.Menu):
830         __space_type__ = 'VIEW_3D'
831         __label__ = "Normals"
832
833         def draw(self, context):
834                 layout = self.layout
835
836                 layout.itemO("mesh.normals_make_consistent", text="Recalculate Outside")
837                 layout.item_booleanO("mesh.normals_make_consistent", "inside", True, text="Recalculate Inside")
838
839                 layout.itemS()
840                 
841                 layout.itemO("mesh.flip_normals")
842                 
843 class VIEW3D_MT_edit_MESH_showhide(VIEW3D_MT_showhide):
844         _operator_name = "mesh"
845
846 # Edit CURVE
847
848 # draw_CURVE is used by VIEW3D_MT_edit_CURVE and VIEW3D_MT_edit_SURFACE
849 def draw_CURVE(self, context):
850         layout = self.layout
851         
852         settings = context.tool_settings
853         
854         layout.itemM("VIEW3D_MT_snap")
855         
856         layout.itemS()
857         
858         layout.itemO("curve.extrude")
859         layout.itemO("curve.duplicate")
860         layout.itemO("curve.separate")
861         layout.itemO("curve.make_segment")
862         layout.itemO("curve.cyclic_toggle")
863         layout.itemO("curve.delete", text="Delete...")
864         
865         layout.itemS()
866         
867         layout.itemM("VIEW3D_MT_edit_CURVE_ctrlpoints")
868         layout.itemM("VIEW3D_MT_edit_CURVE_segments")
869         
870         layout.itemS()
871         
872         layout.itemR(settings, "proportional_editing")
873         layout.item_menu_enumR(settings, "proportional_editing_falloff")
874         
875         layout.itemS()
876         
877         layout.itemM("VIEW3D_MT_edit_CURVE_showhide")
878
879 class VIEW3D_MT_edit_CURVE(bpy.types.Menu):
880         __space_type__ = 'VIEW_3D'
881         __label__ = "Curve"
882
883         draw = draw_CURVE
884         
885 class VIEW3D_MT_edit_CURVE_ctrlpoints(bpy.types.Menu):
886         __space_type__ = 'VIEW_3D'
887         __label__ = "Control Points"
888
889         def draw(self, context):
890                 layout = self.layout
891                 
892                 edit_object = context.edit_object
893                 
894                 if edit_object.type == 'CURVE':
895                         layout.item_enumO("tfm.transform", "mode", 'TILT')
896                         layout.itemO("curve.tilt_clear")
897                         layout.itemO("curve.separate")
898                         
899                         layout.itemS()
900                         
901                         layout.item_menu_enumO("curve.handle_type_set", "type")
902                 
903 class VIEW3D_MT_edit_CURVE_segments(bpy.types.Menu):
904         __space_type__ = 'VIEW_3D'
905         __label__ = "Segments"
906
907         def draw(self, context):
908                 layout = self.layout
909                 
910                 layout.itemO("curve.subdivide")
911                 layout.itemO("curve.switch_direction")
912
913 class VIEW3D_MT_edit_CURVE_showhide(VIEW3D_MT_showhide):
914         _operator_name = "curve"
915
916 # Edit SURFACE
917 class VIEW3D_MT_edit_SURFACE(bpy.types.Menu):
918         __space_type__ = 'VIEW_3D'
919         __label__ = "Surface"
920
921         draw = draw_CURVE
922
923 # Edit TEXT
924 class VIEW3D_MT_edit_TEXT(bpy.types.Menu):
925         __space_type__ = 'VIEW_3D'
926         __label__ = "Text"
927
928         def draw(self, context):
929                 layout = self.layout
930                 
931                 layout.itemO("font.file_paste")
932                 
933                 layout.itemS()
934                 
935                 layout.itemM("VIEW3D_MT_edit_TEXT_chars")
936
937 class VIEW3D_MT_edit_TEXT_chars(bpy.types.Menu):
938         __space_type__ = 'VIEW_3D'
939         __label__ = "Special Characters"
940
941         def draw(self, context):
942                 layout = self.layout
943                 
944                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA9'.decode(), text="Copyright|Alt C")
945                 layout.item_stringO("font.text_insert", "text", b'\xC2\xAE'.decode(), text="Registered Trademark|Alt R")
946                 
947                 layout.itemS()
948                 
949                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB0'.decode(), text="Degree Sign|Alt G")
950                 layout.item_stringO("font.text_insert", "text", b'\xC3\x97'.decode(), text="Multiplication Sign|Alt x")
951                 layout.item_stringO("font.text_insert", "text", b'\xC2\x8A'.decode(), text="Circle|Alt .")
952                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB9'.decode(), text="Superscript 1|Alt 1")
953                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB2'.decode(), text="Superscript 2|Alt 2")
954                 layout.item_stringO("font.text_insert", "text", b'\xC2\xB3'.decode(), text="Superscript 3|Alt 3")
955                 layout.item_stringO("font.text_insert", "text", b'\xC2\xBB'.decode(), text="Double >>|Alt >")
956                 layout.item_stringO("font.text_insert", "text", b'\xC2\xAB'.decode(), text="Double <<|Alt <")
957                 layout.item_stringO("font.text_insert", "text", b'\xE2\x80\xB0'.decode(), text="Promillage|Alt %")
958                 
959                 layout.itemS()
960                 
961                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA4'.decode(), text="Dutch Florin|Alt F")
962                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA3'.decode(), text="British Pound|Alt L")
963                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA5'.decode(), text="Japanese Yen|Alt Y")
964                 
965                 layout.itemS()
966                 
967                 layout.item_stringO("font.text_insert", "text", b'\xC3\x9F'.decode(), text="German S|Alt S")
968                 layout.item_stringO("font.text_insert", "text", b'\xC2\xBF'.decode(), text="Spanish Question Mark|Alt ?")
969                 layout.item_stringO("font.text_insert", "text", b'\xC2\xA1'.decode(), text="Spanish Exclamation Mark|Alt !")
970
971 # Edit META
972 class VIEW3D_MT_edit_META(bpy.types.Menu):
973         __space_type__ = 'VIEW_3D'
974         __label__ = "Metaball"
975
976         def draw(self, context):
977                 layout = self.layout
978                 
979                 settings = context.tool_settings
980
981                 layout.itemO("ed.undo")
982                 layout.itemO("ed.redo")
983                 
984                 layout.itemS()
985                 
986                 layout.itemM("VIEW3D_MT_snap")
987                 
988                 layout.itemS()
989                 
990                 layout.itemO("mball.delete_metaelems", text="Delete...")
991                 layout.itemO("mball.duplicate_metaelems")
992                 
993                 layout.itemS()
994                 
995                 layout.itemR(settings, "proportional_editing")
996                 layout.item_menu_enumR(settings, "proportional_editing_falloff")
997                 
998                 layout.itemS()
999                 
1000                 layout.itemM("VIEW3D_MT_edit_META_showhide")
1001
1002 class VIEW3D_MT_edit_META_showhide(bpy.types.Menu):
1003         __space_type__ = 'VIEW_3D'
1004         __label__ = "Show/Hide"
1005
1006         def draw(self, context):
1007                 layout = self.layout
1008                 
1009                 layout.itemO("mball.reveal_metaelems", text="Show Hidden")
1010                 layout.itemO("mball.hide_metaelems", text="Hide Selected")
1011                 layout.item_booleanO("mball.hide_metaelems", "unselected", True, text="Hide Unselected")
1012
1013 # Edit LATTICE
1014 class VIEW3D_MT_edit_LATTICE(bpy.types.Menu):
1015         __space_type__ = 'VIEW_3D'
1016         __label__ = "Lattice"
1017
1018         def draw(self, context):
1019                 layout = self.layout
1020                 
1021                 settings = context.tool_settings
1022
1023                 layout.itemM("VIEW3D_MT_snap")
1024                 
1025                 layout.itemS()
1026                 
1027                 layout.itemO("lattice.make_regular")
1028                 
1029                 layout.itemS()
1030                 
1031                 layout.itemR(settings, "proportional_editing")
1032                 layout.item_menu_enumR(settings, "proportional_editing_falloff")
1033
1034 # Edit ARMATURE
1035 class VIEW3D_MT_edit_ARMATURE(bpy.types.Menu):
1036         __space_type__ = 'VIEW_3D'
1037         __label__ = "Armature"
1038
1039         def draw(self, context):
1040                 layout = self.layout
1041                 
1042                 edit_object = context.edit_object
1043                 arm = edit_object.data
1044                 
1045                 layout.itemM("VIEW3D_MT_snap")
1046                 layout.itemM("VIEW3D_MT_edit_ARMATURE_roll")
1047                 
1048                 if arm.drawtype == 'ENVELOPE':
1049                         layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale Envelope Distance")
1050                 else:
1051                         layout.item_enumO("tfm.transform", "mode", 'BONESIZE', text="Scale B-Bone Width")
1052                                 
1053                 layout.itemS()
1054                 
1055                 layout.itemO("armature.extrude")
1056                 
1057                 if arm.x_axis_mirror:
1058                         layout.item_booleanO("armature.extrude", "forked", True, text="Extrude Forked")
1059                 
1060                 layout.itemO("armature.duplicate")
1061                 layout.itemO("armature.merge")
1062                 layout.itemO("armature.fill")
1063                 layout.itemO("armature.delete")
1064                 layout.itemO("armature.separate")
1065
1066                 layout.itemS()
1067
1068                 layout.itemO("armature.subdivide_multi", text="Subdivide")
1069                 
1070                 layout.itemS()
1071
1072                 layout.item_enumO("armature.autoside_names", "type", 'XAXIS', text="AutoName Left/Right")
1073                 layout.item_enumO("armature.autoside_names", "type", 'YAXIS', text="AutoName Front/Back")
1074                 layout.item_enumO("armature.autoside_names", "type", 'ZAXIS', text="AutoName Top/Bottom")
1075                 layout.itemO("armature.flip_names")
1076
1077                 layout.itemS()
1078
1079                 layout.itemO("armature.armature_layers")
1080                 layout.itemO("armature.bone_layers")
1081
1082                 layout.itemS()
1083
1084                 layout.itemM("VIEW3D_MT_edit_ARMATURE_parent")
1085
1086                 layout.itemS()
1087
1088                 layout.item_menu_enumO("armature.flags_set", "mode", text="Bone Settings")
1089
1090 class VIEW3D_MT_edit_ARMATURE_parent(bpy.types.Menu):
1091         __space_type__ = 'VIEW_3D'
1092         __label__ = "Parent"
1093
1094         def draw(self, context):
1095                 layout = self.layout
1096                 
1097                 layout.itemO("armature.parent_set", text="Make")
1098                 layout.itemO("armature.parent_clear", text="Clear")
1099
1100 class VIEW3D_MT_edit_ARMATURE_roll(bpy.types.Menu):
1101         __space_type__ = 'VIEW_3D'
1102         __label__ = "Bone Roll"
1103
1104         def draw(self, context):
1105                 layout = self.layout
1106                 
1107                 layout.item_enumO("armature.calculate_roll", "type", 'GLOBALUP', text="Clear Roll (Z-Axis Up)")
1108                 layout.item_enumO("armature.calculate_roll", "type", 'CURSOR', text="Roll to Cursor")
1109                 
1110                 layout.itemS()
1111                 
1112                 layout.item_enumO("tfm.transform", "mode", 'BONE_ROLL', text="Set Roll")
1113
1114 # ********** Panel **********
1115
1116 class VIEW3D_PT_3dview_properties(bpy.types.Panel):
1117         __space_type__ = 'VIEW_3D'
1118         __region_type__ = 'UI'
1119         __label__ = "View"
1120
1121         def poll(self, context):
1122                 view = context.space_data
1123                 return (view)
1124
1125         def draw(self, context):
1126                 layout = self.layout
1127                 
1128                 view = context.space_data
1129                 scene = context.scene
1130                 
1131                 col = layout.column()
1132                 col.itemR(view, "camera")
1133                 col.itemR(view, "lens")
1134                 
1135                 layout.itemL(text="Clip:")
1136                 col = layout.column(align=True)
1137                 col.itemR(view, "clip_start", text="Start")
1138                 col.itemR(view, "clip_end", text="End")
1139                 
1140                 layout.itemL(text="Grid:")
1141                 col = layout.column(align=True)
1142                 col.itemR(view, "grid_lines", text="Lines")
1143                 col.itemR(view, "grid_spacing", text="Spacing")
1144                 col.itemR(view, "grid_subdivisions", text="Subdivisions")
1145                 
1146                 layout.column().itemR(scene, "cursor_location", text="3D Cursor:")
1147                 
1148 class VIEW3D_PT_3dview_display(bpy.types.Panel):
1149         __space_type__ = 'VIEW_3D'
1150         __region_type__ = 'UI'
1151         __label__ = "Display"
1152
1153         def poll(self, context):
1154                 view = context.space_data
1155                 return (view)
1156
1157         def draw(self, context):
1158                 layout = self.layout
1159                 view = context.space_data
1160                 
1161                 col = layout.column()
1162                 col.itemR(view, "display_floor", text="Grid Floor")
1163                 col.itemR(view, "display_x_axis", text="X Axis")
1164                 col.itemR(view, "display_y_axis", text="Y Axis")
1165                 col.itemR(view, "display_z_axis", text="Z Axis")
1166                 col.itemR(view, "outline_selected")
1167                 col.itemR(view, "all_object_centers")
1168                 col.itemR(view, "relationship_lines")
1169                 col.itemR(view, "textured_solid")
1170                 
1171                 layout.itemS()
1172                 
1173                 layout.itemO("screen.region_foursplit")
1174                 
1175                 col = layout.column()
1176                 col.itemR(view, "lock_rotation")
1177                 col.itemR(view, "box_preview")
1178                 col.itemR(view, "box_clip")
1179
1180 class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel):
1181         __space_type__ = 'VIEW_3D'
1182         __region_type__ = 'UI'
1183         __label__ = "Mesh Display"
1184
1185         def poll(self, context):
1186                 editmesh = context.mode == 'EDIT_MESH'
1187                 return (editmesh)
1188
1189         def draw(self, context):
1190                 layout = self.layout
1191
1192                 mesh = context.active_object.data
1193                 
1194                 col = layout.column()
1195                 col.itemL(text="Overlays:")
1196                 col.itemR(mesh, "draw_edges", text="Edges")
1197                 col.itemR(mesh, "draw_faces", text="Faces")
1198                 col.itemR(mesh, "draw_creases", text="Creases")
1199                 col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights")
1200                 col.itemR(mesh, "draw_seams", text="Seams")
1201                 col.itemR(mesh, "draw_sharp", text="Sharp")
1202                 
1203                 col.itemS()
1204                 col.itemL(text="Normals:")
1205                 col.itemR(mesh, "draw_normals", text="Face")
1206                 col.itemR(mesh, "draw_vertex_normals", text="Vertex")
1207                 
1208                 col.itemS()
1209                 col.itemL(text="Numerics:")
1210                 col.itemR(mesh, "draw_edge_lenght")
1211                 col.itemR(mesh, "draw_edge_angle")
1212                 col.itemR(mesh, "draw_face_area")
1213         
1214 class VIEW3D_PT_background_image(bpy.types.Panel):
1215         __space_type__ = 'VIEW_3D'
1216         __region_type__ = 'UI'
1217         __label__ = "Background Image"
1218         __default_closed__ = True
1219
1220         def poll(self, context):
1221                 view = context.space_data
1222                 bg = context.space_data.background_image
1223                 return (view)
1224
1225         def draw_header(self, context):
1226                 layout = self.layout
1227                 view = context.space_data
1228
1229                 layout.itemR(view, "display_background_image", text="")
1230
1231         def draw(self, context):
1232                 layout = self.layout
1233                 
1234                 view = context.space_data
1235                 bg = view.background_image
1236
1237                 if bg:
1238                         layout.active = view.display_background_image
1239
1240                         col = layout.column()
1241                         col.itemR(bg, "image", text="")
1242                         #col.itemR(bg, "image_user")
1243                         col.itemR(bg, "size")
1244                         col.itemR(bg, "transparency", slider=True)
1245                         col.itemL(text="Offset:")
1246                         
1247                         col = layout.column(align=True)
1248                         col.itemR(bg, "offset_x", text="X")
1249                         col.itemR(bg, "offset_y", text="Y")
1250
1251 bpy.types.register(VIEW3D_HT_header) # Header
1252
1253 bpy.types.register(VIEW3D_MT_view) #View Menus
1254 bpy.types.register(VIEW3D_MT_view_navigation)
1255 bpy.types.register(VIEW3D_MT_view_align)
1256 bpy.types.register(VIEW3D_MT_view_cameras)
1257
1258 bpy.types.register(VIEW3D_MT_select_OBJECT) # Select Menus
1259 bpy.types.register(VIEW3D_MT_select_POSE)
1260 bpy.types.register(VIEW3D_MT_select_PARTICLE)
1261 bpy.types.register(VIEW3D_MT_select_EDIT_MESH)
1262 bpy.types.register(VIEW3D_MT_select_EDIT_CURVE)
1263 bpy.types.register(VIEW3D_MT_select_EDIT_SURFACE)
1264 bpy.types.register(VIEW3D_MT_select_EDIT_METABALL)
1265 bpy.types.register(VIEW3D_MT_select_EDIT_LATTICE)
1266 bpy.types.register(VIEW3D_MT_select_EDIT_ARMATURE)
1267 bpy.types.register(VIEW3D_MT_select_FACE) # XXX todo
1268
1269 bpy.types.register(VIEW3D_MT_OBJECT) # Object Menu
1270 bpy.types.register(VIEW3D_MT_OBJECT_clear)
1271 bpy.types.register(VIEW3D_MT_OBJECT_parent)
1272 bpy.types.register(VIEW3D_MT_OBJECT_track)
1273 bpy.types.register(VIEW3D_MT_OBJECT_group)
1274 bpy.types.register(VIEW3D_MT_OBJECT_constraints)
1275 bpy.types.register(VIEW3D_MT_OBJECT_showhide)
1276
1277 bpy.types.register(VIEW3D_MT_SCULPT) # Sculpt Menu
1278
1279 bpy.types.register(VIEW3D_MT_PAINT_VERTEX)
1280
1281 bpy.types.register(VIEW3D_MT_PARTICLE) # Particle Menu
1282 bpy.types.register(VIEW3D_MT_PARTICLE_showhide)
1283
1284 bpy.types.register(VIEW3D_MT_POSE) # POSE Menu
1285 bpy.types.register(VIEW3D_MT_POSE_transform)
1286 bpy.types.register(VIEW3D_MT_POSE_pose)
1287 bpy.types.register(VIEW3D_MT_POSE_motion)
1288 bpy.types.register(VIEW3D_MT_POSE_group)
1289 bpy.types.register(VIEW3D_MT_POSE_ik)
1290 bpy.types.register(VIEW3D_MT_POSE_constraints)
1291 bpy.types.register(VIEW3D_MT_POSE_showhide)
1292
1293 bpy.types.register(VIEW3D_MT_snap) # Edit Menus
1294
1295 bpy.types.register(VIEW3D_MT_edit_MESH)
1296 bpy.types.register(VIEW3D_MT_edit_MESH_vertices)
1297 bpy.types.register(VIEW3D_MT_edit_MESH_edges)
1298 bpy.types.register(VIEW3D_MT_edit_MESH_faces)
1299 bpy.types.register(VIEW3D_MT_edit_MESH_normals)
1300 bpy.types.register(VIEW3D_MT_edit_MESH_showhide)
1301
1302 bpy.types.register(VIEW3D_MT_edit_CURVE)
1303 bpy.types.register(VIEW3D_MT_edit_CURVE_ctrlpoints)
1304 bpy.types.register(VIEW3D_MT_edit_CURVE_segments)
1305 bpy.types.register(VIEW3D_MT_edit_CURVE_showhide)
1306
1307 bpy.types.register(VIEW3D_MT_edit_SURFACE)
1308
1309 bpy.types.register(VIEW3D_MT_edit_TEXT)
1310 bpy.types.register(VIEW3D_MT_edit_TEXT_chars)
1311
1312 bpy.types.register(VIEW3D_MT_edit_META)
1313 bpy.types.register(VIEW3D_MT_edit_META_showhide)
1314
1315 bpy.types.register(VIEW3D_MT_edit_LATTICE)
1316
1317 bpy.types.register(VIEW3D_MT_edit_ARMATURE)
1318 bpy.types.register(VIEW3D_MT_edit_ARMATURE_parent)
1319 bpy.types.register(VIEW3D_MT_edit_ARMATURE_roll)
1320
1321 bpy.types.register(VIEW3D_PT_3dview_properties) # Panels
1322 bpy.types.register(VIEW3D_PT_3dview_display)
1323 bpy.types.register(VIEW3D_PT_3dview_meshdisplay)
1324 bpy.types.register(VIEW3D_PT_background_image)