Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avatar Toolkit Overhaul - Do not merge yet #81

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Yusarina
Copy link
Member

@Yusarina Yusarina commented Dec 2, 2024

I'm have started an overhaul of Avatar Toolkit to enhance stability, maintainability, and organization. Once this PR has been merge it should mean the first Alpha release can happen. Therefor please do not merge unto I have gotten everything done.

Key Improvements so far:

Plugin Registration System:

  • Implemented a modern auto-registration system
  • Eliminated manual @register_wrapper decorators in favor of automatic class detection
  • Removed legacy "bpy" local variable checks

New Auto-loader Implementation

  • Added auto_load.py for robust module management, more modern approach and less error prone.
  • Automatic module discovery and dependency resolution
  • Optimized registration/unregistration sequence through topological sorting

File Structure Reorganization

  • I started to add additional folders, the plugin is getting larger and larger and I don't like having 30 files in one folder. Importers have been moved to their own folder, same with exporters in the core folder.
  • I will be doing more code and file re-organization.
  • Translation has been moved to core folder as it's more of a core system.

There are more changes, and more changes needed to get all the functions working again seeing I basically changed a core component so late on, but it's looking better then before.

Initial implementation shows promising results, but testing is still in progress.

- Re-wrote how the plugin registers itself.
- No longer need @register_wrapper classes get auto detected and added.
- The new Auto loader is much better then the old way, no longer need "if "bpy" not in locals():" this was an old way of doing things and wasn't really efficient.

 using auto_load.py provides several advantages:

- It automatically discovers and loads all modules in the addon.
- It handles dependencies between classes correctly through topological sorting.
- It manages registration order automatically.
- It properly handles unregistration in the correct order.

This approach is much less error prone and I not had any issues so far. However it still needs testing fully.

I have also start to re-organise files into folders as well, this is going to be needed so we don't have a long list of files as Avatar Toolkit is getting larger then i originally planned.
@Yusarina Yusarina added bug Something isn't working enhancement New feature or request labels Dec 2, 2024
@Yusarina Yusarina added this to the 0.1.0 Alpha (Blender 4.3) milestone Dec 2, 2024
@Yusarina Yusarina self-assigned this Dec 2, 2024
@Yusarina Yusarina changed the title Avatar Toolkit Overhaul - Do not merge Avatar Toolkit Overhaul - Do not merge yet Dec 2, 2024
This fixes is to get everything working on the new auto load and properties system.
Also some other small fixes.
I decided to go through each function and UI section one by one, improving and overhauling things. Each function and section is going to be fully tested and not rushed out.

This is the best way to catch things, but also include the code base as much as possible.
@Yusarina
Copy link
Member Author

Yusarina commented Dec 3, 2024

I decided to go through each function and UI section one by one, improving and overhauling things. Each function and section is going to be fully tested and not rushed out.

This is the best way to catch things, but also include the code base as much as possible. This mean most functions have been removed unto I go through them, there will be added back slowly.

I truly want the overhaul to be the best the toolkit can offer so we can finally get the Alpha out. The plan is as I stated before that this overhaul will end up being the first Alpha.

Pose mode Improvements:

Batch processing for all mesh operations
Numpy-powered vertex array handling
Optimized modifier stack management
Smart shape key processing
Enhanced progress tracking

The armature validation system improvements:

Essential bones (hips, spine, chest, neck, head)
Proper bone hierarchy validation
Symmetry pair verification (e.g., arm.l/arm.r)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant