THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 07/11/2012 at 11:58, xxxxxxxx wrote:
> >> I know, that my code looks awfull._
Well, you're learning, as everyone here is. You'll write more clear code by time for sure.
> >> I still have problems of understanding classes, initialistaion and the rest of this objectbased
I can really really recommend the official Python tutorial. It allows you to dive in very quickly. It
is easy to understand and starts from bottom up. Once I was starting out with Python, I read it
although I have been trying to write Python for about a month already (and had over a year
experience with COFFEE). It helped me a lot understanding the mechanisms of Python and of
OOP programming in general.
_> >> I now use the method, as you said (was it wrong the way I did it (it wasnt object oriented
>>> right?)) _
Not necessarily because of that reason (it actually was kind of OOP, however), but it is
- easier to read
- I don't know about the internals of Py4D, but it could be possible that there is a reason
the method was implemented (either just for convenience, or maybe it does some
> >> for the naming conventions... I will have a look at them, thats a good thing. _
It's not just for making it easier to read (because you immediately know what the symbol
belongs to), but also prevents naming collisions (as I stated in the thread linked above).
> >> my execute is just a shortend version (as mentioned)
I must have missed that, sorry.
> >> and unfortunately havent seen a answer to it in your post
That is due to the fact that there was no direct answer in my post. I think the problem lies
in the Execute() method, therefore it's a good thing that you have posted the complete code
now. As I didn't read it was the "shortened" version, I was wondering if this is really the complete code.
> >> so they are suppoed to be named TTIMELINEONOFF and TCAMONOFF
No. Symbols in Cinema 4D are prefixed with what they belong to (also mentioned in the thread
linked above). Like MSG_~, PRIM_~, COLOR_~, SPLINECONTROL_~. Therefore, it is recommended
to prefix your symbols with PLUGINNAME_~. This avoids name-collisions and is easier (especially
for others) when reading your code.
Description-symbols are embedded into the c4d module (that's why names can collide). When your
plugin is installed, you can do "print c4d.TIMELINEONOFF" for example, and it will yield 1001 in
Unfortunately I currently cannot see the issue directly from the code. Is it possible that
you upload the complete plugin-folder (including resource files) somewhere? If you want, I can
try to find the issue and correct your code.
Just FYI, the way you store the information (frame, offset, zoom) is not OOP style.