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