Can one Python Script execute another Python Script?


https://forum.reallusion.com/Topic410398.aspx
Print Topic | Close Window

By Data Juggler - 5 Years Ago
If the above is a security risk that could go outside of the IClone Sandbox than what I really need is a way to do the SQL Server equivalent of Go to separate commands.

I am trying to find a work around to being able to apply only one transform to a prop in a single script, or that is what it appears from what I have learned so far.

Is there anyway to execute a script other than Script > Load Python?
If you could than it would be possible to build an external IDE or libraries of transforms / effects, or possibly even turn IClone into a Game Engine like Unity or something. 

I have been sitting in the 'Director's Chair' for the last couple of weeks and have found getting the camera just right is harder than I thought for 3 minutes of continuous motion. Things get easier the 15th or 20th time I do something, and I learn more and get faster but anything I could write to automate the parts I know are correct it sure would save me a lot of time for the events where I decide to start over because the entire world wants to flip over at some point and I can't figure out the cause.

The one thing I have learned is less is more. If I need to go from frames 1500 - 3600, unless an obstacle is in the way I am better off letting IClone smooth it out compared to me trying to estimate the motion at several intervals in between.

I finally figured out the IClone paths and how to use the % complete I want at each frame.




By videodv - 5 Years Ago
Data Juggler (4/21/2019)

Is there anyway to execute a script other than Script > Load Python?
If you could than it would be possible to build an external IDE or libraries of transforms / effects, or possibly even turn IClone into a Game Engine like Unity or something. 




Hi Data Juggler

Not sure if I am understanding this correctly but you can setup your own plugins that run when Iclone starts see Here I have one setup to control various actions of props or charaters.
I also have a script that controls Traffic Lights I run the main traffic light script that imports the traffic light data I have in an other script file. So I think you should at least be able to setup various files for things like transforms effects ect.

As I say Im not sure if I am on the right track here if not just forget this.

Chris.
By The-any-Key - 5 Years Ago
It sounds you just want to create scripts with general functions you can call in a main program. You can do this via modules. Tips is to Google a bit about python and modules. It works like a shared library that you can call when you need it. Also share it with other scrips you make. If you just want to make a script call an external script you can Google "python execute python".