Jump to content

Python DOP question


asnowcappedromance

Recommended Posts

If I create a Python DOP node and try to access subData, for example "Impacts"'s "Impacts" I always get an error message like

"Attribute Error: 'NoneType' object has no attribute 'record'.

That is obviously due to the fact that on frame 1 of the simulation there is no Impact data yet. How can I make Python understand that it should

only start creating subdata variables if a collision has already happened ?

I'm basically iterating through dop objects in my scene doing something like this:

objects = hou.pwd().objectsToProcess()

for i in objects:
    impacts = i.findSubData("Impacts")
    subdata = impacts.record("Impacts")

thanks,

Manuel

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...