The intent of this post is to show how helpful the post-processing function of the 3D import can be.
Here's the basic reference:
What you can't to with post-processing:
- You can't change much on the update-policy. Godot decides what objects are overwritten/recreated when re-importing updated models.
- You can't access any objects/data which the Godot import didn't import.
What you can do:
- You can add/remove and update any object of the imported 3d scene after the import was completed.
- You can use any other GDScript functions (write to files etc.)
- You can decide whether the import was successful or not.
This example deals with auto-creating collision box shapes for walls an other boxes.
It can auto-create shapes when the surface was assigned a specific material which name contains "-collide".
It can auto-create boxshapes inside other physics objects (-colonly and -rigid) when the box contains the name "-colbox".
It can initialize physics objects with specific values for i.e. layer & mask when the scene contains an object with "-preset" in its name.
This script is a kind of specialized. But perhaps it serves as an "inspiration" for you to create your own post-processing scripts.
Here's an example 3d-scene in Blender:
Note the material name "LockWall-collide" or the "#preset..." and "-rigid", "-colbox" objects in the object tree.
Here's the result after import + post-process in Godot:
The script is in the next post. (Post limit)