Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- node = hou.selectedNodes()[0]
- geo = node.geometry()
- prims = geo.prims()
- newGeo = hou.Geometry()
- convertvdb_verb = hou.sopNodeTypeCategory().nodeVerb("convertvdb")
- for p in prims:
- if('VDB' in str(p.type())):
- convertvdb_verb.execute(newGeo, [geo])
- prims2 = newGeo.prims()
- for pp in prims2:
- maxVal = pp.volumeMax()
- minVal = pp.volumeMin()
- print(pp.attribValue('name') + ": " + "Max: " + str(maxVal) + " Min: " + str(minVal))
- break
- else:
- maxVal = p.volumeMax()
- minVal = p.volumeMin()
- print(p.attribValue('name') + ": " + "Max: " + str(maxVal) + " Min: " + str(minVal))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement