Merge branch 'blender-v2.82-release'
This commit is contained in:
commit
6c0eeb1569
|
@ -2254,6 +2254,10 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph,
|
|||
FOREACH_OBJECT_IN_MODE_END;
|
||||
}
|
||||
else {
|
||||
/* When selecting pose-bones in pose mode, check for visibility not select-ability
|
||||
* as pose-bones have their own selection restriction flag. */
|
||||
const bool use_pose_exception = (DST.draw_ctx.object_pose != NULL);
|
||||
|
||||
const int object_type_exclude_select = (v3d->object_type_exclude_viewport |
|
||||
v3d->object_type_exclude_select);
|
||||
bool filter_exclude = false;
|
||||
|
@ -2261,8 +2265,19 @@ void DRW_draw_select_loop(struct Depsgraph *depsgraph,
|
|||
if (!BKE_object_is_visible_in_viewport(v3d, ob)) {
|
||||
continue;
|
||||
}
|
||||
if ((ob->base_flag & BASE_SELECTABLE) &&
|
||||
(object_type_exclude_select & (1 << ob->type)) == 0) {
|
||||
|
||||
if (use_pose_exception && (ob->mode & OB_MODE_POSE)) {
|
||||
if ((ob->base_flag & BASE_VISIBLE_VIEWLAYER) == 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((ob->base_flag & BASE_SELECTABLE) == 0) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if ((object_type_exclude_select & (1 << ob->type)) == 0) {
|
||||
if (object_filter_fn != NULL) {
|
||||
if (ob->base_flag & BASE_FROM_DUPLI) {
|
||||
/* pass (use previous filter_exclude value) */
|
||||
|
|
|
@ -1785,7 +1785,13 @@ static int mixed_bones_object_selectbuffer_extended(ViewContext *vc,
|
|||
return hits;
|
||||
}
|
||||
|
||||
/* returns basact */
|
||||
/**
|
||||
* \param has_bones: When true, skip non-bone hits, also allow bases to be used
|
||||
* that are visible but not select-able,
|
||||
* since you may be in pose mode with an an unselect-able object.
|
||||
*
|
||||
* \return the active base or NULL.
|
||||
*/
|
||||
static Base *mouse_select_eval_buffer(ViewContext *vc,
|
||||
const uint *buffer,
|
||||
int hits,
|
||||
|
@ -1827,7 +1833,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc,
|
|||
|
||||
base = FIRSTBASE(view_layer);
|
||||
while (base) {
|
||||
if (BASE_SELECTABLE(v3d, base)) {
|
||||
if (has_bones ? BASE_VISIBLE(v3d, base) : BASE_SELECTABLE(v3d, base)) {
|
||||
if (base->object->runtime.select_id == selcol) {
|
||||
break;
|
||||
}
|
||||
|
@ -1844,7 +1850,8 @@ static Base *mouse_select_eval_buffer(ViewContext *vc,
|
|||
while (base) {
|
||||
/* skip objects with select restriction, to prevent prematurely ending this loop
|
||||
* with an un-selectable choice */
|
||||
if ((base->flag & BASE_SELECTABLE) == 0) {
|
||||
if (has_bones ? (base->flag & BASE_VISIBLE_VIEWLAYER) == 0 :
|
||||
(base->flag & BASE_SELECTABLE) == 0) {
|
||||
base = base->next;
|
||||
if (base == NULL) {
|
||||
base = FIRSTBASE(view_layer);
|
||||
|
@ -1854,7 +1861,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc,
|
|||
}
|
||||
}
|
||||
|
||||
if (BASE_SELECTABLE(v3d, base)) {
|
||||
if (has_bones ? BASE_VISIBLE(v3d, base) : BASE_SELECTABLE(v3d, base)) {
|
||||
for (a = 0; a < hits; a++) {
|
||||
if (has_bones) {
|
||||
/* skip non-bone objects */
|
||||
|
|
Loading…
Reference in New Issue