I'm writing a custom import script for .dae scenes coming out of Blender, and I'm having some issues adding new nodes to anything other than the root node. Here is my example code:
func post_import( scene ):
# adding something to root node
var new_node = Spatial.new()
# adding something to child of root
var new_node2 = Node.new()
# adding something to grandchild of root
var new_node3 = Area.new()
The sample .dae coming from blender is a Cube named "Parent," with child Cone named "Child." It looks like this in Blender:
Only the first block, adding something to root, actually works. The other blocks just do nothing.
I also tried a few other things on different scene setups, like accessing multiple children of the scene root with scene.get_children() and iterating through to add new nodes to each one, but that also did nothing - no errors or anything.
I am using the Better Collada plugin for Blender, and Godot 2.1.3. The documentation on import scripts is a little sparse, can someone provide some direction on how to accomplish this? Can nodes only be added to the root node from an import script?
Thank you so much!