|
|
![]() |
![]() |
![]() |
|
|||||||||||||||||||
|
|
|
||||||||||||||||||||||
|
|
|||||||||||||||||||||||
Now press apply so save your operator. Leave the Edit Operator Type Properties open as we need it. The operator is now installed and you can create an instance: In your network press [TAB] rd ENTER ENTER and lay the new node down. Connect the resampleSOP to the input of the RDG Lorenz Attraktor and set update the display/render flag by clicking on the blue side of the node:
Now it's time to enter the code! Switch to the Code tab and enter this snippet:
This might cause some discussion. Jason Iversen kindly posted some different approaches to access parameters with python. But I couldn't follow ... Using some print statements and the incomplete documentation of this first public Houdini 9 beta I kind of reverse engineered the access. But maybe this is just my impression. hou.pwd() is the python version of oppwd() and returns the path to the current opperator,Now it is time to press Apply again. Free the view to your Scene Viewer and press [SPACE] - a to home on the attractor. It should look like this:
Play with the parameters to modify the attractor and find the valid value ranges. You can change these in the parameters tab of Edit Operator Type Properties. You can download a finished OTL and sample file via odforce. Conclusion This was just a quick start into modifying geometry with Python and the new Python Operator of Houdini 9. You can add icons, help like in any other digital asset and create some cool new SOPs. I have chosen the Lorenz Attractor because I really like it and wasn't able to create one with H8, though I realized some time ago that VEX would have been the way. Related Links Georg's Website: http://www.preset.de/ How install Houdini on Linux: Read Here
|
|||||||||||||||||||||||
|
|
|
||||||||||||||||||||||
|
|
Copyright © 2005-2007. All Rights Reserved | ||||||||||||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||