Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Documentation, Plugin Structure, Threading

    Scheduled Pinned Locked Moved PYTHON Development
    9 Posts 0 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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=0

        All you need is there. Examples, Language Overview, FAQ...

        Good Luck. 😉

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • H Offline
              Helper
              last edited by

              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.

              1 Reply Last reply Reply Quote 0
              • H Offline
                Helper
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    Helper
                    last edited by

                    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

                    1 Reply Last reply Reply Quote 0
                    • H Offline
                      Helper
                      last edited by

                      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.

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post