Fix #121548: Use evaluated object for local view
Object with deformations will have different boundbox, this fix made local view respect the deformation. Pull Request: https://projects.blender.org/blender/blender/pulls/121552
This commit is contained in:
@@ -859,7 +859,8 @@ static bool view3d_localview_init(const Depsgraph *depsgraph,
|
||||
base->local_view_bits &= ~local_view_bit;
|
||||
}
|
||||
FOREACH_BASE_IN_EDIT_MODE_BEGIN (scene, view_layer, v3d, base_iter) {
|
||||
BKE_object_minmax(base_iter->object, min, max);
|
||||
Object *ob_eval = DEG_get_evaluated_object(depsgraph, base_iter->object);
|
||||
BKE_object_minmax(ob_eval ? ob_eval : base_iter->object, min, max);
|
||||
base_iter->local_view_bits |= local_view_bit;
|
||||
ok = true;
|
||||
}
|
||||
@@ -869,7 +870,8 @@ static bool view3d_localview_init(const Depsgraph *depsgraph,
|
||||
BKE_view_layer_synced_ensure(scene, view_layer);
|
||||
LISTBASE_FOREACH (Base *, base, BKE_view_layer_object_bases_get(view_layer)) {
|
||||
if (BASE_SELECTED(v3d, base)) {
|
||||
BKE_object_minmax(base->object, min, max);
|
||||
Object *ob_eval = DEG_get_evaluated_object(depsgraph, base->object);
|
||||
BKE_object_minmax(ob_eval ? ob_eval : base->object, min, max);
|
||||
base->local_view_bits |= local_view_bit;
|
||||
ok = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user