callback when max is ready/live

callback when max is ready/live

Kreaction
Advocate Advocate
784 Views
7 Replies
Message 1 of 8

callback when max is ready/live

Kreaction
Advocate
Advocate

Hi,

Running max2018.2 I try to run a command that needs max live with UI loaded, basically when user can begin interact with max.

 

I have tried several callbacks, like postSystemStartup, and no one works. It can't change UI as it isn't fully loaded when the callback hit.

 

 

Does anyone know such a callback ?

Which one is the last one sent when max startup ?

0 Likes
785 Views
7 Replies
Replies (7)
Message 2 of 8

Swordslayer
Advisor
Advisor
0 Likes
Message 3 of 8

Kreaction
Advocate
Advocate

I have to check some main menubar menus to delete some entries and recreate some qt menu into main menu.

 

Actually I use a .NET timer to make it run 6sec after script run, but this cause a delay, not optimal. So really need a callback MaxFinishedLoadingOkForUser

0 Likes
Message 4 of 8

Swordslayer
Advisor
Advisor

If you can identify if it already would work or not (properly or by catching an exception, doesn't matter), changing the timer to do a check on tick and running the task together with stopping the timer might be slightly better (in that there wouldn't be the delay), though not all that nice.

0 Likes
Message 5 of 8

Kreaction
Advocate
Advocate
Good idea, will try that. Anyway a real ready callback is more than needed !!!
0 Likes
Message 6 of 8

denisT.MaxDoctor
Advisor
Advisor

the situation is still not clear for me... do you want to change a built-in menus, your own, or anyone's else (third-party)?

 

do you say that at the moment you script (plugin) wants to change something it's not ready (not created, or not drawn, on not added to parent control) ?

 

a using timer is not solution i would use

0 Likes
Message 7 of 8

Kreaction
Advocate
Advocate

Yes, the UI doesn't seems fully loaded or ready, and the script just does nothing.

 

This is indeed a bad solution, but no better one. In max 2014 all worked great just as startup script. Not anymore since max 2016

0 Likes
Message 8 of 8

denisT.MaxDoctor
Advisor
Advisor

you didn't answer all my questions... i still don't know what you want to change. 

0 Likes