godot-blender-exporter icon indicating copy to clipboard operation
godot-blender-exporter copied to clipboard

Exporting Godot Scene Instances and Meshes with Scripts

Open jackhumbert opened this issue 4 years ago • 1 comments

I made some quick changes that allow you to export Godot scene instances with empties named like Tree.tscn for doing some level design inside of Blender, and automatic association of scripts if the script custom property is set to something like Tree.gd on meshes (it's probably applicable to other types as well). You can see the changes on my branch here: https://github.com/godotengine/godot-blender-exporter/compare/master...jackhumbert:f/scenes_and_scripts

Is this something that would be useful? I'd love any feeback on it before opening a PR.

jackhumbert avatar Feb 11 '20 22:02 jackhumbert

@jackhumbert nice work, I would use this. Some thoughts:

  1. Should the custom property be named godot.script, to avoid colliding with other blender plugins? I'm also imagining we could use custom properties for more in the future, and could "namespace" them all with a godot prefix (godot.metadata would be cool in the future).
  2. I don't love the idea of searching the project directory. I feel like the result of the export should depend entirely on the state of the blender file, and a re-export shouldn't change because your godot project changed. That extra coupling seems like it could create difficult bugs. I was envisioning that "godot.script=Foo.gd" uses Foo.tscn in the export dir, or "godot.script=res://Foo/Bar.gd" uses a script at an absolute path. That being said, materials already work like this, so maybe we just go with the flow :shrug:
  3. If we do search the project directory, we should rename "Material Search Path" to "Resource Search Path" (or have separate settings, but that seems like overkill).

rcorre avatar Sep 07 '20 11:09 rcorre