Q: Tooldata method signature [SOLVED]



  • 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



  • 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



  • 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


Log in to reply