From 88f2303cf8532784648f4f754081dc3d85faef76 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 17 Jun 2022 13:20:55 +0200 Subject: [PATCH] Only initialize points if necessary. --- modules/material_maker/nodes/sdf3d/sdf3d_shape_capsule.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/material_maker/nodes/sdf3d/sdf3d_shape_capsule.cpp b/modules/material_maker/nodes/sdf3d/sdf3d_shape_capsule.cpp index d06cc7eaa..4e6178128 100644 --- a/modules/material_maker/nodes/sdf3d/sdf3d_shape_capsule.cpp +++ b/modules/material_maker/nodes/sdf3d/sdf3d_shape_capsule.cpp @@ -129,7 +129,9 @@ MMSdf3dShapeCapsule::~MMSdf3dShapeCapsule() { void MMSdf3dShapeCapsule::_notification(int p_what) { if (p_what == NOTIFICATION_POSTINITIALIZE) { - init_points_11(); + if (points.size() == 0) { + init_points_11(); + } } }