change multiple RGB primaries at once in vray bitmap

Hello vray guys, as I write in the topic title, I’m asking for some advice to change multiple RGB primaries at once inside Vray bitmap.
I’m currently working in ACEScg color space and for make sRGB textures looking correct I need to specify the RGB primaries (by default set as the working color space).
Auto RGB primaries is not an option because I need to rename archive textures which create more problems.

Any advice?

thanks a lot

for m in (getclassinstances vraybitmap) do m.rgbColorSpace = 2

You saved me! Thanks!

Hello, it’s an old post, I know. But it’s saved me too.

But how can I specify that I want to apply this only in the Diffuse slot ? (because I don’t need to change Color Space to “sRGB” for bump, displace, etc…). Only for the Diffuse slot.

Thank you

Try this:


vrayBitmapsInDiffuse = #()
for mtl in scenematerials where classof mtl == VRayMtl do (
if mtl.texmap_diffuse != undefined and isKindOf mtl.texmap_diffuse VRayBitmap == true do appendIfUnique VrayBitmapsInDiffuse mtl.texmap_diffuse
)
for each in vrayBitmapsInDiffuse do each.rgbColorSpace = 2

Note: it will affect only on materials applied on objects in the scene.

Thank’s a lot Hermit ! It’s working great.

Just for future reference if you want to mass change properties, you can use https://www.scriptspot.com/3ds-max/scripts/vray-toolbox or https://www.scriptspot.com/3ds-max/scripts/modifier-modifier-zorb or other mass changers for these things.

Thank you Vizioen, I will take a look !

+1 for Zorb’s Modifier Modifier.
Complete life-saver.