Search - User list
Full Version: script node
Root » Houdini Learning Materials » script node
GottaGetmedat
newb question here thanks.
If I add a “Script Node”.
And reference a test.py file in a HIP/Scripts folder
empty with a simple test line like
import hou
or
soppath = hou.pwd()
or even
hou.node('/obj/geo1')
and yes the script node is set to Python the check box is on and the geo1 object exists in the obj area
I get an ERROR …
Python Error: Syntax Error: ('invalid syntax':, ('<stdin>', 1, 2
Geometry not cooked?
Any help getting going on a script node would be nice, thanks.
AdamT
You probably want to avoid using the Script SOP as it can't modify geometry - instead use either File->New Operator Type->Python Type, or use an InlinePython SOP HDA such as:

http://www.orbolt.com/asset/animatrix::inlinePython::1.00 [orbolt.com]


If you're just diving into python for the first time, watch the Python Masterclass first…it's H11 but not much (if anything) has changed.

http://www.sidefx.com/index.php?option=com_content&task=view&id=1810&Itemid=344 [sidefx.com]
GottaGetmedat
I noted this one before but it had issues…
http://www.houdinitoolbox.com/houdini.php?asset=6 [houdinitoolbox.com]
That link to Orbolt beta seemed suspicious orbolt_url.exe %1 and not an otl I expected.

The Masterclass video was a good one I've seen, thanks. (Even though the sound level is pretty low, and POPs potentially damaging speakers).
It actually never mentioned the Script Node but does help to communicate what you've said. (long and mostly GUI related)
That “Script Node” isn't really usable (I think it's buggy now in 12.5) over the better/longer route of Asset creation.
Building an asset seems like an overly complicated route and you can put code or expressions in any field, it seemed there should be a simple reliable node to execute a python code block only.

The only in 3rd party form of inline script nodes route might be good but again the one I found errors and the other is suspicious at best (I prefer not to follow the link over the longer Asset route).
graham
GottaGetmedat
I noted this one before but it had issues…
http://www.houdinitoolbox.com/houdini.php?asset=6 [houdinitoolbox.com]

What issues did you have? I've used that for years and not had a problem.
animatrix_
GottaGetmedat
I prefer not to follow the link over the longer Asset route.

Orbolt assets are safe. Every submission is checked by SESI
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB