A better Autodesk Maya antivirus tool that detects and removes malicious code.
This tool is designed to provide a robust solution for identifying and resolving any potential viruses within Autodesk Maya. It ensures a secure and seamless user experience by proactively scanning for threats and effectively neutralizing them.
It can be provided as an API for seamless integration into your existing pipeline.
maya_umbrella is distributed as a standard pipy package, so we can install it via pip install.
your/maya-root/mayapy -m pip install maya-umbrellaDownload the corresponding version of the zip package in the release, unzip it and double-click install.bat to install it.
Update version
your/maya-root/mayapy -m pip install maya-umbrella --upgradeUninstall
your/maya-root/mayapy -m pip uninstall maya-umbrellaSet up the development environment using a virtual environment, and it is recommended to use Python 3.8 or higher versions.
Install development dependencies via pip
pip install -r requirements-dev.txtWith nox -s maya -- <maya version>, start Maya.
Nox will dynamically register a nox session based on your local installation of Maya,
e.g. if you have maya-2018 installed locally, then you can start Maya with a test environment.
nox -s maya -- 2018Note: there are two - between maya and the version number.
After starting Maya, executing the following code in the script editor will dynamically open the ma file from <repo>/tests/virus/ to test it.
import manual_test_in_maya
manual_test_in_maya.start()It is also possible to execute the corresponding tests via pytest, which also requires a local installation of the corresponding Maya
nox -s maya -- 2018 --testNote: Command line crash may occur in versions below maya-2022 (PY2).
Create a new py in <repo>/maya_umbrella/vaccines/. Since many viruses don't have a specific name, we'll use vaccine<id>.py.
Inherit from maya_umbrella.vaccine import AbstractVaccine and call the class Vaccine, and then write the virus collection logic.
We can use the encapsulated nox command to perform a code check.
nox -s lintFormat code
nox -s lint-fixExecute the following command to create a zip under /.zip, with --version the version number of the current tool.
Note: between make-zip and --version there are two -.
nox -s make-zip -- --version 0.5.0We can use the following environment variables to modify some of the settings of maya_umbrella, so that companies with pipelines can better integrate them.
Modify the log saving directory of maya umbrella, the default is the windows temp directory.
MAYA_UMBRELLA_LOG_ROOTChange the name of the log file for maya umbrella, default is maya_umbrella.
MAYA_UMBRELLA_LOG_NAMESet the log level, the default is info, can be debug can see more log information.
MAYA_UMBRELLA_LOG_LEVELChange the name of the backup folder for antivirus files, default is _virus.
For example:
Your file path is c:/your/path/file.ma.
Then the backup file path is c:/your/path/_virus/file.ma.
MAYA_UMBRELLA_BACKUP_FOLDER_NAMEThe default display language, including logging printouts, etc. is set by default according to your current maya interface language, but of course we can also set it via the following environment variables.
MAYA_UMBRELLA_LANGIgnore saving to the backup folder, please note that if you are not clear about the consequences of this please do not modify it easily, the default batch antivirus will automatically back up the source file to the current file's backup folder after the batch antivirus.
MAYA_UMBRELLA_IGNORE_BACKUPIf ignored please set to
SET MAYA_UMBRELLA_IGNORE_BACKUP=trueFor the portable version of Maya,
you can specify the Maya path by adding the MAYA_LOCATION environment variable.
SET MAYA_LOCATION=d:/your/path/maya_version/You can also specify a directory from the command line.
nox -s maya -- 2018 --install-root /your/local/maya/root
Get virus files that have not been repaired in the current scenario.
from maya_umbrella import MayaVirusDefender
api = MayaVirusDefender()
print(api.get_unfixed_references())Batch repair of files, via regular expressions.
from maya_umbrella import MayaVirusScanner
api = MayaVirusScanner()
print(api.scan_files_from_pattern("your/path/*.m[ab]"))If you want to quickly go through maya standalone and batch clean up maya files.
You can either download or git clone the current main branch.
Set up your development environment according to the guidelines above,
and Use the nox command to start the maya standalone environment,
the version of maya is based on your current local installation of maya.
For example, if you have 2018 installed locally, Then nox -s maya -- 2018 --standalone.
The following syntax starts a maya-2020 environment to dynamically check for viruses from the c:/test folder.
nox -s maya -- 2018 --standalone --pattern c:/test/*.m[ab]Thanks goes to these wonderful people (emoji key):
Hal 💻 🚇 |
hotwinter0 |
lingyunfx |
yjjjj |
Unclechen |
andyvfx 💻 |
cundesi 💻 |
Wenfeng Zhang |
rickdave 🐛 |
This project follows the all-contributors specification. Contributions of any kind are welcome!
