Receive input after running a script
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.
On 29/10/2015 at 10:32, xxxxxxxx wrote:
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.
On 30/10/2015 at 10:06, xxxxxxxx wrote:
Thanks Andreas, I will look into ToolData plugin and try and accomplish this.
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