Unable to undock floater
Hi All,
I'm new to Maxscript and am trying to use Joe Gunn's face switcher script in Max 2015. I got it to run now, but once I dock the floater, I am unable to undock it anymore. Any help is much appreciated...I attached the script.
Thanks!
Attachment | Size |
---|---|
faceswitcher_gen.ms | 5.15 KB |
Comments
.
First, define your floater as global variable
Tools and Scripts for Autodesk 3dsMax
Still not working
Thanks for the reply. I tried different ways of incorporating the code you provided and still am not getting back the floating dialog once I dock it. I have been trying to research it, and may seem like I may have to unregister it before? What am I doing wrong? Thanks
)
global FaceFloater = newRolloutFloater "Face Switcher V1.3" 541 263
cUI.RegisterDialogBar FaceFloater style:#(#cUI_floatable,#cUI_dock_left,#cUI_dock_right,#cui_dock_top,#cui_dock_bottom,#cUI_handles)
cui.FloatDialogBar FaceFloater
addRollout first_roll FaceFloater
.
Try this:
- define the floater as global
- run the script
- dock the UI
- then, as separate script, run
cui.FloatDialogBar FaceFloater
If it works, you have to put an If...then...else statement in your main code. It will check if the dock state of the UI. IF the UI is not docked - dock it, if the UI is docked - undock it.
Also, check the code:
Use the UNDOCK button to make the UI floatable.
Tools and Scripts for Autodesk 3dsMax
It works!
I couldn't get it to work in the code itself...not sure how to code the IF statements, but running it as a separate script works! I assigned an icon to this separate command. Thank you for your help...much appreciated!