Timeline beginner questions
-
On 14/12/2013 at 00:20, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13,14,15
Platform: Windows ;
Language(s) : C++ ;---------
While I have now written C++ tag plugins for 6 months, I am a total beginner when it comes to the timeline. So I hope someone can lead me in the right direction, with my beginner questions:- What on earth does the "BlinkerTrack" CTrackPlugin in the SDK really do? I can do a "Add special tracks" and then add the C++ SDK Blinker to the timeline. But if it is making tea for me, changing the gearbox oil in C4D or just sits there idle - I have no idea. I have no clue. I change the value returned by GetHeight() to something above 0, and then I can expand the track, but still - have no clue.
Now to the real important questions:
Markers: I can add timeline markers easily using AddMarker() in lib_tlmarker.h. But is seems impossible later to detect at what position the marker is, if the user has moved it.
2) Can I detect the marker's position?- Can I add my own kind of markers, i.e. is it allowed to draw on the timeline? What I would like is small dots of a certain color, at specific frames.
- Can I draw between keyframes in the keyframe part on the timeline? For example, I have two keyframes, and I want to indicate that special processing takes place between two keyframes by painting this part with a special color. Then the user can see that between let us say frame 10 and frame 20, special processing takes place, whereas between frame 20 and frame 30 nothing happens. So here the default grey color will be used.
- And while we are at it, can I draw a rectangle in the description part of the Attributes manager?
Like here, I made this in Photoshop. Of course I will draw it in the description of my own plugin, but you get the idea. I want to paint a rectangle (or whatever) to indicate a special condition.
-
On 14/12/2013 at 05:13, xxxxxxxx wrote:
Hi,
I normally do not answer to cpp threads, as there are plenty of people who can answer
these questions much better than me, but I just wanted to say that your threads are
exemplary for describing a problem and the effort you put into them makes it fun to read
them (especially compared to those 'computer says no - PLZ HEALP!!!' postings we get here
alot). As I am already writing, I might also try to answer some of your questions:1. About markers : There is lib_tmarker, markers are unsurprisingly GeListNodes, so the
whole GeListNode approach applies to them.2.About drawing in the timeline. Haven't done it yet, but I know that CTrackData has a
Draw() method which allows you to draw into an expanded track.3.About descriptions. You can write a iCustomGui (and a CustomDataType for it). CustomGuis
are basically just GeDialogs displayed in the description, so you can do almost whatever you
want there. Of course you are then limited to the bounds of your gadget when drawing,
so you cannot draw over another gadget and so on. I think nikklas has recently written
some kind of traffic light customgui (not sure if it had also its own data type or just is an
extension to a tri-state boolean). I think he also made it open source, so you might want
to take a look at his github site.Happy rendering,
Ferdinand -
On 14/12/2013 at 08:04, xxxxxxxx wrote:
https://developers.maxon.net/forum/topic/7415/9206_ctrackdata-plugins&KW=CTrackData&PID=36768#36768
-ScottA
-
On 15/12/2013 at 14:13, xxxxxxxx wrote:
Hi folks, I want to thank you for your help! And I am glad that you think my questions are informative, Ferdinand, I try to make them like that, thinking that making things clear will get the best help and answers.
The Tristate stuff from Niklas opened a few doors. Indeed. I am now able to draw in the Description area. What I am having trouble with understanding, is how on earth I have access to all methods etc inside the GustomGui just by getting the GeData from it. Reading a LONG, yes, I can understand that. But being able to add knots and set ranges etc., like the example Scott provided, is still a mystery to me. But it works. In fact, I also needed just that code for the spline, so thank you so much for this Scott.Yes, another weekend has gone, filled up with trying to figer out how to do things in C4D C++. I like to compare this plugin writing endeavor with this story:
I am dropped over a big city, where I have never been before. There are no street lights, all is dark. The road signs are missing. No street names. My only assistant is a hand torch, the batteries are almost dead. I am totally lost, hadn't it been for some sinister bars, where I muster sufficient courage to enter, and occasionally I friendly dude sits in the corner. He whispers some knowledge in my ear, preventing me from giving up this time, too.Right now, I am inside my GustomGui class. I desperately need access to the BaseDocument. But when you need it the most, the ubiquitous GeListnode of course is missing. So I am stuck. And spend countless hours trying to find out how to do, even the simplest of tasks.
15 years ago I studied the Windows API, and at a time, knew it almost by heart. I still know most of it. And don't need it anymore, because everything is wrapped nowadays, in C# classes. With properties and functions, having descriptive names, in plain English.
This C4D SDK jungle, on the other hand.. Well, hopefully the final result, my plugins, will justify all the spent hours..