Hi!
Im having trouble with a script. what im trying to do is to take in huge oil platforms, and merge them based on naming of parts.
and afterwards rename the final part to a name predefined in the script,
I encountered a new problem now
whenever the models does not contain that word im searching for, it just merges the entire root. there should probably be a if true statement here, but im a total noob in Pyton:eyes:
can you help with this as well?
Probably what is happening here is that your “findByProperty” is returning an empty array (nothing is found). And because of that, when this empty array is passed to “mergeParts” it will be interpreted as if you want to merge the root node.
So maybe a solution could be to check the size of your array and check that findProperty found at least one occurrence with that name before merging.