Stiggie

Stiggie

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

How do i create an attribute inside Python Sop? April 11, 2021, 2:43 p.m.

I am also trying to add an attribute using the python node.
Eventually I want to load in some values via Json, and set them to the "Cd" values for the primitives of my geo.
But first I thought I'd simply try adding an attribute via the python node.

I have:

node = hou.pwd()
geo = node.geometry()

geo.addAttrib(hou.attribType.Prim, "Cd", hou.Vector3(1.0,0.0,0.0))

But it does nothing, I have a geometry spreadsheet open but I don't see any attributes appearing underneath the primitives tab or any other.

I am not getting an error, so it seems to be evaluating the code fine, but nothing happens.

Any idea? The geometry is connected to the first input.