Don't update CSG Shape when not inside tree

(cherry picked from commit 07042b4044)
This commit is contained in:
Haoyu Qiu 2021-09-14 08:38:30 +08:00 committed by Rémi Verschelde
parent 20b481f3f8
commit bdbd34b388
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -269,9 +269,9 @@ void CSGShape::mikktSetTSpaceDefault(const SMikkTSpaceContext *pContext, const f
}
void CSGShape::_update_shape() {
if (parent)
if (parent || !is_inside_tree()) {
return;
}
set_base(RID());
root_mesh.unref(); //byebye root mesh