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

Rob Pieké rob-p at moving-picture.com
Mon Feb 4 11:41:30 EST 2008


Ugh!

Turns out this also works:

pt.setAttribValue(geo.findPointAttrib('myAttrib'),pt.attribValue('myAttrib'))

I definitely think it's an implementation problem, given that the hou.py 
file contains:
         setAttribValue(self, attrib_name, attrib_value)

Thanks Andras!


> 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? :)
>>
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> 




More information about the Sidefx-houdini-list mailing list