[Sidefx-houdini-list] More HOM woes ... hou.Point.setAttribValue

Andras Ikladi andras.ikladi at gmail.com
Mon Feb 4 11:37:19 EST 2008


Hello Rob,

I'm not sure if this is an implementation problem/state, but I never got
referencing by attribute name working.
Maybe I'm doing something wrong, saving an attr as a variable (of type
hou.Attrib) works:

geo = hou.pwd().geometry()
attr = geo.addAttrib( hou.attribType.Point, 'myAttrib', ( 0.1, 0.2, 0.3 ) )
pt = geo.createPoint()
pt.setAttribValue(attr, pt.attribValue( 'myAttrib' ) )

cheers,
Andras

On Feb 4, 2008 5:27 PM, Rob Pieké <rob-p at moving-picture.com> wrote:

> Very simple Python SOP ... doesn't work. The last line causes an error.
>
> geo = hou.pwd().geometry()
> geo.addAttrib( hou.attribType.Point, 'myAttrib', ( 0.1, 0.2, 0.3 ) )
> pt = geo.createPoint()
> pt.setAttribValue( 'myAttrib', pt.attribValue( 'myAttrib' ) )
>
> And I checked ... pt.attribValue( 'myAttrib' ) returns (0.1, 0.2, 0.3)
> as I would expect.
>
> Any ideas? :)
>



More information about the Sidefx-houdini-list mailing list