On 21/11/2017 at 18:20, xxxxxxxx wrote:
Cinema 4D Version: R14
Platform: Windows ;
Language(s) : C++ ;
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,
On 22/11/2017 at 01:29, xxxxxxxx wrote:
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?
On 22/11/2017 at 02:05, xxxxxxxx wrote:
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?
On 22/11/2017 at 05:11, xxxxxxxx wrote:
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).
On 03/12/2017 at 23:06, xxxxxxxx wrote:
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,