Changing Image Texture's parm via python

Houdini Integrated Plugin

Moderator: juanjgon

Post Reply
lionlee19
Licensed Customer
Posts: 10
Joined: Sat Nov 30, 2019 10:26 am

I am writing some scripts changing the parameters of texture image
and I want to set the Color Space of it.

For example:
tnode.parm('colorSpace').set('Non-color Data')
tnode.parm('colorSpace').set('ACEScg')


but I get error on log when I load it into Octane.
User avatar
galleon27
Licensed Customer
Posts: 292
Joined: Wed Jul 15, 2015 11:55 am
Location: Serbia
Contact:

lionlee19 wrote:I am writing some scripts changing the parameters of texture image
and I want to set the Color Space of it.

For example:
tnode.parm('colorSpace').set('Non-color Data')
tnode.parm('colorSpace').set('ACEScg')


but I get error on log when I load it into Octane.

Code: Select all

tnode.parm('colorSpace').set('NAMED_COLOR_SPACE_OTHER')
tnode.parm('colorSpace').set('NAMED_COLOR_SPACE_ACESCG')
Win 10 64bit // GTX 4090 + GTX 3090 // 5900x // 64GB // SideFX Houdini // C4D
lionlee19
Licensed Customer
Posts: 10
Joined: Sat Nov 30, 2019 10:26 am

galleon27 wrote:
lionlee19 wrote:I am writing some scripts changing the parameters of texture image
and I want to set the Color Space of it.

For example:
tnode.parm('colorSpace').set('Non-color Data')
tnode.parm('colorSpace').set('ACEScg')


but I get error on log when I load it into Octane.

Code: Select all

tnode.parm('colorSpace').set('NAMED_COLOR_SPACE_OTHER')
tnode.parm('colorSpace').set('NAMED_COLOR_SPACE_ACESCG')
Thank you Very much !
It works!
Where can I find these correct parameter names for each colorspace?
User avatar
galleon27
Licensed Customer
Posts: 292
Joined: Wed Jul 15, 2015 11:55 am
Location: Serbia
Contact:

Don't know if you can list them all. I just set it to whatever color space i need and do node.parm('colorSpace').eval() in the python shell and you'll get the name. That goes for whatever parameter you need.
Win 10 64bit // GTX 4090 + GTX 3090 // 5900x // 64GB // SideFX Houdini // C4D
lionlee19
Licensed Customer
Posts: 10
Joined: Sat Nov 30, 2019 10:26 am

galleon27 wrote:Don't know if you can list them all. I just set it to whatever color space i need and do node.parm('colorSpace').eval() in the python shell and you'll get the name. That goes for whatever parameter you need.
Thank you so much!
Post Reply

Return to “Houdini”