Hi, I’m day 1 newbie in maxscript.
I’m using 3ds max 2022 and trying to automate change RGB color space of Vraybitmap in my scene.
I have tested a line I found on chaos forum :
for m in (getclassinstances vraybitmap) do m.rgbColorSpace = 1
It works for me, turning every vraybitmap’s rgbColorSpace in the scene to sRGB.
Then I want to achieve something with more function.
- I want to only change the rgbColorSpace of diffuse map of vraymtl respectively, I don’t want to change bump map, normal map or other map.
- I want to know how to change only the diffuse map of selected object’s material / only the diffuse map of selected material inside slate material editor.
The following is what I have tried, but failed…
for m in (getClassInstances vraybitmap) do
if isKindOf m.texmap_diffuse Bitmaptexture then
do m.rgbColorSpace = 1
Then Max script listener return me : – Syntax error: at ), expected
If somebody can guide me how to achieve the function I need :
How to change only the rgbColorSpace of diffuse map but not all vraybitmap in the scene.
How to limit the target to selected object’s material / current selected material inside slate material editor
And if it can be write in the form similar to the format I have tried would be great, thanks in advance.