Changing Image Texture's parm via python

Forums: Changing Image Texture's parm via python
Houdini Integrated Plugin

Moderator: juanjgon

Changing Image Texture's parm via python

Postby lionlee19 » Thu Jan 26, 2023 8:58 am

lionlee19 Thu Jan 26, 2023 8:58 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.
lionlee19
Licensed Customer
Licensed Customer
 
Posts: 10
Joined: Sat Nov 30, 2019 10:26 am

Re: Changing Image Texture's parm via python

Postby galleon27 » Thu Jan 26, 2023 10:32 am

galleon27 Thu Jan 26, 2023 10:32 am
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
User avatar
galleon27
Licensed Customer
Licensed Customer
 
Posts: 240
Joined: Wed Jul 15, 2015 11:55 am
Location: Serbia

Re: Changing Image Texture's parm via python

Postby lionlee19 » Thu Jan 26, 2023 5:08 pm

lionlee19 Thu Jan 26, 2023 5:08 pm
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?
lionlee19
Licensed Customer
Licensed Customer
 
Posts: 10
Joined: Sat Nov 30, 2019 10:26 am

Re: Changing Image Texture's parm via python

Postby galleon27 » Thu Jan 26, 2023 8:28 pm

galleon27 Thu Jan 26, 2023 8:28 pm
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
User avatar
galleon27
Licensed Customer
Licensed Customer
 
Posts: 240
Joined: Wed Jul 15, 2015 11:55 am
Location: Serbia

Re: Changing Image Texture's parm via python

Postby lionlee19 » Fri Jan 27, 2023 2:15 pm

lionlee19 Fri Jan 27, 2023 2:15 pm
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!
lionlee19
Licensed Customer
Licensed Customer
 
Posts: 10
Joined: Sat Nov 30, 2019 10:26 am

Return to Houdini


Who is online

Users browsing this forum: No registered users and 10 guests

Fri Apr 19, 2024 5:04 pm [ UTC ]