Lyonz Posted August 27, 2012 Share Posted August 27, 2012 Hey All, Wondering is it possible to convert channel referenced animation to keyframes ? As i am driving a fan in dops by referencing animation created in sops but is not updating the position when simulating. Cheers Lyonz Quote Link to comment Share on other sites More sharing options...
ryoji Posted August 27, 2012 Share Posted August 27, 2012 (edited) Hi Lyonz, I have had a same problem then I made a script. Just put this in new shelf tool then push the button sel = hou.selectedNodes() parms = sel[0].parms() keyedParmList = [] parmNames = [] for i in parms: if i.isTimeDependent() == 1: keyedParmList.append(i) parmNames.append(i.description() + "(" + i.name() + ")") bakes = hou.ui.selectFromList(parmNames, message='Select Parms to bake key') framerange = range(int(hou.expandString('$RFSTART')), int(hou.expandString('$RFEND')) + 1 ) for i in bakes: keyVals = {} for kf in framerange: keyVals[kf] = keyedParmList[i].evalAtFrame(kf) keyedParmList[i].deleteAllKeyframes() for kf in framerange: setKey = hou.Keyframe() setKey.setFrame(kf) setKey.setValue( keyVals[kf] ) keyedParmList[i].setKeyframe(setKey) Thanks, Ryoji Edited August 27, 2012 by ryoji 1 Quote Link to comment Share on other sites More sharing options...
Lyonz Posted August 27, 2012 Author Share Posted August 27, 2012 Hi Lyonz, I have had a same problem then I made a script. Just put this in new shelf tool then push the button sel = hou.selectedNodes() parms = sel[0].parms() keyedParmList = [] parmNames = [] for i in parms: if i.isTimeDependent() == 1: keyedParmList.append(i) parmNames.append(i.description() + "(" + i.name() + ")") bakes = hou.ui.selectFromList(parmNames, message='Select Parms to bake key') framerange = range(int(hou.expandString('$RFSTART')), int(hou.expandString('$RFEND')) + 1 ) for i in bakes: keyVals = {} for kf in framerange: keyVals[kf] = keyedParmList[i].evalAtFrame(kf) keyedParmList[i].deleteAllKeyframes() for kf in framerange: setKey = hou.Keyframe() setKey.setFrame(kf) setKey.setValue( keyVals[kf] ) keyedParmList[i].setKeyframe(setKey) Thanks, Ryoji Cheers really appreciate it will test it out soon Lyonz Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted August 28, 2012 Share Posted August 28, 2012 Hey All, Wondering is it possible to convert channel referenced animation to keyframes ? As i am driving a fan in dops by referencing animation created in sops but is not updating the position when simulating. Cheers Lyonz I'm pretty sure, there is another, more procedural way of doing this. Try to figure out, why dops didn't updates correctly. Perhaps "Set Always" should be set on some data.... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.