Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

Delete Bone

$
0
0

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
 


Viewing all articles
Browse latest Browse all 1036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>