Chaos Corona Forum
Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: Raoulk on 2025-05-02, 12:46:15
-
Hello Professionals,
I am working on a big interior scene with at least 30 lightselects.
Sometimes I need to add new ones and they end up by the end of the list.
does somebody know of a way to rearrange them without losing the values already inputted?
Thank you
Raoul
-
Hi,
A new render element is added at the end of the list, I don't think Corona controls that, it's Max thing.
When you add a new lightmix (CShading_LightSelect) layer, other layers should stay intact, unless you re-create the lightmix.
If you do this manually through render elements dialog, old values should stay intact. Just make sure that the light you add to a new lightmix layer is not in another layer (exception is, of course, the rest).
-
I'm pretty sure I came across such a tool but I'm not sure as I reinstalled 3ds Max since then and it's no longer installed now.
I'm talking about "Creative Tools": a set of scripts developed by Creative Lighting: https://www.creativelighting.co/archviz-masterclass/
One of these scripts allowed me to rename and rearrange the lights order in the Corona VFB. So far as I remember lights values were not changed.
Maybe you can get in touch with Nikos and see if he's willing to sell you the tool?
-
Yes you can rearrange the list without losing values, though it's a slightly fiddly work-around.
Just delete the render element (or multiple) and then Ctrl+Z and it will bring it back at the end of the list with name and values intact (works in Max2025).
In this way you can sort of shuffle them into order.
-
Here is a script ChatGPT wrote for me. I didn't thank him to save energy, so let's thank him here.
It can be used to move render elements up and down. You need to re-render to see the effect in the VFB though.
-
Great maru, very useful, thank you.
The perfection would be ..see attached image.
-
Feel free to add this as an idea at https://chaoscorona.ideas.aha.io/
We already have this https://chaoscorona.ideas.aha.io/ideas/CMAX-I-111 but the description isn't very detailed, so I think it's fine to start a new idea with proper description of what you would find useful.
-
Here is a script ChatGPT wrote for me. I didn't thank him to save energy, so let's thank him here.
It can be used to move render elements up and down. You need to re-render to see the effect in the VFB though.
I always find incredible how people manage to receive something useful with ChatGPT, I have used it in many situations with no success
-
I used one of the paid models (o4-mini-high) with its deep research feature turned on.
-
I used one of the paid models (o4-mini-high) with its deep research feature turned on.
Ohhhh, I have heard something for that, well thanks for the Script, its pretty useful, the only thing that needs is an scroll bar to adjust the size, I have done it manually.
This is something I had request in 3d Max forums but no luck with Autodesk to improve Render Elements, it needs a redesign, its pretty old.
-
The free version of ChatGPT isn't good to create 3ds Max scripts. I've tried it several times with no luck.
Thanks for your advice and the script Maru.
@CharlyRT: would you mind sharing the updated script? I have many render elements and the lightmix isn't accessible as it's too far in the bottom of the list and there's no scroll bar in Maru's script.
-
@tom
Sure, I also edit it to be macro you can find it as "Render Elements Organizer"
Im trying to add a button to rename elements too but I cannot find a way to do it, the only script that I have found is too old and its not really what I expected
-
Thanks CharlyRT!
-
The perfection would be ..see attached image.
what i meant is to be able to group (organize) the elements of the Lightmix. It would be very useful in complex projects.
-
what i meant is to be able to group (organize) the elements of the Lightmix. It would be very useful in complex projects.
I think that's clear. But you can already do a lot by naming with a prefix and sorting. So let's continue our little sprint here: I have a snippet I call to sort render elements by name and added it to the script (button "Sort"). Additionally added buttons for refresh (re-reading the elements from the scene) and a rename option. Changed layout, added versioning, added some macro event handlers, added icon definition, added dockable option. Did not change category, so it's still to be found at category "RTstudio" as "Render Elements Organizer".
Everyone feel free to further improve/extend it :)
Good Luck
Edit: removed obsolete script
-
Thank u so much Frood this is what I was looking out for!!!!!
Its working beautifully in Corona, but....
I have tested on Vray and its giving me an error.
-
Sorry, that's up to some vray user to fix. Looks like (some?) vray render elements have no "name" property. I have no license any more and cannot solve this right now. Possible solution would be a fallback to the class name as it is done in the collect section above and to test for the name property every time.
Good Luck
-
Sorry, that's up to some vray user to fix. Looks like (some?) vray render elements have no "name" property. I have no license any more and cannot solve this right now. Possible solution would be a fallback to the class name as it is done in the collect section above and to test for the name property every time.
Good Luck
Thanks a lot, Ill try by myself, if not Ill try in the forum.
Thanks again i really use this more from Corona because of all the Lightmix render elements that needs to be included.
-
Did not change category, so it's still to be found at category "RTstudio" as "Render Elements Organizer".
Thanks for this Frood, it works nicely.
However when I restart 3ds Max the script isn't found.
I checked the folder 'C:\Users\*myUserName*\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usermacros' and I can see the file 'RTstudio-RenderElementsOrganizer.mcr' in there so I don't understand what's wrong.
-
Thats strange Tom, I didnt have any issues, at all
Have you tried, delete it from User macros and drag again to viewport to intall it again?
-
Yes this is what I did.
-
Maybe I have this problem as before installing the latest version of the script, I've installed the first one and had already created a button for it. Since then, I've deleted this button and recreated it for the new version, but I still have this error.
Does somebody know how to fix this?
-
Thank u so much Frood this is what I was looking out for!!!!!
Its working beautifully in Corona, but....
I have tested on Vray and its giving me an error.
Can you please try this one?
Good Luck
Edit: removed obsolete script
-
Yes this is what I did.
There should be no need to d&d it, if you already have the file in your "usermacros" directory. If you have that directory configured in "Customize -> Configure User and System paths -> Additional Macros", it will be evaluated at 3ds max startup. So just delete the old button, close max (by default, UI is saved when closing max), start it up and go to "Customize User Interface" -> "Toolbars" to add the icon to some toolbar.
Good Luck
-
Can you please try this one?
Big thanks Frood, I have received something similar from Vray forum too, It works perfectly fine with both engines!!!
-
There should be no need to d&d it, if you already have the file in your "usermacros" directory. If you have that directory configured in "Customize -> Configure User and System paths -> Additional Macros", it will be evaluated at 3ds max startup. So just delete the old button, close max (by default, UI is saved when closing max), start it up and go to "Customize User Interface" -> "Toolbars" to add the icon to some toolbar.
Thanks for your help Frood.
I confirm the usermacros directory is correctly configured in "Customize -> Configure User and System paths -> Additional Macros" and RTstudio-RenderElementsOrganizer.mcr is here.
I deleted the old button, deleted the toolbar ("Customize > Customize User Interface > Toolbars" tab), I restarted 3ds Max and the old button was here again with the same message.
When I go to "Customize > Customize User Interface > Toolbars" and I search in "Category" I can't see RTStudio anymore.
So the issue looks like the .mcr is not evaluated at the start of 3ds Max for some reason, although it is present in the usermacros directory.
I don't know what to do.
Of course, at that point I can drag and drop the mcr on the viewport and now RTStudio appears in the category and I can drag the script to the toolbar and the button works, all good. But as soon as I restart 3ds Max, RTStudio category is missing again.
To be on the safe side, I even saved the default state of the workspace before restarting Max, just in case, but the problem remains at the next restart.
-
So the issue looks like the .mcr is not evaluated at the start of 3ds Max for some reason, although it is present in the usermacros directory.
You may be right here, look at this:
https://cganimator.com/missing-scripts-plugins-after-windows-11-24h2-update/
Removing the system attribute should do it it seems. And you should be able to see the issue in your max log file.
Good Luck
-
https://cganimator.com/missing-scripts-plugins-after-windows-11-24h2-update/
Removing the system attribute should do it it seems. And you should be able to see the issue in your max log file.
Thanks.
I still run Windows 10, not 11, but I don't think it makes a big difference. Anyway, I inspected Max.log and didn't find any issue related to attributes of the ENU folder, but instead I found this:
2025/05/11 10:31:31 WRN: [51268] [07788] Error found in macroscript file: C:\Users\*MyUserName*\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usermacros\RTstudio-RenderElementsOrganizer.mcr; macroscript: RenderElementsOrganizer; file offset: 149; error: Unknown keyword found while scanning macroscript definition: /*
2025/05/11 10:31:31 WRN: [51268] [07788] Failed to load macroscript: C:\Users\*MyUserName*\AppData\Local\Autodesk\3dsMax\2023 - 64bit\ENU\usermacros\RTstudio-RenderElementsOrganizer.mcr
I don't know what it means, but it tends to indicate an error when parsing the macroscript.
-
I don't know what it means, but it tends to indicate an error when parsing the macroscript.
Oh yes. I see "Max 2023"... Now I remember that it has bugs in comment/backslash parsing in macro definitions. It does not like maxscript line breaking ("\") in the definition and block comments between the definition itself and the first bracket...great.
Anyway - after using it a bit, I decided to add a class info line, added auto refresh (based on #renderParamsChanged), added tooltips, and now fixed that by moving the history section above the macro definition. Max 2023 should parse it happily now at startup.
Good Luck
-
Hi, I was playing a bit with the script created by Maru and Frood and here is a bit improved version. Used Chatgpt for help.
-
I also had the delete button in mind but thought it would be more consistent if adding and deleting stays in render setup because to include adding would be quite complex :) I like the multi selection and direct rename feature very much.
But I miss a default icon definition and fn clamp. It is undefined and I get the usual error when trying to d&d.
Good Luck
-
I hope this fixes the issue.
-
In fact there were further issues. I see that additionally the rtFil handler is already fixed, now there is still is a non functional callback to auto refresh the list. Callback functions have to be global unfortunately because they use another scope, so "REO_roll != undefined" will always be false, and you cannot call the required functions on it. But just add a "global REO_roll" (yes, we all hate globals...) before defining the rollout and the auto refresh will work.
Then: please update the version variable to 0.4, not to 4.0 :) And the button state (pressed) when the script is displayed (on isChecked()) is gone as well as the docking option. And I'm no friend of fixed layouts.
But those are features I want to have for myself primarily and do not affect functionality. With the exception of removing the fixed layout where I struggle when it comes to .net controls, I have brought back those features into your previous version here for personal use :)
Good Luck
-
Hi, I have revised most of the things but few things I still cannot solve. #buttonState (It only updates when some other max UI is refreshed) and I have not touched layout flexibility, still it uses fixed size (will play with it later) Version update is fixed, docking functionality is brought back :) Global Reo_roll declaration fixed. #fixed colors too so its blends easily with max interface
Feel free to improve it further.
-
Nice :)
My comments after quickly looking at it:
(1) As for button state: replace line 195 to 198 by just 'updatetoolbarbuttons()'. Usually max calls this itself at every reasonable and stupid occasion (for example when just selecting something in scene explorer), but sometimes fails when it would be important. Same at line 305 to 308.
(2) Kick line 293 and 302 - it does not work like this, 'buttonText' is no variable but part of the macro definition.
(3) 'useCUI' is 'true' initially, leading to an error (catched by try/catch) in 'on execute' if you press the button when the window is open because 'unRegisterDialogBar()' is executed without having the dialog registered. Has to be defined as 'false' initially.
Good Luck
-
Thanks for the feedback. Now it works well.
-
Hi
I was trying to add 2 buttons from v0.3
Move UP and Down
I used the code from that version but it seems thar the whole code change in v0.4 and I cant use them.
Could it be possible to help on this one
Im attaching what I was trying to... obviusly I dont know anything about of scripting :(