Author Topic: Arranging Lights in Lightmix  (Read 4901 times)

2025-05-08, 18:09:40
Reply #15

CharlyRT

  • Active Users
  • **
  • Posts: 170
    • View Profile
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.
« Last Edit: 2025-05-08, 18:19:21 by CharlyRT »
Carlos Rodriguez
RTstudio​
www.instagram.com/rtstudio.archviz/

2025-05-08, 18:33:02
Reply #16

Frood

  • Active Users
  • **
  • Posts: 2002
    • View Profile
    • Rakete GmbH
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
Never underestimate the power of a well placed level one spell.

2025-05-08, 18:36:39
Reply #17

CharlyRT

  • Active Users
  • **
  • Posts: 170
    • View Profile
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.
Carlos Rodriguez
RTstudio​
www.instagram.com/rtstudio.archviz/

2025-05-09, 04:08:25
Reply #18

Tom

  • Active Users
  • **
  • Posts: 333
    • View Profile
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.

« Last Edit: 2025-05-09, 04:12:57 by Tom »

2025-05-09, 04:36:42
Reply #19

CharlyRT

  • Active Users
  • **
  • Posts: 170
    • View Profile
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?
Carlos Rodriguez
RTstudio​
www.instagram.com/rtstudio.archviz/

2025-05-09, 05:46:43
Reply #20

Tom

  • Active Users
  • **
  • Posts: 333
    • View Profile

2025-05-09, 09:11:55
Reply #21

Tom

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

2025-05-09, 11:33:14
Reply #22

Frood

  • Active Users
  • **
  • Posts: 2002
    • View Profile
    • Rakete GmbH
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
« Last Edit: 2025-05-12, 18:51:02 by Frood »
Never underestimate the power of a well placed level one spell.

2025-05-09, 11:41:25
Reply #23

Frood

  • Active Users
  • **
  • Posts: 2002
    • View Profile
    • Rakete GmbH
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



Never underestimate the power of a well placed level one spell.

2025-05-09, 16:26:32
Reply #24

CharlyRT

  • Active Users
  • **
  • Posts: 170
    • View Profile
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!!!
« Last Edit: 2025-05-09, 16:48:49 by CharlyRT »
Carlos Rodriguez
RTstudio​
www.instagram.com/rtstudio.archviz/

2025-05-10, 05:28:45
Reply #25

Tom

  • Active Users
  • **
  • Posts: 333
    • View Profile
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.
« Last Edit: 2025-05-10, 05:34:40 by Tom »

2025-05-10, 11:50:33
Reply #26

Frood

  • Active Users
  • **
  • Posts: 2002
    • View Profile
    • Rakete GmbH
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



Never underestimate the power of a well placed level one spell.

2025-05-11, 02:58:23
Reply #27

Tom

  • Active Users
  • **
  • Posts: 333
    • View Profile
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.

2025-05-12, 11:17:35
Reply #28

Frood

  • Active Users
  • **
  • Posts: 2002
    • View Profile
    • Rakete GmbH
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



Never underestimate the power of a well placed level one spell.

2025-05-12, 15:16:55
Reply #29

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 796
    • View Profile
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.
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us