Documentation, Plugin Structure, Threading
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 10:46, xxxxxxxx wrote:
Hello,
I just did a call to Maxon, in order to ask about the Python Documentation. They said, here is the place to ask.
So, I'll do
I am looking for the documentation regarding python plugin development (also scripting/XPresso Node).
For example I want to know, how to use the ObjectData, about the plugin-structures, what plugin-types can be built, what are the methods to override or not ?
Also, I guess there must be some kind of information regarding threads and how they get handled by Cinema. Who is calling what, when ?
Where can I find that ??
Thank you very much,
maxx -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 11:29, xxxxxxxx wrote:
Hey Maxx,
The SDK:
http://www.maxon.net/index.php?id=157&L=0All you need is there. Examples, Language Overview, FAQ...
Good Luck.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 12:01, xxxxxxxx wrote:
And if you're still having questions, just ask. If your Question is not *too* dumb we will offer our help and provide sample code.
Cheers, nux -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 12:12, xxxxxxxx wrote:
Yea, thanks. I got the reference already ... but there is no detail about plugins or threading.
It seems to be a blank reference. I do not see any explanation on how to build a plugin or how Cinema handles threads. Also I can't spot anything about resources like dialogs.
Just an example I ran into:
The documentation says:
_<_dt id="c4d.call"_>_
c4d.CallButton
( op , id )Simulate a click of a button.
Parameters:|- op (
BaseList2D
) – The object. - id ( int ) – The ID of the button._/ul>
But if I use the function within XPresso in a Python node, there is an exception:
RuntimeError: Illegal operation. Invalid cross-thread call.So, it seems that function must be called in the main-thread ... or the GUI-thread ... or where ?
In order to not run into such problems, I wanted to read about how Cinema handles threads, callbacks ...
But I can't find any info about it. So, when I get this right, there is no further documentation. In order to code a plugin, I need another plugin, which I can dissect and learn from. This seems not very efficient ?
I got no problem figuring out how individual functions work. But I am missing the big-picture here.
BTW.: The FAQ and the Cookbook are awesome. Couldn't digest that much information at once ...
Thank you,
maxx - op (
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 12:29, xxxxxxxx wrote:
You simply can *not* call a button from a Python Tag, Generator or Node.
The same counts for a MessageDialog, etc. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 12:39, xxxxxxxx wrote:
How to build a plugin:
Create a file, name it myplugin.pyp and put it in a new folder in plugins. You find nine plugin example in the doc.Resources like dialogs:
Tricky, I search in the already existing resource folder of Cinema 4D to see how it works. Individual initiative._<_dt id="c4d.call"_>_
c4d.CallButton
( op , id ) :
I do not know, if you can use that in a python node. Please note, that you have to define at the top of your script:Â import c4d -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 15:05, xxxxxxxx wrote:
maxx, I feel your pain there really is a lack of entry level documentation. one thing I found quite helpful was to look at the SDK examples, even though you have to translate those over from c++, but at least they help to give a rough idea of what's what. It would be great if there were a sort of repository that had a number of Python based samples for various standard tasks. Maybe with gaining popularity it'll come.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/04/2011 at 20:20, xxxxxxxx wrote:
Ok, I see. Was worth a tryÂ
But I guess thats the way I'll go. Take the info from C++ examples. COFFEE I see gives some additional information too ...
Thank you,
maxx -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/04/2011 at 03:32, xxxxxxxx wrote:
The plugin module contains links to information about plugin structure, and all types which can be used to create a plugin. The documentation also contains several Python examples which you can check out.