ScriptSpot

Forum topic · Scripts Wanted

Remove color correction. Advice needed

By mpashnin · 2019-05-27

Description

Hello!

I need to make a script, which will find Color Correction Map in all materials with any gamma-correction in diffuse slot, and set gammaRGB to 1.


https://yadi.sk/i/Shd19HPdzMqoMQ

UPD:
Need to set gammaRGB for Diffuse slot only, but here for all Color Correction maps:


for m in sceneMaterials do (
	
	for p in getPropNames m where isKindOf (tex = getProperty m p) textureMap do
	(
		if isKindOf tex Color_Correction do tex.gammaRGB = 1
	)
)

UPD2:
try to check if slot is Diffuse, but have no luck(


for m in sceneMaterials do (
	
	for p in getPropNames m where isKindOf (tex = getProperty m p) textureMap do
	(
		if isProperty p #texmapDiffuse do
		if isKindOf tex Color_Correction do tex.gammaRGB = 1
	)
)
Comments (1)

mpashnin · 2019-06-04

Here is a solution!


for m in sceneMaterials do (
	if isKindOf m CoronaMtl do 
		if isKindOf (tex = m.texmapDiffuse) Color_Correction do tex.gammaRGB = 1
)