From 18e4224142261cd8a1086c5872efb406b82f8330 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 13 Apr 2014 12:18:51 +0200 Subject: Split Normals I (1/5): basis for split normals (nearly nothing user-visible here): * Add a new calcLoopNormals function to DerivedMesh struct, and implement it for CDDM and CCGDM (subsurf). EditDerivedBMesh (edit mode DM) only gets a dummy one in this commit. * Add a tessellated version of CD_LOOPNORMAL layer (CD_TESSLOOPNORMAL), with relevant code to handle it (tessellation, rna access, etc.). * Change auto_smooth options of Mesh (angle now in radian internaly, and toggle is now used to enable/disable split normals in DM creation process). Note BI render code is not touched here, hence its behavior regarding this option is now incoherent, will be addressed in a separate commit. Reviewers: campbellbarton CC: brecht Differential Revision: https://developer.blender.org/D365 --- release/scripts/startup/bl_ui/space_view3d.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'release') diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index d43e6d1f697..56f612abe3a 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2760,6 +2760,15 @@ class VIEW3D_PT_view3d_name(Panel): row.label(text="", icon='BONE_DATA') row.prop(bone, "name", text="") + elif ob.type == 'MESH': + me = ob.data + row = layout.row() + row.prop(me, "use_auto_smooth") + row = row.row() + if not me.use_auto_smooth: + row.active = False + row.prop(me, "auto_smooth_angle", text="") + class VIEW3D_PT_view3d_display(Panel): bl_space_type = 'VIEW_3D' @@ -2936,14 +2945,14 @@ class VIEW3D_PT_view3d_meshdisplay(Panel): col.separator() col.label(text="Normals:") - row = col.row() + row = col.row(align=True) - sub = row.row(align=True) - sub.prop(mesh, "show_normal_vertex", text="", icon='VERTEXSEL') - sub.prop(mesh, "show_normal_face", text="", icon='FACESEL') + row.prop(mesh, "show_normal_vertex", text="", icon='VERTEXSEL') + row.prop(mesh, "show_normal_loop", text="", icon='VERTEXSEL') + row.prop(mesh, "show_normal_face", text="", icon='FACESEL') sub = row.row(align=True) - sub.active = mesh.show_normal_vertex or mesh.show_normal_face + sub.active = mesh.show_normal_vertex or mesh.show_normal_face or mesh.show_normal_loop sub.prop(context.scene.tool_settings, "normal_size", text="Size") col.separator() -- cgit v1.2.3