why hou.pwd() not work with parameter python language??

   1962   1   2
User Avatar
Member
46 posts
Joined: Jan. 2012
Offline
if I change hou.pwd() to hou.node('/obj/geo1/mdd')
and it will work!
have any body can help me?


import os
thisNode = hou.pwd()
inputNode = thisNode.inputs()
path = inputNode.evalParm('file')
newPath = os.path.splitext(path)
tmpPath =
tmpPath.append(str(newPath))
tmpPath.append('.mdd')
finalPath = ''.join(tmpPath)
print finalPath
return finalPath
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
hou.pwd() will evaluate the current path directory and works well when in a parameter field, callback script or in the script section of an HDA as it will return the path to the current node.

It won't work in the python shell as you have typed it and you need to supply a proper path.
There's at least one school like the old school!
  • Quick Links