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
    • Recent
    • Tags
    • Users
    • Login

    Q: Tooldata method signature [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 311 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

      On 13/05/2015 at 01:27, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hi
      In the c4d.Plugins.ToolData class, several of the methods have a "data" basecontainer in their signature. The API description says:

      data (BaseContainer) – The tool settings container.
      

      What does this mean?
      In a plugin i'm making i need to pass drawing coordinates from MouseInput to the Draw method. Can i use this container to pass my coordinates or is this used for something else?

      Any help appreciated.

      Cheers
      Bonsak

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

        On 13/05/2015 at 06:34, xxxxxxxx wrote:

        Hello,

        from your post it looks like you are writing a Python plugin. Is that correct? This is the C++ subforum, for questions regarding the Python API, please use the Python subforum.

        The BaseContainer argument is the BaseContainer holding the current tool settings. These settings are typically defined using the associated dialog. The container can also be accessed with GetToolData().

        So in theory you could use this BaseContainer to communicate. But of course you could simply use member variables in your plugin class to hold data that should be used later.

        Best wishes,
        Sebastian

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

          On 13/05/2015 at 08:46, xxxxxxxx wrote:

          Oops, sorry for posting in the wrong forum. Please move the post.

          Thanks for the help. I ended up with using an instance variable instead.

          Cheers
          Bonsak

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