سؤال

When I create Maxscript scripts in 3DSMAX I place them in the startup folder in the installation directory of Max and start them via the MAXScript section under Utilities.

When I make changes however I need to restart Max in order for it to load the scripts again before they take affect.

How can I force Max to reload the scripts in the startup folder?

هل كانت مفيدة؟

المحلول

Do you have any reason to use this approach? Instead of using scripted utilities, have a look at rollout floaters or dialogs, both ways are much more manageable and user friendly. To make your scripts easily accessible, wrap them in macroscript definition or just run them via MAXScript menu in the menubar.

For example for a sample utility like this

utility main "Main"
(
    rollout sub "Rollout"
    (
        button btn "Button"
    )
)

the dialog version would be

try destroyDialog sub catch()
rollout sub "Rollout"
(
    button btn "Button"
)
createDialog sub

and the macroscript definition

macroscript main category:"MyTools" buttonText:"Main"
(
    rollout sub "Rollout"
    (
        button btn "Button"
    )

    on execute do
    (
        destroyDialog sub
        createDialog sub
    )
)
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top