Introduction
when i work with mcjAutoLimb2015 i often need to unparent the "pole vectors" from the thighs or the collarbones
i want them to stay exactly where they are before the unparenting
Daz Studio does have "parent in place" options you can turn on/off but i somehow often cant get it to work
this script notes the position and orientation of the selected node ( World-space )
it unparents the node
it deletes all the position and rotation keyframes
it keyframes the saved position/orientation at frame 0 for the now-unparented node
History
august 17th 2016 7 am Release
Installation
The zip package is found at the bottom of this page
unzip it in your daz content folder,
typically :
C:\Users\USERNAME\Documents\DAZ 3D\Studio\My Library
once installed, it will appear in your content library, under
My Library / Scripts / mcasual
Starting with Windows 7 if you right click on the downloaded zip file
and select the [Extract All ....] pop-up menu item
you simply browse up to your Daz Studio Content Folder
and the files will fall in the proper folder
Use
select the node to be unparented
run the script
you can undo this action
The source code
var node = Scene.getPrimarySelection() if( node ) { var pa = node.getNodeParent(); if( pa ) { beginUndo(); var p = node.getWSPos(); var r = node.getWSRot(); pa.removeNodeChild( node, false ); node.getXRotControl().deleteAllKeys(); node.getYRotControl().deleteAllKeys(); node.getZRotControl().deleteAllKeys(); node.getXPosControl().deleteAllKeys(); node.getYPosControl().deleteAllKeys(); node.getZPosControl().deleteAllKeys(); node.setWSPos( p ); node.setWSRot( r ); acceptUndo( "mcjUnparent" ); } }
License
Public