diff options
Diffstat (limited to 'source/blender/editors')
5 files changed, 21 insertions, 19 deletions
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c index 8db1cb7d6c0..17dc8eac38c 100644 --- a/source/blender/editors/armature/armature_select.c +++ b/source/blender/editors/armature/armature_select.c @@ -98,7 +98,7 @@ void *get_bone_from_selectbuffer( /* Determine what the current bone is */ if (obedit == NULL || base->object != obedit) { /* no singular posemode, so check for correct object */ - if (base->selcol == (hitresult & 0xFFFF)) { + if (base->object->select_color == (hitresult & 0xFFFF)) { bone = get_indexed_bone(base->object, hitresult); if (findunsel) diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 621c217fd89..2152d67e447 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -2001,7 +2001,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion * /* if solid we draw that first, with selection codes, but without names, axes etc */ if (dt > OB_WIRE) { if (arm->flag & ARM_POSEMODE) - index = base->selcol; + index = base->object->select_color; for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { bone = pchan->bone; @@ -2104,7 +2104,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion * (draw_wire || (dt <= OB_WIRE)) ) { if (arm->flag & ARM_POSEMODE) - index = base->selcol; + index = base->object->select_color; /* only draw custom bone shapes that need to be drawn as wires */ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { @@ -2175,7 +2175,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion * /* draw line check first. we do selection indices */ if (ELEM(arm->drawtype, ARM_LINE, ARM_WIRE)) { if (arm->flag & ARM_POSEMODE) - index = base->selcol; + index = base->object->select_color; } /* if solid && posemode, we draw again with polygonoffset */ else if ((dt > OB_WIRE) && (arm->flag & ARM_POSEMODE)) { @@ -2184,7 +2184,7 @@ static void draw_pose_bones(Scene *scene, SceneLayer *sl, View3D *v3d, ARegion * else { /* and we use selection indices if not done yet */ if (arm->flag & ARM_POSEMODE) - index = base->selcol; + index = base->object->select_color; } if (is_cull_enabled == false) { diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 7bb95ba6d15..a86614c52fd 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -1727,7 +1727,7 @@ static void draw_viewport_object_reconstruction( continue; if (dflag & DRAW_PICKING) - GPU_select_load_id(base->selcol + (tracknr << 16)); + GPU_select_load_id(base->object->select_color + (tracknr << 16)); gpuPushMatrix(); gpuTranslate3fv(track->bundle_pos); @@ -1889,7 +1889,7 @@ static void draw_viewport_reconstruction( GPU_basic_shader_bind(GPU_SHADER_USE_COLOR); if (dflag & DRAW_PICKING) - GPU_select_load_id(base->selcol); + GPU_select_load_id(base->object->select_color); } /* camera frame */ diff --git a/source/blender/editors/space_view3d/view3d_draw_legacy.c b/source/blender/editors/space_view3d/view3d_draw_legacy.c index a27c5df9128..4c15a291c9c 100644 --- a/source/blender/editors/space_view3d/view3d_draw_legacy.c +++ b/source/blender/editors/space_view3d/view3d_draw_legacy.c @@ -914,7 +914,7 @@ static void view3d_draw_xray_select(Scene *scene, SceneLayer *sl, ARegion *ar, V v3d->xray = true; while ((v3da = BLI_pophead(&v3d->afterdraw_xray))) { - if (GPU_select_load_id(v3da->base->selcol)) { + if (GPU_select_load_id(v3da->base->object->select_color)) { draw_object_select(scene, sl, ar, v3d, v3da->base, v3da->dflag); } MEM_freeN(v3da); @@ -1301,10 +1301,10 @@ void ED_view3d_draw_select_loop( if (((base->flag & BASE_SELECTABLED) == 0) || (use_obedit_skip && (scene->obedit->data == base->object->data))) { - base->selcol = 0; + base->object->select_color = 0; } else { - base->selcol = code; + base->object->select_color = code; if (use_nearest && (base->object->dtx & OB_DRAWXRAY)) { ED_view3d_after_add(&v3d->afterdraw_xray, base, dflag); diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 770e4050fd9..049c0367ce6 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -906,7 +906,7 @@ static unsigned int samplerect(unsigned int *buf, int size, unsigned int dontdo) base = LASTBASE; if (base == 0) return 0; - maxob = base->selcol; + maxob = base->object->select_color; len = (size - 1) / 2; rc = 0; @@ -1068,7 +1068,7 @@ static Base *object_mouse_select_menu( bool ok; LinkNode *linklist = NULL; - /* handle base->selcol */ + /* handle base->object->select_color */ CTX_DATA_BEGIN (C, Base *, base, selectable_bases) { ok = false; @@ -1077,7 +1077,7 @@ static Base *object_mouse_select_menu( if (buffer) { for (int a = 0; a < hits; a++) { /* index was converted */ - if (base->selcol == (buffer[(4 * a) + 3] & ~0xFFFF0000)) { + if (base->object->select_color == (buffer[(4 * a) + 3] & ~0xFFFF0000)) { ok = true; break; } @@ -1286,7 +1286,9 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int } else { /* only exclude active object when it is selected... */ - if (BASACT_NEW && (BASACT_NEW->flag & BASE_SELECTED) && hits > 1) notcol = BASACT_NEW->selcol; + if (BASACT_NEW && (BASACT_NEW->flag & BASE_SELECTED) && hits > 1) { + notcol = BASACT_NEW->object->select_color; + } for (a = 0; a < hits; a++) { if (min > buffer[4 * a + 1] && notcol != (buffer[4 * a + 3] & 0xFFFF)) { @@ -1299,7 +1301,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int base = FIRSTBASE_NEW; while (base) { if (BASE_SELECTABLE_NEW(base)) { - if (base->selcol == selcol) break; + if (base->object->select_color == selcol) break; } base = base->next; } @@ -1322,12 +1324,12 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int if (has_bones) { /* skip non-bone objects */ if ((buffer[4 * a + 3] & 0xFFFF0000)) { - if (base->selcol == (buffer[(4 * a) + 3] & 0xFFFF)) + if (base->object->select_color == (buffer[(4 * a) + 3] & 0xFFFF)) basact = base; } } else { - if (base->selcol == (buffer[(4 * a) + 3] & 0xFFFF)) + if (base->object->select_color == (buffer[(4 * a) + 3] & 0xFFFF)) basact = base; } } @@ -1481,7 +1483,7 @@ static bool ed_object_select_pick( /* if there's bundles in buffer select bundles first, * so non-camera elements should be ignored in buffer */ - if (basact->selcol != (hitresult & 0xFFFF)) { + if (basact->object->select_color != (hitresult & 0xFFFF)) { continue; } @@ -2071,7 +2073,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b */ for (base = vc->scene_layer->object_bases.first; base && hits; base = base->next) { if (BASE_SELECTABLE_NEW(base)) { - while (base->selcol == (*col & 0xFFFF)) { /* we got an object */ + while (base->object->select_color == (*col & 0xFFFF)) { /* we got an object */ if (*col & 0xFFFF0000) { /* we got a bone */ bone = get_indexed_bone(base->object, *col & ~(BONESEL_ANY)); if (bone) { |