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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-05 11:45:15 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-05-05 16:54:36 +0300
commit2094b454474de25e42cd6ec1f63ebc84f50f666a (patch)
tree91331e81b3cef843fa29dfd3883ca60f36b06b30 /source/blender/draw/modes/overlay_mode.c
parent1983eea98ef73e6fe4c9bd187944d122dc1c7b07 (diff)
3D Viewport: make shading and overlay DNA match UI names.
We should use consistent naming between the internal code and UI whenever possible, only reason not to is file compatibility.
Diffstat (limited to 'source/blender/draw/modes/overlay_mode.c')
-rw-r--r--source/blender/draw/modes/overlay_mode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/draw/modes/overlay_mode.c b/source/blender/draw/modes/overlay_mode.c
index 3c31001d4b7..e2b381347ff 100644
--- a/source/blender/draw/modes/overlay_mode.c
+++ b/source/blender/draw/modes/overlay_mode.c
@@ -49,7 +49,7 @@ typedef struct OVERLAY_Data {
typedef struct OVERLAY_PrivateData {
DRWShadingGroup *face_orientation_shgrp;
- int overlays;
+ View3DOverlay overlay;
} OVERLAY_PrivateData; /* Transient data */
/* *********** STATIC *********** */
@@ -90,14 +90,14 @@ static void overlay_cache_init(void *vedata)
View3D *v3d = DCS->v3d;
if (v3d) {
- stl->g_data->overlays = v3d->overlays;
+ stl->g_data->overlay = v3d->overlay;
}
else {
- stl->g_data->overlays = 0;
+ memset(&stl->g_data->overlay, 0, sizeof(stl->g_data->overlay));
}
/* Face Orientation Pass */
- if (stl->g_data->overlays & V3D_OVERLAY_FACE_ORIENTATION) {
+ if (stl->g_data->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) {
int state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL | DRW_STATE_BLEND;
psl->face_orientation_pass = DRW_pass_create("Face Orientation", state);
stl->g_data->face_orientation_shgrp = DRW_shgroup_create(e_data.face_orientation_sh, psl->face_orientation_pass);
@@ -116,7 +116,7 @@ static void overlay_cache_populate(void *vedata, Object *ob)
struct Gwn_Batch *geom = DRW_cache_object_surface_get(ob);
if (geom) {
/* Face Orientation */
- if (stl->g_data->overlays & V3D_OVERLAY_FACE_ORIENTATION) {
+ if (stl->g_data->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) {
DRW_shgroup_call_add(pd->face_orientation_shgrp, geom, ob->obmat);
}
}
@@ -133,7 +133,7 @@ static void overlay_draw_scene(void *vedata)
OVERLAY_StorageList *stl = data->stl;
OVERLAY_PrivateData *pd = stl->g_data;
- if (pd->overlays & V3D_OVERLAY_FACE_ORIENTATION) {
+ if (pd->overlay.flag & V3D_OVERLAY_FACE_ORIENTATION) {
DRW_draw_pass(psl->face_orientation_pass);
}
}