Hello,
I am trying to write a script to replicate the JointEditor side bar command ToolSetting>(rightclick)>Delete>Delete Bone.
I need a script since said command only works on one single bone even if I select multiple bones and even if I try to delete the upper parent (ie upper parent is deleted, but all children bones are still there)
I cameup with this, which executes fine (ie the selected bone is indeed removed), but when I switch from ScriptIDE to Viewport or when I try to re-export the FBX, DS crashes:
var startNode = Scene.getPrimarySelection() ;
if ( startNode ) {
Scene.removeNode(startNode);
}
I also tried replacing getPrimarySelection() with getSelectedNode(0), but nothing changes much
Any suggestions?
Thank you