bone_map property not available to post import scripts
You cannot load a bone_map with import scripts. :ref:class_bonemap is not accessible outside of the UI. In order to map the bones with an import script, you must load the bone map file into an array and assign the bones one at a time.
The reason for adding this note is a LOT of time was wasted trying to find a way to do this, and it cannot be done. This should be noted at the ONE AND ONLY reference to the bone_map property in the documentation. I added the means to get the job accomplished, albiet it is an arduous means to and end.
I will be submitting a similar PR for the BoneMap class docs, that the BoneMap.profile property cannot be set from script.
Sorry but I simply don't understand.
is there a MRP or issue that shows what doesn't work, or can you share an example of a script that should have worked in your mind, but doesn't
what does "outside of the UI" mean?
also, what does class_bonemap mean? The BoneMap class should be accessible to scripts.
You cannot set the bone_map property from an import script, it's as simple as that.
@tool # Needed so it runs in editor. extends EditorScenePostImport func _post_import(scene): var bone_map = load("res://explosive_bone_map.tres") skeleton = scene.get_node("Armature/Skeleton3D") skeleton.bone_map = bone_map