Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/geometry/nodes/node_geo_boolean.cc
| Show First 20 Lines • Show All 77 Lines • ▼ Show 20 Lines | |||||
| #endif | #endif | ||||
| Vector<const Mesh *> meshes; | Vector<const Mesh *> meshes; | ||||
| Vector<const float4x4 *> transforms; | Vector<const float4x4 *> transforms; | ||||
| GeometrySet set_a; | GeometrySet set_a; | ||||
| if (operation == GEO_NODE_BOOLEAN_DIFFERENCE) { | if (operation == GEO_NODE_BOOLEAN_DIFFERENCE) { | ||||
| set_a = params.extract_input<GeometrySet>("Geometry 1"); | set_a = params.extract_input<GeometrySet>("Geometry 1"); | ||||
| if (set_a.has_instances()) { | |||||
| params.error_message_add( | |||||
| NodeWarningType::Info, | |||||
| TIP_("Instances are not supported for the first geometry input, and will not be used")); | |||||
| } | |||||
| /* Note that it technically wouldn't be necessary to realize the instances for the first | /* Note that it technically wouldn't be necessary to realize the instances for the first | ||||
| * geometry input, but the boolean code expects the first shape for the difference operation | * geometry input, but the boolean code expects the first shape for the difference operation | ||||
| * to be a single mesh. */ | * to be a single mesh. */ | ||||
| set_a = geometry_set_realize_instances(set_a); | |||||
| const Mesh *mesh_in_a = set_a.get_mesh_for_read(); | const Mesh *mesh_in_a = set_a.get_mesh_for_read(); | ||||
| if (mesh_in_a != nullptr) { | if (mesh_in_a != nullptr) { | ||||
| meshes.append(mesh_in_a); | meshes.append(mesh_in_a); | ||||
| transforms.append(nullptr); | transforms.append(nullptr); | ||||
| } | } | ||||
| } | } | ||||
| /* The instance transform matrices are owned by the instance group, so we have to | /* The instance transform matrices are owned by the instance group, so we have to | ||||
| Show All 37 Lines | |||||