How trevisangmw/gt-tools works
Main Components
• Core Engine (gt/core): This is the backbone of GT Tools. It contains fundamental operations for tasks like animation (anim.py), camera management, rigging, data management (including a large collection of curve and mesh data), and various utility functions. It is where the “business logic” of the tools resides.
• User Interface (gt/ui): This module contains the UI components such as file dialogs, progress bars, custom widgets, and Qt utilities. It provides the graphical front-end for interacting with the tools inside Maya.
• Utilities (gt/utils): A set of standalone helper functions (e.g. network request, system info) that are used across various tools.
• Tests (gt/tests): A comprehensive test suite that includes tests for core functionalities, UI interactions, and individual tools. This ensures that the components work as expected and can be updated safely.
• Setup/Installation: Files such as setup_drag_drop_maya.py and related configuration scripts that manage installation, uninstallation, and “run only” operations by integrating the package with Maya’s environment.
Relationships and Interactions
• The Setup Module interacts with Maya directly by being drag-and-dropped onto the Maya viewport. It is responsible for installing/uninstalling or temporarily loading the entire GT Tools package.
• The auto-loaded menu (triggered via the installation process) acts as a hub for the user to access the various tools. From this menu, users can launch the different tools.
• Tools within the gt/tools directory use functions from gt/core to perform tasks (e.g., rigging functions, joint manipulation, curve creation) and display results through the UI components.
• The UI (gt/ui) serves as an intermediary for user commands which then call the underlying controller logic in the individual tools.
• The utility functions in gt/utils are used both by the core and the tools to perform generic tasks like network requests, system checks, or file handling.
• The tests modules interact (in a simulated way) with nearly all components to validate their correctness. They are an important part of the architecture that ensures long-term maintainability.
Architectural Patterns and Design Principles
• Modular Design: Components are clearly segregated into core functionalities, tools, UI, and utilities, making each relatively independent and reusable.
• MVC/MVVM (or similar): Several tool directories include controllers, models, and views (e.g., in auto-rigger and curve_library), suggesting that many tools adhere to a Model-View-Controller structure, which separates business logic from UI logic.
• Plugin/Extension Architecture: Given the presence of many separate tool directories under gt/tools, the system is designed to be extensible; new tools can be added with little impact on existing code.
• Testing and Isolation: The presence of numerous unit tests for core, UI, and tool-specific functions indicates a strong emphasis on reliability and maintainability.
Relevant Technologies
• Python scripting (Python modules and packages) is the core language for the repository.
• Autodesk Maya as the host environment, with scripts designed to be loaded and executed inside Maya.
• Qt (via the gt/ui module) for building custom user interfaces within the Maya environment.
• Use of file-based “data” resources such as curves (in .crv format) and meshes (in .obj format) that the tools manipulate within Maya.
Elements
• Clear labels:
• Core Engine (gt/core)
• UI Layer (gt/ui)
• Utilities (gt/utils)
• Test Suite (gt/tests)
• Setup/Install Scripts (setup_drag_drop_maya.py and related files)
• From the Setup module to Maya integration.
• From each tool to the core and UI components.
• From UI to Tools (e.g., commands from the Maya menu triggering tool actions).