Skip to content

rllyy97/extra-import-hints

Repository files navigation

Extra Import Hints

A Godot plugin that adds extra import hints when importing blender assets.

Namely adds -rigidonly, -convrigidonly, and -trueconvcolonly import hints to expand options around physics bodies and collision shapes.

I have found these useful for separating blender objects into visual meshes and collision shapes without needing any extra steps after importing.

Extra Import Hints Screenshot

Added import hints

  • -rigidonly
    • Imports the object as a RigidBody3D, converting the mesh to a concave collision shape child.
    • Unlike Godot's -rigid, this does not add any visual mesh to the scene.
  • -convrigidonly
    • Similar to -rigidonly, but uses a convex collision shape instead.
  • -trueconvcolonly
    • Imports the object as a convex collision shape only
    • Unlike Godot's -convcol, this does not add a StaticBody3D node.
    • Useful as a child of another object to provide complex collision.

Installation

  1. Download the plugin to your project's addons/ directory

Intended Usage

  1. When working in Blender, add extra import hints to your objects' names
  2. When importing a Blender file, select the ExtraImportHints.gd script as the import script
  3. After importing, your objects will automatically be re-typed to the defined node types
  4. Any edits to the Blender file will be re-imported while retaining the node structure

Example Blender object compositions

Rigid body with seperate concave collision + mesh

  • shipping_container-convrigidonly (converted to rigidbody + collider)
    • mesh (visual mesh)

Rigid body with multiple colliders + mesh

  • mallet-rigidonly (converted to rigidbody, can be an empty node)
    • mesh (visual mesh)
    • handle_collider-trueconvcolonly (converted to conv collider)
    • head_collider-trueconvcolonly (converted to conv collider)

License

MIT License

Contact

https://github.com/rllyy97/

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published