Page MenuHome

With small units, cannot adjust Normals so well.
Closed, ArchivedPublic

Description

Set the units to Metric and scale to 0.001 (milimeters) on the properties toolbar (scene)
create a torus (well its worse on that) then go show the normals and adjust their size by dragging the arrows - even with the shift key it isnt good. Can the size of the normal lines be dependant on the size of the face, ie %. This way it wont go nutty and gives visual priority to the larger faces. (sorry this is a bit of an idea besides a bug).

By the way, how can i always enable normals?

Details

Type
Bug

Event Timeline

Charlie. (Charlieb000) raised the priority of this task from to Needs Triage by Developer.
Charlie. (Charlieb000) updated the task description. (Show Details)

Ah. it seems i cannot "always enable" but if i add things while in edit mode with the normals enabled beforehand then it will be created with normals enabled.

Normals are always enabled, the only thing you can control is their visualization in Edit mode. And adding in Edit mode means you add some geometry to current object, instead of adding a new object, this is not the same thing at all.

As for normals, I'll see whether it’s possible to set them from bbox dimensions, would make sense imho.

Bastien Montagne (mont29) lowered the priority of this task from Needs Triage by Developer to Normal.Aug 4 2014, 10:59 AM

For the record, here is a patch weighting normal size from global mesh's dimensions… Rejected for now though (can have bad effects in some corner cases too).

1diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
2index 8d39632..a4c0ef4 100644
3--- a/source/blender/editors/space_view3d/drawobject.c
4+++ b/source/blender/editors/space_view3d/drawobject.c
5@@ -2138,6 +2138,21 @@ static void drawSelectedVertices(DerivedMesh *dm, Mesh *me)
6 * logic!!!
7 */
8
9+static float compute_normal_size(Object *ob, Scene *scene)
10+{
11+ float min[3], max[3], mat[4][4];
12+
13+ INIT_MINMAX(min, max);
14+ BKE_object_minmax(ob, min, max, false);
15+ sub_v3_v3(max, min);
16+
17+ /* Bring back in global space. */
18+ invert_m4_m4(mat, ob->obmat);
19+ mul_mat3_m4_v3(mat, max);
20+
21+ return scene->toolsettings->normalsize * len_v3(max);
22+}
23+
24 static void calcDrawDMNormalScale(Object *ob, drawDMNormal_userData *data)
25 {
26 float obmat[3][3];
27@@ -2184,7 +2199,7 @@ static void draw_dm_face_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv
28 drawDMNormal_userData data;
29
30 data.bm = em->bm;
31- data.normalsize = scene->toolsettings->normalsize;
32+ data.normalsize = compute_normal_size(ob, scene);
33
34 calcDrawDMNormalScale(ob, &data);
35
36@@ -2249,7 +2264,7 @@ static void draw_dm_vert_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv
37 drawDMNormal_userData data;
38
39 data.bm = em->bm;
40- data.normalsize = scene->toolsettings->normalsize;
41+ data.normalsize = compute_normal_size(ob, scene);
42
43 calcDrawDMNormalScale(ob, &data);
44
45@@ -2643,7 +2658,7 @@ static void draw_dm_loop_normals(BMEditMesh *em, Scene *scene, Object *ob, Deriv
46 drawDMNormal_userData data;
47
48 data.bm = em->bm;
49- data.normalsize = scene->toolsettings->normalsize;
50+ data.normalsize = compute_normal_size(ob, scene);
51
52 calcDrawDMNormalScale(ob, &data);
53
54diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
55index 1c6d0fa..f2edf70 100644
56--- a/source/blender/makesrna/intern/rna_scene.c
57+++ b/source/blender/makesrna/intern/rna_scene.c
58@@ -1872,11 +1872,12 @@ static void rna_def_tool_settings(BlenderRNA *brna)
59 RNA_def_property_ui_text(prop, "Proportional Size", "Display size for proportional editing circle");
60 RNA_def_property_range(prop, 0.00001, 5000.0);
61
62- prop = RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_DISTANCE);
63+ prop = RNA_def_property(srna, "normal_size", PROP_FLOAT, PROP_FACTOR);
64 RNA_def_property_float_sdna(prop, NULL, "normalsize");
65- RNA_def_property_ui_text(prop, "Normal Size", "Display size for normals in the 3D view");
66- RNA_def_property_range(prop, 0.00001, 1000.0);
67- RNA_def_property_ui_range(prop, 0.01, 10.0, 10.0, 2);
68+ RNA_def_property_ui_text(prop, "Normal Size",
69+ "Display size for normals in the 3D view (proportional to global mesh's size)");
70+ RNA_def_property_range(prop, 0.001, 100.0);
71+ RNA_def_property_ui_range(prop, 0.01, 2.0, 1.0, 2);
72 RNA_def_property_update(prop, NC_GEOM | ND_DATA, NULL);
73
74 prop = RNA_def_property(srna, "double_threshold", PROP_FLOAT, PROP_DISTANCE);

Bastien Montagne (mont29) closed this task as Archived.Aug 4 2014, 5:47 PM

Closing this one for now - added the scene's scale/dimentional UI items issue to our TODO list.

Thanks for the report anyway.