[TOOL] WIP Blender script to add collision information automatically

@HeadClot, you’re welcome.

@HostileEnvironment when you refer to simplifying the mesh, what exactly are you seeking?

The script will:

  • remove the full stop from previously duplicated names
  • Smart Project Unwrap each item (calculate UVs)
  • Duplicates all selected objects then…
  • runs through a loop and finds the duplicated items with “.001, .002, .003 etc” and renames these
    objects to be collision objects starting with “UCX_”. It will also put the collision volumes on Layer 2.

I have not attempted to change the underlying geometry. If you are thinking of a feature where the a small complex mesh is replaced by a single collision volume then I think I would implement this as a manual over-ride. e.g. if you set a flag, place geometry on a specific layer, start the name with a postfix then that geometry will be ignored, or something like that.

I don’t think automatically calculating the complexity of a volume and replacing it with a cube is going to produce a good result but it you have specific rules/triggers in mind then feel free to write them up here and I can comment on them.