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

    Receive input after running a script

    Scheduled Pinned Locked Moved PYTHON Development
    4 Posts 0 Posters 365 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 28/10/2015 at 13:08, xxxxxxxx wrote:

      Hey Everyone, I am building a tool that is very similar to the "Transfer" Tool, it allows you to align one object to another. The difference is you have a few more options in the GUI, the ability to separate x,y,z rotation and also x,y,z scale. You also have the ability transfer the objects based upon pivot point or objects center. If anyone knows the align tool in 3dsMax I am recreating it as an exercise to learn c4d Python.

      I have the tool logic working based off selecting two objects then running the script. What I want to do is recreate the same intuitive interface as the "Transfer" Tool. After selecting the first object, how can I have the user select the object in the viewport and receive that data to use in python after running the script? Does anyone has any tips on how to receive user selected input after running a script? I am getting stumped on this.

      Thank you, I appreciate your time.

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

        On 29/10/2015 at 10:32, xxxxxxxx wrote:

        Hi,

        a Python script is probably not what you will want to use for your task, as Python scripts is not really made for user interaction or interactive tools.
        There is no way to receive input after the script ran, either.
        Instead you should take a look at ToolData plugins. Like for example the LiquidPainter from the Python SDK examples.
        And don't worry, writing a Python plugin isn't any more complicated than writing a Python script.

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

          On 30/10/2015 at 10:06, xxxxxxxx wrote:

          Thanks Andreas, I will look into ToolData plugin and try and accomplish this.

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

            On 11/11/2015 at 10:19, xxxxxxxx wrote:

            Hey Andreas, Thanks for pointing me to the ToolData plugin. I am happy to say I have a working version of the tool! For my first plugin I am happy, I know it could be better but if anyone is interested in checking it out it can be found here https://github.com/AndrezAguayo/Cineam4D_Plugins/tree/master/Aligner

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