UI elements disappearing once script is executed

UI elements disappearing once script is executed

Anonymous
Not applicable
308 Views
3 Replies
Message 1 of 4

UI elements disappearing once script is executed

Anonymous
Not applicable
Hi,

I've writted a script where I'm cloning objects and manipulating them, and as an option I can also choose to reduce their keyframes.
All works fine when the option to reduce the keyframes (reducekeys) is not checked. The dialog window is up and I see the progress bar and all is well.
However, if the Reduce Keys option is turned on - once the script reaches that - it hides my script dialog window, and moreover - it hides my Command Panel - which I usually keep on my other monitor (second viewport). When I right-click the toolbars to enable the Command Panel, I see a check next to the Command Panel - meaning it's open - but I can't see it. I need to uncheck and recheck it to get it back.
Furthermore - the Modify panel ceases to work. If I select an object - I can see its name if I choose the "Create" tab, "Hierarchy", "Motion", or "Display" tabs. But - in the "Modify" panel I see nothing and therefore can't click on any button or modifier, add or remove or manipulate my object in any way. I just need to restart 3DSMax for things to work again.

What's going on??

using Max 2008

Thanks.
0 Likes
309 Views
3 Replies
Replies (3)
Message 2 of 4

jeff
Collaborator
Collaborator
It will probably help if you can post the section of code that is executed when "reduce keys" is checked...
Max since 1992 (3d Studio) · Win 10-64 · Wintel workstation · 64 GB RAM · nVidia Quadro RTX 4000 · BB render garden via Deadline
0 Likes
Message 3 of 4

Anonymous
Not applicable
Of course:

if cReduceKeys.checked == true then reducekeys newObj.transform.controller sThresh.value 1f


cReduceKeys is the UI checkbox to enable the option to reduce keys.
newObj is the object to process
sThresh is the spinner that controls the reducekeys threshold.

The scripts works, btw, it doesn't get stuck. It's just that once this option is selected the UI is gone (script dialog window with progress bar etc.).
What actually happens is that reducekey activates Max's own progress bar at the bottom of the screen (the status area under the timeline). I think that when that activates - somehow it kills all other UI elements. I'd be happy to know if there's a way to either cause them to coexist harmoniously or cancel that progress bar under the timeline altogether.

Thanks.
0 Likes
Message 4 of 4

Anonymous
Not applicable
More than a year before, but I've just found this issue. The problem happens when the modify panel is open when the reducekeys() is executed. A simple work-around for that could be:

currentStatus=getCommandPanelTaskMode()
setCommandPanelTaskMode #create

reducekeys newCamera.controller spn_reduce.value 1f

setCommandPanelTaskMode currentStatus


enjoy

ML
0 Likes