node.asCode()

   2187   1   0
User Avatar
Member
14 posts
Joined: Aug. 2018
Offline
When I write node.asCode() in python shell it returns this message:

Traceback (most recent call last):
File “<console>”, line 1, in <module>
NameError: name ‘node’ is not defined


how can I access node.asCode() within Houdini 17?
User Avatar
Member
9380 posts
Joined: July 2007
Offline
your node variable must be of type hou.Node(), from the error it seems you haven't even defined the node variable

create for example geo node at obj level, leave it at default name geo1

then run this
node = hou.node('/obj/geo1')
node.asCode()
or directly this
hou.node('/obj/geo1').asCode()
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links