Python: set attribute type

   519   0   0
User Avatar
Member
25 posts
Joined: Jan. 2014
Offline
Hey there guys.

For whatever reason trying to set the attribute type 1 in the paint node keeps giving me errors.

I can change the attribname1 with no problem but trying to change the attribtype1 to use Color by setting it to a value of "0" always gives an error.

here's an example of code

attribNodeAttribNameParm = attribNode.parm("attribname1")
attribNodeAttribNameParm.set("Cd")
attribNodeAttribTypeParm = attribNode.parm("attribtype1")
attribNodeAttribTypeParm.set("0")

Anyone of you have this error show up for ya?

EDIT: Nevermind. I was being dumb. "" turns it into a string. needed to remove the quotations.
Edited by Martin Krol - Oct. 24, 2023 15:26:46
  • Quick Links