diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 19:51:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-11 19:55:54 +0300 |
commit | 4e9d039ef70e7593160396b526745c7136cfb85d (patch) | |
tree | 0ce18e5475a48c266d9fcfe3926360111ffb4d79 /source/blender | |
parent | 9bf1868eaebc3bed10cc360f13f858e7b4321159 (diff) |
3D View: option not to draw center dots
While this is a fairly obscure option,
it means it's possible to disable all overlays except for any
overlays the users wants to see.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/modes/object_mode.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_view3d_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 7 |
3 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 2a6a7fae612..6c99024312c 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1975,6 +1975,10 @@ static void DRW_shgroup_relationship_lines(OBJECT_StorageList *stl, Object *ob) static void DRW_shgroup_object_center(OBJECT_StorageList *stl, Object *ob, ViewLayer *view_layer, View3D *v3d) { + if (v3d->overlay.flag & V3D_OVERLAY_HIDE_OBJECT_ORIGINS) { + return; + } + const bool is_library = ob->id.us > 1 || ID_IS_LINKED(ob); DRWShadingGroup *shgroup; diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h index 365fe125e83..e0ab3a744f1 100644 --- a/source/blender/makesdna/DNA_view3d_types.h +++ b/source/blender/makesdna/DNA_view3d_types.h @@ -388,6 +388,7 @@ enum { V3D_OVERLAY_ONION_SKINS = (1 << 7), V3D_OVERLAY_HIDE_BONES = (1 << 8), V3D_OVERLAY_HIDE_OBJECT_XTRAS = (1 << 9), + V3D_OVERLAY_HIDE_OBJECT_ORIGINS = (1 << 10), }; /* View3DOverlay->edit_flag */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index b24a9fbeffd..c3378a68884 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -2609,7 +2609,12 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna) "Show an outline highlight around selected objects in non-wireframe views"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); - prop = RNA_def_property(srna, "show_all_objects_origin", PROP_BOOLEAN, PROP_NONE); + prop = RNA_def_property(srna, "show_object_origins", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_HIDE_OBJECT_ORIGINS); + RNA_def_property_ui_text(prop, "Object Origins", "Show object center dots"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); + + prop = RNA_def_property(srna, "show_object_origins_all", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_DRAW_CENTERS); RNA_def_property_ui_text(prop, "All Object Origins", "Show the object origin center dot for all (selected and unselected) objects"); |