Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: GSystem on 2022-12-18, 13:58:42

Title: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: GSystem on 2022-12-18, 13:58:42
I'm trying to remove a map from the "copiedMap" property in the "CoronaColorCorrect" map (version 9) via maxscript with this line:
Code: [Select]
sourceMap.copiedMap=undefinedbut I get an error:
Code: [Select]
-- Runtime error: Invalid value for property: undefinedWhat could be the problem and how to solve it?
Thanks.
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: Avi on 2022-12-19, 11:40:32
To help troubleshoot this issue, it would be helpful to have more information about your specific use case and material setup.

1. Can you tell me more about what you are trying to achieve with this script?
2. How are you using the CoronaColorCorrect map in your material setup?
3. Are you using Corona 9 or a more recent version which is Corona 9 HF 1?
4. What version of 3ds Max are you using?
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: GSystem on 2022-12-22, 12:34:12
To help troubleshoot this issue, it would be helpful to have more information about your specific use case and material setup.

1. Can you tell me more about what you are trying to achieve with this script?
2. How are you using the CoronaColorCorrect map in your material setup?
3. Are you using Corona 9 or a more recent version which is Corona 9 HF 1?
4. What version of 3ds Max are you using?

I apologize for the delay in reply.

1. I can't tell anything special about the script. This is a simple script that should just clear the "copiedMap" property, but instead I get the error I wrote above. If you just click on the slot with the map and select <NONE> in the Material/Map Browser, then it works and the slot is cleared and "copiedMap" property becomes "undefined", but if you try to do it through maxscript, you get an error. As far as I understand in maxscripts (and I understand enough), then assigning the value "undefined" to a property intended to refer to a texture map should not cause an error.
2. There is nothing supernatural in the map settings. This is a regular CoronaLegacy material and a regular CoronaColorCorrect map (Map #1), with another CoronaColorCorrect map (Map #2) from which the color correction settings are taken (see screenshot below).
3. Corona 9 (hotfix 1)
4. 3ds Max 2023.2.2 Update
(http://)
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: GSystem on 2022-12-23, 13:59:17
Hmm... None of the Corona developers who read my post know the answer to my question. It is sad...
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: TomG on 2022-12-23, 15:09:07
https://forum.corona-renderer.com/index.php?topic=38796.0 - the office has been closed since the 19th, so not a time to expect fast replies :) Even our hard working devs need some time off to recharge!
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: maru on 2022-12-23, 15:37:59
I am not a developer and I have little maxscript knowledge. I spent some time looking around various forums, and unfortunately I was not able to find a good answer so far.

As a workaround, maybe you can use this command to switch from "use settings from map" to "use these settings":

rootScene[#SME][#View1][#Map__1____CoronaColorCorrect].SMENodeAttr.reference.controlsSource = 0
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: rowmanns on 2023-01-02, 11:39:56
Hi,

We have managed to reproduce this here, it looks like a bug to me.

I'll pass it on to the dev team and let you know when I've got some more info.

Cheers,

Rowan

(Internal ID=1029309927)
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: GSystem on 2023-01-03, 15:40:35
Thanks for the answer, Rowan. I'll wait for this to be fixed.
Title: Re: MAXScript: CoronaColorCorrect error when trying to remove map from "copiedMap"
Post by: rowmanns on 2023-02-27, 20:43:57
Hi,

Good news, we have fixed this in the latest daily. You can try it out here: https://forum.corona-renderer.com/index.php?topic=38385.msg210105#msg210105

Let me know if you still have some issues.

Cheers,

Rowan