Jump to content

Set voxel value with Python in a hou.VDB


Efi

Recommended Posts

Hello,

I need a way to set the value of a voxel of a hou.VDB with python.

Do you know if there is  an equivalent to the setVoxel() function used to the hou.Volume for the vdb ?

Thanks in advance,

Link to comment
Share on other sites

I need to specify the volume's name with a variable because I use a multiparm block to collect the volume name.

image.png.1494a10e6a798dd1bddac04908abdd75.png

I didn't find a way to specify the name by variable with vex so I try first to generate vex with python, something like this 

content = "@" + volume_name + " = " + volume_value + ";"
return content

But the problem with this solution is that the wrangle is in a for loop (for the multiparm block) and so on it crash sometime because of the update of the vex code. So I did it on python, but I'm stuck with vdb volume.

I would have liked to do it in vex but for that I would need a function like point 

setpointattrib(0, name, @ptnum, value, "set");

It's for the tool of this video (time : 01:34)

 

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...