Author Topic: Corona 12 maxscript API issue: colormap_lightmix_elementNames  (Read 416 times)

2024-07-03, 20:13:58

skyland99

  • Users
  • *
  • Posts: 3
    • View Profile
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?

2024-07-04, 00:39:40
Reply #1

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 699
    • View Profile
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.
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us

2024-07-04, 05:02:46
Reply #2

skyland99

  • Users
  • *
  • Posts: 3
    • View Profile
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

2024-07-04, 05:05:10
Reply #3

Aram Avetisyan

  • Corona Team
  • Active Users
  • ****
  • Posts: 699
    • View Profile
You are welcome!
Aram Avetisyan | chaos-corona.com
Chaos Corona QA Specialist | contact us