__init__.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. """
  2. This file provides the conversion for a single blend object into one or
  3. more godot nodes. All the converters should take as input arguments:
  4. - The ESCN file (so you can use add_internal_resource() method etc.)
  5. - The exporter config (so you can see what options the user selected)
  6. - The blender node to export
  7. - The parent Godot scene node of the node being processed
  8. All converters that convert nodes should return the node itself. All
  9. converters that convert resources should return the resource ID. Additional,
  10. converters for resources should have internal protection against importing
  11. twice
  12. One-function exporters are stored in simple_nodes. Others (such as meshes)
  13. are stored in individual files.
  14. """
  15. from .simple_nodes import * # pylint: disable=wildcard-import
  16. from .mesh import export_mesh_node
  17. from .physics import export_physics_properties
  18. from .armature import export_armature_node, export_bone_attachment
  19. from .animation import export_animation_data
  20. BLENDER_TYPE_TO_EXPORTER = {
  21. "MESH": export_mesh_node,
  22. "ARMATURE": export_armature_node,
  23. "CAMERA": export_camera_node,
  24. "LIGHT": export_light_node,
  25. "EMPTY": export_empty_node
  26. }
  27. BONE_ATTACHMENT_EXPORTER = export_bone_attachment
  28. ANIMATION_DATA_EXPORTER = export_animation_data