Render.ru

Помогите вынести кнопку на toolbars

Рейтинг
95
#1
Вроде задача простая, а сделать не вышло =)

вынести на тулбар кнопку для:
Utilites/Measure/New Floater

через Customize User Interface не удалось, не нашел там этого...
pic_3_1.jpg
 
Рейтинг
318
#4
можно вытащить на кнопку

UtilityPanel.OpenUtility measure

А вот дальше There is currently no access to the Measure Utility from MAXScript

Хотя вот от Bobo

macroScript OpenMeasureFloater
category:"Forum Help"
buttontext:"Measure!"
tooltip:"Open the Measure Floater with one click!"
(
fn openMeasureFloater =
(
local result = false --flag for success/failure
local oldPannel = getCommandPanelTaskMode() --remember the old command panel tab
UtilityPanel.OpenUtility measure --open Utility tab and enable Measure Utility
local theMeasureUtil = windows.getChildHWND #max "Measure" --grab the Measure's rollout handle
if theMeasureUtil.count > 0 do --if it was found,
(
local theButton = windows.getChildHWND theMeasureUtil[2] "New Floater" --get the New Floater button's handle
if theButton.count > 0 do --if this succeeded too, then send messages to click it
(
Windows.sendMessage theButton[1] 0x201 0 0 --Left Mouse Button Down
Windows.sendMessage theButton[1] 0x202 0 0 --Left Mouse Button Up
result = true --raise the flag for success
)
)
setCommandPanelTaskMode oldPannel --switch back to the previous command panel tab
result --return result
)

openMeasureFloater()
)

ап. Нифига себе секас - бобо скриптом мышку двигает :)

http://forums.cgsociety.org/archive/index.php/t-996829.html
 
Последнее редактирование:
Рейтинг
318
#6
у меня работает - макс 2015. Больше ничем помочь не могу - пусть знатоки максскрипта пороются :)
 
Рейтинг
95
#8
Попробуйте так:
Код:
UtilityPanel.OpenUtility measure
mnf=windows.getChildHWND #max "New Floater"
windows.sendMessage mnf[1] 0x00F5 0 0
отлично, работает !
а не подскажете, возможно ли отрегулировать появление этого меню не по центру экрана, а смещённое в сторону, вправо вверху ?
 
Сверху