On 14/12/2013 at 00:20, xxxxxxxx wrote:
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:
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?
On 14/12/2013 at 05:13, xxxxxxxx wrote:
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.
On 14/12/2013 at 08:04, xxxxxxxx wrote:
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..