Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-11-23 05:46:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-23 05:48:21 +0300
commitd56c0a0a6affcdfd7335c5fce1892a82f23bdf37 (patch)
tree62149f583492ef6a9c4ee4aebe3da1cfb830ffaa /source/blender
parent3fdcd2293eadc277bc02297d4688a66f0456613b (diff)
Cleanup: rename bone-select to xray
This shows bones in font and uses the xray toggle binding. Also 'bone select' isn't very meaningful on it's own.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/intern/screen.c2
-rw-r--r--source/blender/blenloader/intern/versioning_280.c6
-rw-r--r--source/blender/draw/engines/gpencil/gpencil_draw_utils.c2
-rw-r--r--source/blender/draw/intern/DRW_render.h2
-rw-r--r--source/blender/draw/modes/pose_mode.c2
-rw-r--r--source/blender/editors/include/ED_view3d.h2
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c2
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_space.c10
10 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c
index 84962e9b03f..0c93281bf84 100644
--- a/source/blender/blenkernel/intern/screen.c
+++ b/source/blender/blenkernel/intern/screen.c
@@ -787,7 +787,7 @@ void BKE_screen_view3d_shading_init(View3DShading *shading)
shading->type = OB_SOLID;
shading->prev_type = OB_SOLID;
- shading->flag = V3D_SHADING_SPECULAR_HIGHLIGHT | V3D_SHADING_XRAY_WIREFRAME;
+ shading->flag = V3D_SHADING_SPECULAR_HIGHLIGHT | V3D_SHADING_XRAY_BONE;
shading->light = V3D_LIGHTING_STUDIO;
shading->shadow_intensity = 0.5f;
shading->xray_alpha = 0.5f;
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index a28b4ae7784..d0e791fc1d6 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -1727,13 +1727,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
}
}
}
- if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "bone_select_alpha")) {
+ if (!DNA_struct_elem_find(fd->filesdna, "View3DOverlay", "float", "xray_alpha_bone")) {
for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_VIEW3D) {
View3D *v3d = (View3D *)sl;
- v3d->overlay.bone_select_alpha = 0.5f;
+ v3d->overlay.xray_alpha_bone = 0.5f;
}
}
}
@@ -2152,7 +2152,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_VIEW3D) {
View3D *v3d = (View3D *)sl;
- v3d->shading.flag |= V3D_SHADING_XRAY_WIREFRAME;
+ v3d->shading.flag |= V3D_SHADING_XRAY_BONE;
}
}
}
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index 40b6a4e5b2b..c8b70953f87 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -1508,7 +1508,7 @@ void DRW_gpencil_populate_datablock(
if ((draw_ctx->obact) && (draw_ctx->object_mode == OB_MODE_POSE) &&
(v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT))
{
- opacity = opacity * v3d->overlay.bone_select_alpha;
+ opacity = opacity * v3d->overlay.xray_alpha_bone;
}
/* fade no active layers */
if ((overlay) && (draw_ctx->object_mode == OB_MODE_GPENCIL_PAINT) &&
diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h
index 9bf3ce15166..faba85c9b46 100644
--- a/source/blender/draw/intern/DRW_render.h
+++ b/source/blender/draw/intern/DRW_render.h
@@ -592,7 +592,7 @@ typedef struct DRWContextState {
const DRWContextState *DRW_context_state_get(void);
#define XRAY_ALPHA(v3d) (((v3d)->shading.type == OB_WIRE) ? (v3d)->shading.xray_alpha_wire : (v3d)->shading.xray_alpha)
-#define XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY)
+#define XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_BONE : V3D_SHADING_XRAY)
#define XRAY_ENABLED(v3d) ((((v3d)->shading.flag & XRAY_FLAG(v3d)) != 0) && (XRAY_ALPHA(v3d) < 1.0f))
#endif /* __DRW_RENDER_H__ */
diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c
index 81466f19128..3c0a8048c9e 100644
--- a/source/blender/draw/modes/pose_mode.c
+++ b/source/blender/draw/modes/pose_mode.c
@@ -147,7 +147,7 @@ static void POSE_cache_init(void *vedata)
{
if (POSE_is_bone_selection_overlay_active()) {
- const float alpha = (draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) ? 0.0f : v3d->overlay.bone_select_alpha;
+ const float alpha = (draw_ctx->object_mode & OB_MODE_WEIGHT_PAINT) ? 0.0f : v3d->overlay.xray_alpha_bone;
copy_v4_fl4(ppd->blend_color, 0.0f, 0.0f, 0.0f, alpha);
copy_v4_fl4(ppd->blend_color_invert, 0.0f, 0.0f, 0.0f, pow(alpha, 4));
DRWShadingGroup *grp;
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 78b51dad8d1..cdbef05a34b 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -544,7 +544,7 @@ void ED_view3d_operator_properties_viewmat_get(struct wmOperator *op, int *winx,
void ED_view3d_stop_render_preview(struct wmWindowManager *wm, struct ARegion *ar);
void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrArea *sa);
-#define V3D_XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_WIREFRAME : V3D_SHADING_XRAY)
+#define V3D_XRAY_FLAG(v3d) (((v3d)->shading.type == OB_WIRE) ? V3D_SHADING_XRAY_BONE : V3D_SHADING_XRAY)
#define V3D_IS_ZBUF(v3d) (((v3d)->shading.flag & V3D_XRAY_FLAG(v3d)) == 0)
void ED_view3d_id_remap(struct View3D *v3d, const struct ID *old_id, struct ID *new_id);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 91b13e1ac87..0e8e5e1ee22 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -325,7 +325,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
BKE_screen_view3d_shading_init(&v3d->shading);
v3d->overlay.wireframe_threshold = 0.5f;
- v3d->overlay.bone_select_alpha = 0.5f;
+ v3d->overlay.xray_alpha_bone = 0.5f;
v3d->overlay.texture_paint_mode_opacity = 0.8;
v3d->overlay.weight_paint_mode_opacity = 1.0f;
v3d->overlay.vertex_paint_mode_opacity = 0.8;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index c94aab1a3c1..5f0ce77703d 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -4942,7 +4942,7 @@ static int toggle_xray_exec(bContext *C, wmOperator *op)
ELEM(v3d->shading.type, OB_WIRE, OB_SOLID));
if (v3d->shading.type == OB_WIRE) {
- v3d->shading.flag ^= V3D_SHADING_XRAY_WIREFRAME;
+ v3d->shading.flag ^= V3D_SHADING_XRAY_BONE;
}
else {
v3d->shading.flag ^= V3D_SHADING_XRAY;
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index d0880b0af9a..30b3f0ba688 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -188,7 +188,7 @@ typedef struct View3DOverlay {
/* Armature edit/pose mode settings */
int arm_flag;
- float bone_select_alpha;
+ float xray_alpha_bone;
/* Other settings */
float wireframe_threshold;
@@ -389,7 +389,7 @@ enum {
V3D_SHADING_CAVITY = (1 << 5),
V3D_SHADING_MATCAP_FLIP_X = (1 << 6),
V3D_SHADING_SCENE_WORLD = (1 << 7),
- V3D_SHADING_XRAY_WIREFRAME = (1 << 8),
+ V3D_SHADING_XRAY_BONE = (1 << 8),
};
/* View3DShading->color_type */
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index ee00d897530..774fbe1f7ba 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -2550,7 +2550,7 @@ static void rna_def_space_view3d_shading(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_xray_wireframe", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SHADING_XRAY_WIREFRAME);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", V3D_SHADING_XRAY_BONE);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Show X-Ray", "Show whole scene transparent");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
@@ -2733,14 +2733,14 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Face Orientation", "Show the Face Orientation Overlay");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
- prop = RNA_def_property(srna, "show_bone_select", PROP_BOOLEAN, PROP_NONE);
+ prop = RNA_def_property(srna, "show_xray_bone", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", V3D_OVERLAY_BONE_SELECT);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Bone Selection", "Show the Bone Selection Overlay");
+ RNA_def_property_ui_text(prop, "Show Bone X-Ray", "Show the bone selection overlay");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");
- prop = RNA_def_property(srna, "bone_select_alpha", PROP_FLOAT, PROP_FACTOR);
- RNA_def_property_float_sdna(prop, NULL, "overlay.bone_select_alpha");
+ prop = RNA_def_property(srna, "xray_alpha_bone", PROP_FLOAT, PROP_FACTOR);
+ RNA_def_property_float_sdna(prop, NULL, "overlay.xray_alpha_bone");
RNA_def_property_float_default(prop, 0.5f);
RNA_def_property_ui_text(prop, "Opacity", "Opacity to use for bone selection");
RNA_def_property_range(prop, 0.0f, 1.0f);