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

    Change tool settings with python

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 165 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 08/04/2014 at 16:55, xxxxxxxx wrote:

      Please help.
      I can't figure out how to change the parameters of a tool (ie Knife, Brush, Extrude Tool etc) with python.

      An example would be a script that calls the Knife Tool and sets the Mode to Loop and turns off N-gons

      This is nearly automatic with Coffee. Can it be done on python?
      Please keep in mind that I'm a newb with any coding.

      All suggestions welcome and thanks for the help.

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

        On 17/04/2014 at 12:30, xxxxxxxx wrote:

        Unfortunately, the script log is not very promising. It forgets to add the definition of the tool() 
        function when modifying settings on the current tool.

        You can get the BaseContainer for the current tool using BaseDocument.GetActiveTooldata(), or
        add this to the script log:

        def tool() :
            return doc.GetActiveToolData()
        

        Best,
        -Niklas

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