cloudfx Posted December 21, 2015 Share Posted December 21, 2015 Running the python code as OTL (geometry operator type with python) Its getting this error --> Traceback (most recent call last): File "<console>", line 1, in <module> File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.313/houdini/python2.7libs\houpythonportion.py", line 5 67, in decorator return hdefereval.executeInMainThreadWithResult(func, *args, **kwargs) File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.313/houdini/python2.7libs\hdefereval.py", line 41, in executeInMainThreadWithResult return _queueDeferred(code, args, kwargs, block=True) File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.313/houdini/python2.7libs\hdefereval.py", line 74, in _queueDeferred raise exc_info[1] OperationFailed: The attempted operation failed. This node cannot contain other nodes Here is the code.. # This code is called when instances of this SOP cook. node = hou.pwd() geo = node.geometry() # create a temporary ROP node fbx_rop = hou.node('/obj/pyro_import1/OUT').createNode('filmboxfbx') # set the output path to whereever you want the file to go fbx_rop.parm('sopoutput').set("$TEMP/out.fbx") # Path to object hierarchy you want to export obj_path = hou.node('/obj/pyro_import1/OUT').path() fbx_rop.parm('startnode').set(obj_path) # Now just run the "render" method on the node, and delete the ROP fbx_rop.render() fbx_rop.destroy() Quote Link to comment Share on other sites More sharing options...
cloudfx Posted December 21, 2015 Author Share Posted December 21, 2015 btw, I am using Indie license 15 Quote Link to comment Share on other sites More sharing options...
symek Posted December 21, 2015 Share Posted December 21, 2015 Isn't that /obj/pyro_import/OUT a Null SOP, which in fact can't contain nodes? At least I would assume that since 'OUT' as usually reserved for Nulls... Quote Link to comment Share on other sites More sharing options...
cloudfx Posted December 22, 2015 Author Share Posted December 22, 2015 @symek Actually, it is not, it has all the point attributes and geo that I want to export.. Quote Link to comment Share on other sites More sharing options...
symek Posted December 22, 2015 Share Posted December 22, 2015 @symek Actually, it is not, it has all the point attributes and geo that I want to export.. Understood, but it still might be a Null SOP, albeit: hou.node('/obj/pyro_import1/OUT').createNode('filmboxfbx') above line attempts to create a filmboxfbx ROP inside .../OUT node, which doesn't make sense, unless OUT it's a ropnet node. Is it? (your error output suggests it is not). Assuming filmboxfbx is a ROP type (can't check now, no Houdini around, sorry), you would like to do something like: geometry_to_export = hou.node("/obj/pyro_import/OUT") parent = geoemtry_to_export.parent() ropnet = parent.createNode("ropnet") ropnet.createNode("filmboxfbx") ... more or less... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.