Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Timeline frame interval values

 Post Reply Post Reply
Author
Message
WickedP View Drop Down
Member
Member
Avatar

Joined: 2011 Aug 21
Online Status: Offline
Posts: 461
Post Options Post Options   Quote WickedP Quote  Post ReplyReply Direct Link To This Post Topic: Timeline frame interval values
    Posted: 2017 Nov 21 at 6:20pm

User Information:

Cinema 4D Version:   R14 
Platform:   Windows  ;   
Language(s):     C++  ;   

---------

Hi folks,

are there any algorithms (or code!) available I can use to help in drawing frame markers on a custom timeline? I'm wanting to put in frame markers but would also like to add in frame numbers in a pattern or at intervals that's easy to read. I'm for all intents and purposes wanting to create the same markings as in the timeline, reference image here.

I'm not trying to recreate the timeline function as a whole, only the numbering and frame marker display draw. Cheers,

WP.
WickedP® Developer
http://www.wickedp.com
Back to Top
gr4ph0s View Drop Down
Member
Member


Joined: 2015 Jul 07
Location: France
Online Status: Offline
Posts: 429
Post Options Post Options   Quote gr4ph0s Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Nov 22 at 1:29am
In which context are you? GeDialog? Or Using a custom CtrackData?
If you are in a GeDialog your best bet is to make a GeUserArea, if you are in a CtrackData you get the Draw method wich give you a GeclipMap where you can draw.

Othertwise If you draw something inside the Full timeline, i'm not sure it' will be also displayed on the "tiny timeline" of your screen.

Other suggestion, you can easily create marker, with custom color but maybe you want your own?


Edited by gr4ph0s - 2017 Nov 22 at 1:31am
Technical lover.
Back to Top
WickedP View Drop Down
Member
Member
Avatar

Joined: 2011 Aug 21
Online Status: Offline
Posts: 461
Post Options Post Options   Quote WickedP Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Nov 22 at 2:05am
Hi gr4ph0s,

I already have a user area (in a dialog). I'm fairly adept with the drawing. It's the calculating of the markers and frames at intervals along the timeline (draw area). I'm after an algorithm that might help accomplish this.

How are the markers and frame numbers calculated in the normal timeline for instance? I can get the frame min and max. And hence I know the frame count. But they're not drawing every frame number. I think in the example they draw every second frame as a number? Sometimes it's 5, sometimes it's 10.

How are they calculating these? Is there an algorithm for this that would help?

WP.
WickedP® Developer
http://www.wickedp.com
Back to Top
kuroyume0161 View Drop Down
Member
Member
Avatar

Joined: 2002 Oct 29
Location: United States
Online Status: Offline
Posts: 3665
Post Options Post Options   Quote kuroyume0161 Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Nov 22 at 5:11am
You're best bet would be to find algorithms geared towards drawing graphs with tick-marks and intervallic numbers.  There are definitely algorithms where the number of ticks and numbers can be set and display determined by the space available between two points (either pixels or other units).
Back to Top
WickedP View Drop Down
Member
Member
Avatar

Joined: 2011 Aug 21
Online Status: Offline
Posts: 461
Post Options Post Options   Quote WickedP Quote  Post ReplyReply Direct Link To This Post Posted: 2017 Dec 03 at 11:06pm
Thanks Robert, 

have done some searching and playing around with your suggestions and managed to come up with the following:



Will serve my needs for now! Thanks,

WP.
WickedP® Developer
http://www.wickedp.com
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.