papsphilip Posted January 27, 2022 Share Posted January 27, 2022 (edited) I am trying to use the setAllVoxelsFromString() command but its not working. Can someone provide an example? what does the string need to look like? i want to fill a vector volume with values i have from a fga file. First 9 values are for volume size and bounds. The rest is the values import hou node = hou.pwd() geo = node.geometry() file = node.parm('file').eval() with open(file, 'r') as f: data = f.read().split(',') volumesize = (data[0],data[1],data[2]) bboxmin = (data[3],data[4],data[5]) bboxmax = (data[6],data[7],data[8]) data = data[9:] datastr = ' '.join([str(elem) for elem in data]) volume = geo.prims()[0] volume.setAllVoxelsFromString(datastr) Vel_field_0000.fga fga_importer.hip Edited January 27, 2022 by papsphilip Quote Link to comment Share on other sites More sharing options...
bunker Posted January 30, 2022 Share Posted January 30, 2022 You can check the output of allVoxelsAsString() https://www.sidefx.com/docs/houdini/hom/hou/Volume.html 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.