From 580d38336481bcd9a149bd2e2dc9f0faaf872f49 Mon Sep 17 00:00:00 2001 From: William Reynish Date: Sat, 22 Aug 2009 11:51:26 +0000 Subject: [PATCH] Moved mesh display options to the 3D view n-key area, next to other display options. The DNA/RNA for these options should be changed to reflect this. --- release/ui/buttons_data_mesh.py | 31 ----------------------------- release/ui/space_view3d.py | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/release/ui/buttons_data_mesh.py b/release/ui/buttons_data_mesh.py index c1311b32180..f91d706ead7 100644 --- a/release/ui/buttons_data_mesh.py +++ b/release/ui/buttons_data_mesh.py @@ -48,36 +48,6 @@ class DATA_PT_normals(DataButtonsPanel): col.itemR(mesh, "vertex_normal_flip") col.itemR(mesh, "double_sided") -class DATA_PT_meshdraw(DataButtonsPanel): - __label__ = "Draw" - - def draw(self, context): - layout = self.layout - - mesh = context.mesh - - layout.itemL(text="Edit Mode only, WIP") - - split = layout.split() - - col = split.column() - col.itemR(mesh, "draw_edges", text="Edges") - col.itemR(mesh, "draw_faces", text="Faces") - col.itemR(mesh, "draw_creases", text="Creases") - col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights") - col.itemR(mesh, "draw_seams", text="Seams") - col.itemR(mesh, "draw_sharp", text="Sharp") - - col = split.column() - col.itemR(mesh, "draw_normals", text="Face Normals") - col.itemR(mesh, "draw_vertex_normals", text="Vertex Normals") - - col.itemS() - - col.itemR(mesh, "draw_edge_lenght") - col.itemR(mesh, "draw_edge_angle") - col.itemR(mesh, "draw_face_area") - class DATA_PT_vertex_groups(DataButtonsPanel): __label__ = "Vertex Groups" @@ -227,7 +197,6 @@ class DATA_PT_vertex_colors(DataButtonsPanel): bpy.types.register(DATA_PT_context_mesh) bpy.types.register(DATA_PT_normals) -bpy.types.register(DATA_PT_meshdraw) bpy.types.register(DATA_PT_vertex_groups) bpy.types.register(DATA_PT_shape_keys) bpy.types.register(DATA_PT_uv_texture) diff --git a/release/ui/space_view3d.py b/release/ui/space_view3d.py index 8f37b34e3b4..8e5bc100af1 100644 --- a/release/ui/space_view3d.py +++ b/release/ui/space_view3d.py @@ -1032,6 +1032,40 @@ class VIEW3D_PT_3dview_display(bpy.types.Panel): col.itemR(view, "lock_rotation") col.itemR(view, "box_preview") col.itemR(view, "box_clip") + +class VIEW3D_PT_3dview_meshdisplay(bpy.types.Panel): + __space_type__ = 'VIEW_3D' + __region_type__ = 'UI' + __label__ = "Mesh Display" + + def poll(self, context): + editmesh = context.mode == 'EDIT_MESH' + return (editmesh) + + def draw(self, context): + layout = self.layout + + mesh = context.active_object.data + + col = layout.column() + col.itemL(text="Overlays:") + col.itemR(mesh, "draw_edges", text="Edges") + col.itemR(mesh, "draw_faces", text="Faces") + col.itemR(mesh, "draw_creases", text="Creases") + col.itemR(mesh, "draw_bevel_weights", text="Bevel Weights") + col.itemR(mesh, "draw_seams", text="Seams") + col.itemR(mesh, "draw_sharp", text="Sharp") + + col.itemS() + col.itemL(text="Normals:") + col.itemR(mesh, "draw_normals", text="Face") + col.itemR(mesh, "draw_vertex_normals", text="Vertex") + + col.itemS() + col.itemL(text="Numerics:") + col.itemR(mesh, "draw_edge_lenght") + col.itemR(mesh, "draw_edge_angle") + col.itemR(mesh, "draw_face_area") class VIEW3D_PT_background_image(bpy.types.Panel): __space_type__ = 'VIEW_3D' @@ -1129,4 +1163,5 @@ bpy.types.register(VIEW3D_MT_edit_ARMATURE_roll) bpy.types.register(VIEW3D_PT_3dview_properties) # Panels bpy.types.register(VIEW3D_PT_3dview_display) +bpy.types.register(VIEW3D_PT_3dview_meshdisplay) bpy.types.register(VIEW3D_PT_background_image) -- 2.28.0