Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] Bug Reporting => Topic started by: skyland99 on 2024-07-03, 20:13:58

Title: Corona 12 maxscript API issue: colormap_lightmix_elementNames
Post by: skyland99 on 2024-07-03, 20:13:58
After updating to Corona 12, this statement cannot get the correct result:
Code: [Select]
renderers.current.colormap_lightmix_elementNames
Specific problem description:
Suppose there are 2 lights in the scene, CoronaLight01 and CoronaLight02, and independent LightMix render elements are added to them respectively. Then, after executing this statement, the following result should be obtained:

Code: [Select]
#("CoronaLight01", "CoronaLight02", "Rest (unassigned)")
However, after updating to Corona 12, after executing this statement, the result will become as follows:

Code: [Select]
-- 3ds max 2021:
#("Interactive LightMix")

-- 3ds max 2024:
#("CoronaLightMix")

-- I only tested these two versions

The light name information was replaced by fixed information. This caused my scripts to not work properly. There was no such problem in Corona 11 and previous versions. Is this a bug or a planned change?
Title: Re: Corona 12 maxscript API issue: colormap_lightmix_elementNames
Post by: Aram Avetisyan on 2024-07-04, 00:39:40
Hi,

This may be due to the fact, that VFB 2.0 now supports multiple Lightmix (specifically CShading_Lightmix, not CShading_LightSelect) elements, and the command now lists the actual lightmix elements with out LightSelect elements.
You can try creating multiple lightmix elements and run the script, see what it returns.
Title: Re: Corona 12 maxscript API issue: colormap_lightmix_elementNames
Post by: skyland99 on 2024-07-04, 05:02:46
Thank you so much! I see, You have added a new method to get the names of lightselect_element:
Code: [Select]
renderers.current.colormap_lightselect_elementNames
Title: Re: Corona 12 maxscript API issue: colormap_lightmix_elementNames
Post by: Aram Avetisyan on 2024-07-04, 05:05:10
You are welcome!