diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-08-04 11:52:51 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-08-04 11:55:05 +0300 |
commit | cb67bfdba2e22d0ee967e50afe0912ac80d73e9b (patch) | |
tree | 73062214d0be9135b3b56a863a68d1732523daa5 /source/blender/makesrna | |
parent | 218df9941097bf973485ac343c070bdc6641a539 (diff) |
Viewport normal drawing with constant length
Patch for: T37878
{F10169694}
Reviewed By: fclem
Differential Revision: https://developer.blender.org/D11487
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 796e62c8b2a..c7a5c43255a 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -4363,6 +4363,21 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) RNA_def_property_float_default(prop, 0.02); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "normals_constant_screen_size", PROP_FLOAT, PROP_PIXEL); + RNA_def_property_float_sdna(prop, NULL, "overlay.normals_constant_screen_size"); + RNA_def_property_ui_text(prop, "Normal Screen Size", "Screen size for normals in the 3D view"); + RNA_def_property_range(prop, 0.0, 100000.0); + RNA_def_property_ui_range(prop, 1.0, 100.0, 50, 0); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + + prop = RNA_def_property(srna, "use_normals_constant_screen_size", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna( + prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_CONSTANT_SCREEN_SIZE_NORMALS); + RNA_def_property_ui_text(prop, + "Constant Screen Size Normals", + "Keep size of normals constant in relation to 3D view"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + prop = RNA_def_property(srna, "backwire_opacity", PROP_FLOAT, PROP_FACTOR); RNA_def_property_float_sdna(prop, NULL, "overlay.backwire_opacity"); RNA_def_property_ui_text(prop, "Backwire Opacity", "Opacity when rendering transparent wires"); |