検索 - User list
Full Version: PythonScript - GetPath()
Root » Solaris and Karma » PythonScript - GetPath()
BabaJ
Hi, I doing something where I need to get usd data and am using the docs examples as a way to learn how to do this.

https://www.sidefx.com/docs/houdini/nodes/lop/pythonscript.html [www.sidefx.com]

however when I try to use GetPath() I get python errors saying object has no attribute GetPath.

I'm assuming the way I am referencing is wrong hence it can't ‘see’ it?

# Add code to modify the stage.
# Use drop down menu to select examples.

from pxr import UsdGeom

node = hou.pwd()
stage = node.editableStage()

#cube = stage.GetPath("/obj/Set_EXR_FileNames/lopnet1/CHECKPOINT")
cube = stage.GetPath("/sopimport1/mesh_0")

# Change attributes directly
#cube.GetAttribute("size").Set(3.5)
mtucker
That's a typo… It should be “GetPrimAtPath”.
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