UI: Deselect other objects when dragging into 3D View
When dragging an object into the 3D View, e.g. from the Outliner or the Asset Browser, other objects wouldn't get deselected. That differs from what other drop operations do, which create a new object. They deselect other objects in a lower-level function, which happens to not be called for just dropping objects. So I guess this is an oversight. Old behavior was also a bit annoying because users seem to expect this to deselect.
This commit is contained in:
@@ -3364,6 +3364,9 @@ static int object_add_named_exec(bContext *C, wmOperator *op)
|
||||
ED_view3d_cursor3d_position(C, mval, false, basen->object->loc);
|
||||
}
|
||||
|
||||
/* object_add_duplicate_internal() doesn't deselect other objects, unlike object_add_common() or
|
||||
* BKE_view_layer_base_deselect_all(). */
|
||||
ED_object_base_deselect_all(view_layer, NULL, BA_DESELECT);
|
||||
ED_object_base_select(basen, BA_SELECT);
|
||||
ED_object_base_activate(C, basen);
|
||||
|
||||
|
Reference in New Issue
Block a user