View Full Version : how to use pin stack on maxScript with max9?
because on max9 ,
can not use “ ModPanel.SetPinStack() ”
|
|
because on max9 ,
can not use “ ModPanel.SetPinStack() ”
Support for the pin stack was added in Max 2010.
AFAIK, the only solution is to upgrade.
Modify Panel
Pin Stack Button
modpanel.getPinStack()
NEW (http://forums.cgsociety.org/What_is_New_in_MAXScript_in_3ds_Max_2010.htm) in 3ds Max 2010:Returns true if the Pin Stack button is pressed, false if not pressed or not in Modify panel.
modpanel.isPinStackEnabled()
NEW (http://forums.cgsociety.org/What_is_New_in_MAXScript_in_3ds_Max_2010.htm) in 3ds Max 2010:Returns true if the Pin Stack button is enabled, false if not enabled or not in Modify panel.
modpanel.setPinStack <bool>
NEW (http://forums.cgsociety.org/What_is_New_in_MAXScript_in_3ds_Max_2010.htm) in 3ds Max 2010:Sets the Pin Stack button to the specified state as long as the Pin Stack button is enabled.
denisT
10-12-2009, 09:57 PM
fn pressPin = if getCommandPanelTaskMode() == #modify do
(
local toolbar, pin
modp = for w in (windows.getChildrenHWND #max) where w[4] == "ModifyTask" do exit with w[1]
if modp != OK do
(
for w in (windows.getChildrenHWND modp) where w[4] == "CustToolbar" do toolbar = w[1]
if toolbar != undefined do
(
pin = UIAccessor.GetFirstChildWindow toolbar
-- WM_LBUTTON_DOWN = 0x0201
-- WM_LBUTTON_UP = 0x0202
windows.sendMessage pin 0x0201 0 0
windows.sendMessage pin 0x0202 0 0
)
)
)
it's not perfect but better then nothing.
this function toggles the Pin Button ON/OFF
I don't know a way to get the Pin Button state using max script only ...
biddle
10-14-2009, 03:26 PM
You will need the Avguard extensions plugin (from scriptspot.com) in order to call
getChildrenHWND in Max 9 and earlier.
They weren't bundled in until Max 2008. Once you have the plugin it toggles the pin like a charm.
CGTalk Moderation
10-14-2009, 03:26 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.