Dejo1974 Posted September 15, 2013 Share Posted September 15, 2013 Well I'm a total begginer in Python and Houdin, how do I get output distance value from hou.node('/obj/KIN_Chops/Measure_Distance_L_Hand'), and assign it to a variable let's say "A" ? I can see it when I MMB hower over the node it reads 54. 99476. I dragged&dropped the node to the python shell but I can't see it in the .attribute listing... or am I doing this completely wrong? Quote Link to comment Share on other sites More sharing options...
dedeks3000 Posted September 17, 2013 Share Posted September 17, 2013 Hye Dejo1974, I think you must write : A = hou.hscriptExpression('chop("/obj/KIN_Chops/Node_Name/Channel_Name")') Quote Link to comment Share on other sites More sharing options...
graham Posted September 17, 2013 Share Posted September 17, 2013 If you look at the help for chop() you'll see how you can access the same data through HOM: > exhelp chop float chop (string channel) REPLACED BY hou.ChopNode hou.Track value = hou.node('/obj/chopnet1/mynode').track("chan1").eval() Quote Link to comment Share on other sites More sharing options...
Dejo1974 Posted September 17, 2013 Author Share Posted September 17, 2013 Thanks a lot! So you must navigate it to a channel's track and order evaluation? The bottom line of what I'm trying to get is let's say A=54. 99476... Quote Link to comment Share on other sites More sharing options...
Dejo1974 Posted April 25, 2014 Author Share Posted April 25, 2014 (edited) Sorry guys... maybe I'm too stupid to crack this...but this doesn't work... sorry for a late reply also, and rising this topic out of the dead... I'm getting something like "this node has no track attribute" error... Edited April 25, 2014 by Dejo1974 Quote Link to comment Share on other sites More sharing options...
Dejo1974 Posted April 25, 2014 Author Share Posted April 25, 2014 (edited) GOT IT!!! As it usually happens... after days of pulling my hair... it turns out that I should first assign the object node from the chopnet i.e. hou.node('/obj/KIN_Chops/object1') TO the hou.chopnode i.e. hou.chopnode = hou.node('/obj/KIN_Chops/object1') THEN call the hou.track class with the name of the track as the tuple (double quotes) i.e. hou.chopnode.track("dist") and the last step was to call .eval() i.e. hou.chopnode.track("dist").eval() and it spits out the distance... with this many doors open... next question is should this be setted to evaluate per frame (will it slow down the rig) or per time range basis? And the people say there is no hiearchy in programming... Edited April 25, 2014 by Dejo1974 Quote Link to comment Share on other sites More sharing options...
Dejo1974 Posted April 28, 2014 Author Share Posted April 28, 2014 Now, the next question arises, how to evaluate multiple tracks at once? "For" loop inside node's tracks? Is that even possible? Quote Link to comment Share on other sites More sharing options...
Dejo1974 Posted May 1, 2014 Author Share Posted May 1, 2014 No one? Nothing? Bump? Bump? 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.