mScrub - Scrub timeline with mouse wheel

Become a member of the CGSociety

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

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2013   #1
mScrub - Scrub timeline with mouse wheel

Hi everyone, here's what I've been working after seeing the new features of Modo 701, one in particular caught my atention so I thought that 3dsmax users should also have it!




The workflow is, press a key to activate the wheel, scrub back and forth, ctrl+wheel steps in bigger increments (10 frames by default), press another key and get back to work.

I hope to have an alpha version up soon at www.youcandoitvfx.com

Cheers!
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 04 April 2013   #2
How does this tie in with MassFX (mCloth, mParticles, etc)?

-Eric
__________________
"The Evil Monkey hiding in your closet."
 
Old 04 April 2013   #3
Have no idea, I can try later, but technically it should work the same as you scrubbing the timeline manually, nothing fancy going on in the background.
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 04 April 2013   #4
I was talking about the name. ;-)

-Eric
__________________
"The Evil Monkey hiding in your closet."
 
Old 04 April 2013   #5
Hahaha absolutely, but I've been using the mSomethingBranded for a while, actually if you go into the previous beta forum where we discussed names for this.... I think I've sugested something similar apart from Osmium :x
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 04 April 2013   #6
Nice one! In general I feel the whole timeline can use a bit of polish..

-Better scrubbing, like your mScrub thing
-Keyframe snapping
-Zoom controls like in Premiere/After effects and a 'working area' seperate from the range in view
-Markers (as in bookmarks for the timeline)

Reminds me,, I did a vague attempt for keyframe snapping that failed somewhat It calculatea the pixel distance between keyframes on the timeline based on the viewport widths, it linearly linked to that.. when alt is pressed and a keyframe is close while scrubbing the mouse is moved to the x-postion of the target keyframe.. but it all hooked to the registerTimeCallback that is triggered when it moves the mouse to the new position which makes it very unstable.. feel free to do something with it if you have the time


unregisterTimeCallback tracksnap_fn

--globals so they can be reused between different callback events.

global tracksnap_p= point2 0 0
global tracksnap_op= point2 0 0
global tracksnap_t=0
global tracksnap_ot=0
global tracksnap_key = 0
global tracksnap_update = true

fn tracksnap_fn = (
	
	if (tracksnap_update==true) then 
	(
		--get mouse position
		mousepos = dotnetclass "System.Windows.Forms.Cursor"
	
		-- store current and old mouse cursor position in global vars.
		  tracksnap_op=tracksnap_p  
		 tracksnap_p = mousepos.Position
	
	
		-- very  simple key selection, should be smarter
	
		tr1=5  -- snap treshold distance
		tr2=15  -- release distance
		kn=trackbar.getNextKeyTime()
		--kp=trackbar.getPreviousKeyTime()
	
		if (kn==undefined) do ( kn=0 )
		if (kp==undefined) do ( kp=0 )
	
		if (tracksnap_key==undefined)  do ( tracksnap_key=0)
	 
		
		if (abs(tracksnap_key-sliderTime)>tr2) do
		(
			tracksnap_key=sliderTime
			if (abs(kn-sliderTime)<tr1 AND  abs(kn-sliderTime)<abs(kp-sliderTime) ) do ( tracksnap_key=kn )
			if (abs(kp-sliderTime)<tr1 AND  abs(kp-sliderTime)<abs(kn-sliderTime) ) do ( tracksnap_key=kp )
		)
		 
		
		-- get pixel spacing of keyframes on trackbar
		-- ** this assumes 1 maximized viewport or 4 equal sized viewports**
		
		kb=dotNetClass "system.windows.forms.control"
 
		if (tracksnap_key>0  AND  tracksnap_key!=sliderTime AND  kb.modifierKeys==kb.modifierKeys.alt ) then
		(
 
			--calculate new mouse position:
			
			vs=getViewSize() 
			 if (viewport.numViews==1) then
			(
				tb_width=vs.x-139;  --1*viewport size + border - 2x70 = trackviewsize in pixels
			) else
			(
				tb_width=vs.x*2-139;   --2*viewport size + border +-2x70 = trackviewsize in pixels
			)
		
			keyspace=tb_width/((animationRange.end-animationRange.start) as integer )*TicksPerFrame   -- calculate keyframe pixel spacing on trackbar. 
			
				-- set slider to key-time
			timedistance=tracksnap_key-sliderTime  
			--sliderTime = tracksnap_key
			
			 tx = tracksnap_op
			
			 tx.x=tx.x+(((timedistance*keyspace) as float)/TicksPerFrame)  
 
			 mousepos.Position = dotnetobject "System.Drawing.Point"  tx.x tracksnap_p.y  -- move the mouse to new position
		
		 ) else (
			
			tracksnap_key=0
		)
	) else (
		tracksnap_update=true
		)
	
)
	

registerTimeCallback tracksnap_fn
__________________
The GPU revolution will not be rasterized! - http://www.jdbgraphics.nl
 
Old 04 April 2013   #7
Originally Posted by PiXeL_MoNKeY: I was talking about the name. ;-)

-Eric

Nice one! I too didn't understand at first!
__________________
didali
 
Old 04 April 2013   #8
Originally Posted by jonadb: Nice one! In general I feel the whole timeline can use a bit of polish..
-Markers (as in bookmarks for the timeline)


Woudn't "Time Tag" do this?
 
Old 04 April 2013   #9
Nice one artur!

Biggest problem for me sometime is when there are 2000 or more frames in timeline and if I want to move certain keyframe to certain frame number. It doesn't end up perfectly on frame number I want, unless I cut the entire timeline to less frames to get more space to see in timeline.
__________________
www.jhjariwala.com
Demoreel 2012
 
Old 04 April 2013   #10
Great tool !

Just for completeness:

There already exists a similar (but of course less usefull and powerfull ) action in 3ds Max called "Time Slider Capture Toggle". When this is toggled on, you can scrub your timeline with horizontal mouse moves, indepentent of your current mouse cursor
__________________

PowerPreview: High Quality Nitrous Previews for 3ds Max 2012|2013|2014

[ Free Download (ScriptSpot) ]

Home of The Frogs | Online Portfolio
 
Old 04 April 2013   #11
Nice, thanks for all the feedback!

I'm planning on releasing this today, just finishing up some stuff.

As for this first version, you need to assign the macro specifically to SPACEBAR.

Press and hold SPACEBAR

Wheel - Moves back and forth 1 frame
CTRL + Wheel - Moves 10 frames forward or backwards
SHIFT + Wheel - Moves to next or previous keyframe.

Release SPACEBAR and you're done.

I already have some ideas on new features but hopefully this will be handy enough for everyone out there that animates stuff! (Not me for sure!)

Didnt know about the Time Slider tool, I tried searching for something similar so I wouldnt loos time with something that already exists but couldnt find anything similar, expcept for the Modo 701 inspiration of course

I have to confess that while developing I'm using the tool to debug stuff and it becomes really natural to work with.

Anyway, more news today, keep in touch and share the love!
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 04 April 2013   #12
One small FR Can you make it so that tapping the spacebar just starts playing? I've got that setup right now and falls nicely in line with Premiere, After Effects etc..
__________________
The GPU revolution will not be rasterized! - http://www.jdbgraphics.nl
 
Old 04 April 2013   #13
There you go!

http://www.youcandoitvfx.com/?page_id=425
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 04 April 2013   #14
2013.03 changelog:
- Now works on 3dsmax 2010+
- New feature, right click turns on/off trajectory for selected objects
- Fixed playback bugs
__________________
Artur Leao | Co-Founder / Project Manager
You can do it! VFX
Porto/Lisbon - Portugal
http://www.ycdivfx.com
 
Old 04 April 2013   #15
Great tool. I love the modal spacebar idea. I've had Time Slider Capture Toggle mapped to spacebar for years.

Couple of problems.

1. It seems to make a camera named mScrub_Cam. Could you hide that on creation? It's a little distracting. I animate with 2 views (a "game" view and a working perspective view), and the red camera keeps popping up in front of the character.

2. One time the camera stayed in the scene. I think I changed views while the holding the spacebar.

Other requests:

I tend to animate on 5s. It would be nice to have the option to change CTRL Space to 5 frames instead of 10. I guess I can try holding shift...

Finally, I don't like the numbers. I don't need to see them. Maybe a way to disable that?

Thanks again man!
__________________
Juan Martinez | Blog | Animator

Last edited by martinez : 04 April 2013 at 02:41 PM.
 
Thread Closed 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 09:07 AM.


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