Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: J_kelloggs on 2023-04-17, 15:45:18
-
Hello,
so my goal is to find the parameter to change the position of the sun but for some reason i cant find the one used by corona.
Making a script to change the position of the corona sun based on the time selected in a drop down menu
this is what i have tried so far but recive this error
"06:00": sun.position = eulerangles [0, 0, 0]
-- Error occurred in anonymous codeblock; filename: "" position: 899; line: 29
-- MAXScript Rollout Handler Exception:
-- Argument count error: EulerAngles wanted 3, got 1
-- MAXScript callstack:
-- thread data: threadID:9404
-- ------------------------------------------------------
-- [stack level: 0]
-- In TOD.selected(); filename: "" position: 900; line: 29
-- member of: Rollout:SLA
-- Parameters:
-- sel: 2
-- Locals:
-- sel: 2
-- TimeofDay: "06:00"
-- Externals:
-- owner: Rollout:SLA
-- TOD: RolloutControl:TOD in rollout:SLA : ComboBoxControl:TOD
-- SLA: Rollout:SLA
-- sun: Object
-- ------------------------------------------------------
-- [stack level: 1]
-- called from top-level
-
Hi,
is this script any different from the 3ds Max native Daylight system which you can use with Corona sun, that does the same thing?
-
its basically the same i just need to move the corona sun in the viewport with the maxscript cuz the full code will have things to modify the render settings too just need help with this part of the code
-
you are mixing position with rotation.
try:
sun.position = [0, 0, 0]
-
Hi,
our devs have suggested the following code. Please try this and let me know if it solves your issue.
corona_sun = getNodeByName "Corona Sun001"
corona_sun.position = [5,5,5]
Replace the "Corona Sun001" string by name of the Corona Sun in your scene