Modifier Enable/Disable ModPanel redraw

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Display Modes
  06 June 2018
Originally Posted by denisT: not just a flicker... it also changes sub-object level, modifier selection

Hmmm, I only tested in 2019 but subobject level definitely doesn't change here (modifier selection does, if some other modifiers are selected other than the current one).
__________________
Scripts :: linkedin
 
  06 June 2018
sub-object doesn't change. you are right. i forgot or mixed it up with suspend/resume editing
 
  07 July 2018
Originally Posted by denisT: And the main problem of get+setCurrentObject pair is the flicker or is there something more
Besides the flickering (which can be avoided), if you are in a higher modifier selection, it may display the warning message (if is not turned off).

Do you find any drawbacks using postMessage()? here is nother attempt:

WM_RBUTTONDOWN = 0x0204
WM_KEYDOWN = 0x0100

ESCAPE = 0x1B

listbox_hwnd = /*0x00000000*/

windows.postmessage listbox_hwnd WM_RBUTTONDOWN 0 0
windows.postmessage listbox_hwnd WM_KEYDOWN ESCAPE 0

The only thing I could find is that it stops the animation if is playing.
__________________
Jorge Rodríguez
PolyTools3D
 
  07 July 2018
just tested the last version. It works very well on my version (MAX 2016). The flickering is minimum
 
  07 July 2018
now the question is how to find this listbox for sure?
 
  07 July 2018
Originally Posted by denisT: now the question is how to find this listbox for sure?
The only constant I can see from Max 2010 to 2019 is the Resource ID, but it could change in the future.

So something along this lines may work. Tested in Max 2010 to 2019 in "common" conditions. Not sure if there could be a setup that breaks it. If there is we could try to find another common value across all Max versions, or simply a different approach.

fn GetCommandPanelModifiersListBoxHWND =
(
    id = 0x00000699
    LBHWND
    
    for j in uiaccessor.getpopupdialogs() do
    (    
        for i in windows.getchildrenhwnd j where (uiaccessor.getwindowresourceid i[1]) == id do exit with LBHWND = i[1]
    )    
    
    if LBHWND == undefined do
    (
        for j in windows.getchildrenhwnd #max where (uiaccessor.getwindowresourceid j[1]) == id do exit with LBHWND = j[1]
    )
    
    return LBHWND
)
__________________
Jorge Rodríguez
PolyTools3D
 
  07 July 2018
good find! i think that resource ID is pretty safe and unique identifier. It's always predefined and as we can see stays long time in the system. I think it's the right way to find the list if we know the "task panel" hwnd (technically it's a parent of "Command Panel")  
 
  07 July 2018
Originally Posted by denisT: sub-object doesn't change. you are right. i forgot or mixed it up with suspend/resume editing
i've double checked it again... if we reset current edit object as:

modpanel.setcurrentobject (modpanel.getcurrentobject())

for some modifiers it changes sub-object level to "object"... for example see Skin modifier  
 
reply share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 06:52 AM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.