varomix Posted March 26, 2008 Share Posted March 26, 2008 Hi Maybe this been asked before but I could not find anything. Is it posible to echo commands like in maya's script editor, you know, you click on create sphere and in the script editor show the MEL commands that generate the sphere. If this is not possible, how can I find out the commands for example, of the move tool, rotate tool, etc this might be very simple but I can't find it thank you varomix Quote Link to comment Share on other sites More sharing options...
Alanw Posted March 26, 2008 Share Posted March 26, 2008 (edited) HiMaybe this been asked before but I could not find anything. Is it posible to echo commands like in maya's script editor, you know, you click on create sphere and in the script editor show the MEL commands that generate the sphere. If this is not possible, how can I find out the commands for example, of the move tool, rotate tool, etc this might be very simple but I can't find it thank you varomix Depending on whether you need Hscript or Python there are different ways to do this. Search the help for "opscript" or type "help opscript" in the hscript text pane and that should get you on your way. The Python replacements for opscript are listed at the bottom in the help pane. ex. >>> print hou.node("/obj/geo1/xform1").asCode() For example. this is the output of opscript for the transform node in a simple network (Hscript) / -> opscript -r /obj/geo1/xform* # Node xform1 (Sop/xform) opadd -n xform xform1 oplocate -x -2.06564 -y -1.46078 xform1 opspareds "" xform1 opparm xform1 group ( "" ) grouptype ( guess ) xOrd ( srt ) rOrd ( xyz ) t ( 0 0 0 ) r ( 0 0 0 ) s ( 1 1 1 ) shear ( 0 0 0 ) p ( 0 0 0 ) scale ( 1 ) updatenmls ( on ) vlength ( on ) invertxform ( off ) chlock xform1 -* chautoscope xform1 -* opcolor -c 0.8 0.8 0.8 xform1 opset -d on -r on -h off -f off -y off -t off -l off -s off -u off -c off -e on -b off xform1 opexprlanguage -s hscript xform1 oporder -e box1 xform1 opcf .. There are some cool possibilities with this stuff. I think opscript will even output a text file for you, which you could then use as a .cmd file that another program uses to generate geometry on the fly, etc. Edited March 26, 2008 by Alanw Quote Link to comment Share on other sites More sharing options...
varomix Posted March 26, 2008 Author Share Posted March 26, 2008 Thanks a lot Alanw I'm starting to SEE now, I'm used to do all this stuff in maya MEL, but I really need to get this houdini codding going on thaks a lot again varomix Quote Link to comment Share on other sites More sharing options...
sibarrick Posted March 26, 2008 Share Posted March 26, 2008 The fundamental difference in houdini is you build a network how you want it first then use opscript to see what script commands to use to recreate it. This gives you only the commands needed and no other stuff that might have been disgarded during working. Having said that if you start building otls there are very few times these days when you need to script anything out, so make sure you actually need to write a script before doing so... 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.