-
-
Notifications
You must be signed in to change notification settings - Fork 26
Making a Python Tool
When I'm making a prototype or sample, I'm doing it quickly without thinking of further prospect. For example we need something complex or something for production. In that case we should think about at least two important things:
- wether the algorithm is quite stable in different scenes and situations. How to test it, some kind of unit testing ?
- very often we will need to use it in a batch execution, because users in motionbuilder usually are working with tons of data and files.
- share parts of the algorithm in other scrips or scenarios, make combinations of scenarios
Before I start, a few words about legent: Action script - I call a script that executes once Tool script - a UI tool that can have buttons to execute different actions and visual elements to change options
And I propose a fundamental way for such criteria Let's separate tool and logic. I've reorganized my repo to have Lib folder and Actions, Tools folders. In Lib I'm putting a class that implements logic part and can be developed in combination with a tool. The Lib can be attached to an action scenario or used in batch tool / scenario (even to run on mobu startup)
That will help to run scenarios through a batch of test scene files. Scenarios should be implemented on the top of tested logic.