Hi, I am wondering if someone has been able to do this before.
I am trying to extract some weights from an xml file into houdini; however, I am a bit confused on how to create the boneCapture attribute correctly via python?
I notice that when you create it using a capture SOP, it is named boneCapture (the four indices symbolizing bone name, weight value, bone name, weight value, etc.)
When looking at this attribute in the details view, it looks like the bone capture attributes are named
boneCapture regn, boneCapture w, boneCapture regn, boneCapture w…
I created mine as a simple array (boneCapture, boneCapture, boneCapture, etc, but when feeding this into a deform SOP, I get the “No Capture Attributes Exists error”
any help on this would be greatly appreciated!
thank you!
how to create boneCapture attribute via python
8835 8 2- grayOlorin
- Member
- 1799 posts
- Joined: Oct. 2010
- Offline
- eetu
- Member
- 606 posts
- Joined: May 2007
- Offline
- grayOlorin
- Member
- 1799 posts
- Joined: Oct. 2010
- Offline
hey eetu, creating those attributes with the bones in the scene actually worked! the part I am having a bit of a hard time now is setting the attribute to be the right size (i.e. boneCapture or boneCapture) so that when I try to set it via my script, it does not fail.
I was looking into the captureOverride as a means to set point 0 to have the right amount of dummy influences, but it seems to act a bit weird at times. What did you do to get around this problem?
thank you for the help!
I was looking into the captureOverride as a means to set point 0 to have the right amount of dummy influences, but it seems to act a bit weird at times. What did you do to get around this problem?
thank you for the help!
-G
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
- grayOlorin
- Member
- 1799 posts
- Joined: Oct. 2010
- Offline
- NFX
- Member
- 183 posts
- Joined: Dec. 2011
- Offline
- grayOlorin
- Member
- 1799 posts
- Joined: Oct. 2010
- Offline
btw I think this is the one:
https://www.sidefx.com/docs/houdini13.0/hom/hou/IndexPairPropertyTable [sidefx.com]
you can return one of these using hou.Attrib
However, I seem to be missing the function for adding or removing indices.. mhhh… I am going to have to dig in a bit more through my emails
https://www.sidefx.com/docs/houdini13.0/hom/hou/IndexPairPropertyTable [sidefx.com]
you can return one of these using hou.Attrib
However, I seem to be missing the function for adding or removing indices.. mhhh… I am going to have to dig in a bit more through my emails
-G
- terk-dsn
- Member
- 2 posts
- Joined: Aug. 2010
- Offline
Sorry for necro-posting, but this thread still pops up as the 1st result in google on the boneCapture subject.
In case someone else would get here...
THE SOLUTUTION:
Capture Attribute Pack/Unpack nodes:
https://www.sidefx.com/docs/houdini/nodes/sop/captureattribpack.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/nodes/sop/captureattribunpack.html [www.sidefx.com]
Unpack the attrib to a regular attribs, do whatever you want with python/vex, pack them back.
The boneCapture attrib itself stays "a special snowflake" and you can't/shouldn't modify it directly. (I geuess, SideFX does some performance-optimised C++-side mumbo-jumbo when this attrib is set, so you shouldn't be editing it after packing anyway).
In case someone else would get here...
THE SOLUTUTION:
Capture Attribute Pack/Unpack nodes:
https://www.sidefx.com/docs/houdini/nodes/sop/captureattribpack.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/nodes/sop/captureattribunpack.html [www.sidefx.com]
Unpack the attrib to a regular attribs, do whatever you want with python/vex, pack them back.
The boneCapture attrib itself stays "a special snowflake" and you can't/shouldn't modify it directly. (I geuess, SideFX does some performance-optimised C++-side mumbo-jumbo when this attrib is set, so you shouldn't be editing it after packing anyway).
Edited by terk-dsn - Feb. 22, 2021 15:25:39
- seneelya
- Member
- 1 posts
- Joined: Dec. 2016
- Offline
-
- Quick Links