Errors when running custom copy of Light Lister

Errors when running custom copy of Light Lister

niamh_boyle
Observer Observer
1,326 Views
9 Replies
Message 1 of 10

Errors when running custom copy of Light Lister

niamh_boyle
Observer
Observer

I want to create a separate custom light lister to display my custom lights. Started by making a copy of the existing light lister (Macro_LightList.mcr) to my own file, as well as the corresponding resource file (Macro_LightList.mcr.res). To avoid clashes in the new file, I renamed the global light lister (Find-&-Replace 'LLister' to 'LListerIRP'). When activating the script from my menu location, the dialog loads, however I get the following error, and no lights are displayed of any time - (Note: I have yet to add my own lights into this file, due to this issue). Screenshot 2024-05-01 115736.png

 However, when I open the original light lister no errors occur.

niamh_boyle_0-1714561213189.png


I have attached the custom Macro LightList file, as well as a changelog of the edits leading up to this issue.

0 Likes
1,327 Views
9 Replies
Replies (9)
Message 2 of 10

niamh_boyle
Observer
Observer

Error attaching .mcr file, reattached them here

0 Likes
Message 3 of 10

istan
Advisor
Advisor

"for i in 1 to tmpParser.count do" looks interesting..

0 Likes
Message 4 of 10

denisT.MaxDoctor
Advisor
Advisor

@istan wrote:

"for i in 1 to tmpParser.count do" looks interesting..


an old-school syntax but there is nothing wrong there...

 

the line with an error is :

 

LListerIRP.maxLightsrc=rolloutCreator "maxLightsRollout" ~MAXLIGHTSRC_LIGHTS~

 

 

the most likely problem is an unregistered resource variable ~MAXLIGHTSRC_LIGHTS~

 

0 Likes
Message 5 of 10

niamh_boyle
Observer
Observer

I'm not sure if it is as it has no issue reading other variables defined in the .res file. I've also tried swapping it out with plain String & the same error message comes up. It 100% has a problem with that function, though, as removing only that line and references to the value after it has been set causes no problems.

0 Likes
Message 6 of 10

niamh_boyle
Observer
Observer

While trying to troubleshooting this issue, I copied over the contents of 'rolloutCreator.ms' and it worked as expected. The file is stored in the 3ds Max 2024\stdplugs\stdscripts\baseLib folder. the same as what is mentioned in the documentation for Max, not sure why the program is unable to see the file.

0 Likes
Message 7 of 10

denisT.MaxDoctor
Advisor
Advisor

I understand that you want to get results with minimum effort... for example, to take and rework an existing script by removing "unnecessary" from it. But that's not how things usually work...

Why, for example, do you use .MCR file and not .MS? Why do you need a resource file and resource variables?
Start simple, understand how things work, and then make it more complicated and specific.

0 Likes
Message 8 of 10

istan
Advisor
Advisor

the script was originally written from Discreet for Max6 😉

0 Likes
Message 9 of 10

denisT.MaxDoctor
Advisor
Advisor

@istan wrote:

the script was originally written from Discreet for Max6 😉


Haha... Can you believe I knew one of the Discreet developers working on it?


There is no reason to continue this tool now. It is technically obsolete. There were a few global flaws at the time - no support for callbacks, no auto-update, no undo/redo, no property customization, etc. If there is a need to improve it, do it better, in a fancy way, using modern interface solutions...

0 Likes
Message 10 of 10

istan
Advisor
Advisor

@denisT.MaxDoctor wrote:


Haha... Can you believe I knew one of the Discreet developers working on it?

Hehe.. why not? Some of them still work for AD, but I think no longer Alex.

Honestly, I kept the sparks SDK database and still find there some useful hints.

0 Likes