Skip to content

Conversation

@mirapichai
Copy link
Owner

Import BlendShapes Disabler (Asset Post Processor)

Summary

This PR adds an AssetPostprocessor script that ensures "Import BlendShapes" is always disabled for model assets imported into a specific folder.

What's Included

ImportBlendShapesDisabler.cs

  • A Unity Editor script using AssetPostprocessor
  • Automatically disables importBlendShapes in ModelImporter settings
  • Only runs on assets imported into folders matching a specific path (note: currently hardcoded in a private const string to "Assets/Models/NoBlendShapes" — this can be changed in the script)
  • To use, place model files inside the designated folder, and they will automatically import with blendshapes disabled
  • If the user tries to enable blendshapes in the Inspector, the script will disable the setting again.

Testing

Basic testing was performed by importing .fbx files into the target folder. Upon import, blendshapes were correctly disabled in the Model Import Settings.

Notes

The script and this PR are for learning purposes; it has not been thoroughly tested :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants