ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
By the looks of it not with just maxscript, It can be done with the SDK though if you want to mess around you will need to get the position from the hwnd of the slider
for hwnd in (windows.getChildrenHWND #max) do if hwnd[4] == "TimeSlider" do print hwnd[1]
that prints the hwnd of the "TimeSlider" you also have the "<", "TimeSliderTumb" and ">" representing the buttons on the timeslider..
For what I can see is that just maxscript isnt able to read the positions from those windows so thats why it wouldnt work with that but I can be wrong..
And you could allways hardcode it (if max is allways the same size/position (like maximized)) to the desktop resolution but thats not dynamic at all (just get percentage from 'animationRange.start/end')
hey thanks for the reply!
Yeah i figured it wouldnt be that easy;)
I also got told you could update the dialog to mouseposition whenever the time was changed, and in a crude way that works too. Ill post an update if i get it workin.
Thank you!
Hey again, I managed to get it quite well with just maxscript (found some functions) its now based on the maxwindow size and maxwindow position so not the timeSlider position itself but it works quite allright.
rollout tSlider "timeSlider++" width:120 height:0(
fn setPos =
(
al = (animationRange.end - animationRange.start).frame --> animation length
ap = (abs (animationRange.start - sliderTime).frame)--> animation position
mww = ((getMAXWindowSize())[1] - (GetDialogSize tSlider)[1])--> max window width - dialog width
setDialogPos tSlider [((ap / al)* mww) + (getMAXWindowPos())[1],((getMAXWindowSize())[2] - 93) + (getMAXWindowPos())[2]]--set dialog position [% position + max x pos, max window size - 100 + max window height])
on tSlider open do(
setPos()--move the dialog
tmCb = registerTimeCallback setPos
)
on tSlider close do unRegisterTimeCallback tmCb
)
createDialog tSlider
Just copy/paste it in a new script and run it it will create a dialog without anything on it just its titlebar..
Check createDialog style's to remove that and replace it with a dialog or w/e
Comments
Have you found a way to get
Have you found a way to get the widht of the trackbar?
By the looks of it not with
By the looks of it not with just maxscript, It can be done with the SDK though if you want to mess around you will need to get the position from the hwnd of the slider
for hwnd in (windows.getChildrenHWND #max) do if hwnd[4] == "TimeSlider" do print hwnd[1]
that prints the hwnd of the "TimeSlider" you also have the "<", "TimeSliderTumb" and ">" representing the buttons on the timeslider..
For what I can see is that just maxscript isnt able to read the positions from those windows so thats why it wouldnt work with that but I can be wrong..
And you could allways hardcode it (if max is allways the same size/position (like maximized)) to the desktop resolution but thats not dynamic at all (just get percentage from 'animationRange.start/end')
http://www.impulze.net/
hey thanks for the
hey thanks for the reply!
Yeah i figured it wouldnt be that easy;)
I also got told you could update the dialog to mouseposition whenever the time was changed, and in a crude way that works too. Ill post an update if i get it workin.
Thank you!
Hey again, I managed to get
Hey again, I managed to get it quite well with just maxscript (found some functions) its now based on the maxwindow size and maxwindow position so not the timeSlider position itself but it works quite allright.
Just copy/paste it in a new script and run it it will create a dialog without anything on it just its titlebar..
Check createDialog style's to remove that and replace it with a dialog or w/e
http://www.impulze.net/