maya-umbrella 0.7.0__tar.gz → 0.9.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of maya-umbrella might be problematic. Click here for more details.
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/PKG-INFO +20 -7
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/README.md +19 -6
- maya_umbrella-0.9.0/maya_umbrella/__version__.py +1 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/filesystem.py +28 -1
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/pyproject.toml +2 -2
- maya_umbrella-0.7.0/maya_umbrella/__version__.py +0 -1
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/LICENSE +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/__init__.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/cleaner.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/collector.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/constants.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/defender.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/hooks/__init__.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/hooks/delete_turtle.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/hooks/delete_unknown_plugin_node.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/hooks/fix_model_panel.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/hooks/fix_on_model_change_3dc.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/i18n.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/locales/en_US.json +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/locales/zh_CN.json +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/log.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/maya_funs.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/scanner.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/signatures.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/vaccine.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/vaccines/__init__.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/vaccines/vaccine1.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/vaccines/vaccine2.py +0 -0
- {maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/vaccines/vaccine3.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: maya_umbrella
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9.0
|
|
4
4
|
Summary: Check and fix maya virus.
|
|
5
5
|
Home-page: https://github.com/loonghao/maya_umbrella
|
|
6
6
|
License: MIT
|
|
@@ -53,10 +53,15 @@ It ensures a secure and seamless user experience by proactively scanning for thr
|
|
|
53
53
|
It can be provided as an API for seamless integration into your existing pipeline.
|
|
54
54
|
|
|
55
55
|
# 安装
|
|
56
|
+
|
|
57
|
+
## pip 安装
|
|
56
58
|
maya_umbrella是以标准pipy包去发布的,所以我们可以通过pip install去安装
|
|
57
59
|
```shell
|
|
58
60
|
your/maya-root/mayapy -m pip install maya-umbrella
|
|
59
61
|
```
|
|
62
|
+
## 一键安装
|
|
63
|
+
在release里面下载对应版本的zip包,解压后双击`install.bat`即可安装
|
|
64
|
+
|
|
60
65
|
更新版本
|
|
61
66
|
```shell
|
|
62
67
|
your/maya-root/mayapy -m pip install maya-umbrella --upgrade
|
|
@@ -80,13 +85,15 @@ pip install nox poetry
|
|
|
80
85
|
# 开发调试
|
|
81
86
|
|
|
82
87
|
```shell
|
|
83
|
-
nox -s maya
|
|
88
|
+
nox -s maya -- 2020 --test
|
|
84
89
|
```
|
|
85
90
|
|
|
86
91
|
## 在maya中测试
|
|
87
92
|
|
|
88
|
-
通过`nox -s maya
|
|
89
|
-
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020
|
|
93
|
+
通过`nox -s maya -- <maya version>`, 启动maya.
|
|
94
|
+
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,
|
|
95
|
+
|
|
96
|
+
那么通过`nox -s maya -- 2018`, **注意:maya 与 版本号之间有 俩个`-`**
|
|
90
97
|
|
|
91
98
|
启动maya后在脚本编辑器中执行下面得代码,就会动态的从`<repo>/tests/virus/`里面去open ma文件去进行测试.
|
|
92
99
|
|
|
@@ -112,7 +119,7 @@ nox -s ruff_check
|
|
|
112
119
|
# 生成安装包
|
|
113
120
|
|
|
114
121
|
执行下面的命令可以在<repo>/.zip下面创建zip,参数 `--version` 当前工具的版本号
|
|
115
|
-
|
|
122
|
+
**注意:`make-zip` 与 `--version`之间有 俩个`-`**
|
|
116
123
|
```shell
|
|
117
124
|
nox -s make-zip -- --version 0.5.0
|
|
118
125
|
```
|
|
@@ -154,6 +161,12 @@ MAYA_UMBRELLA_LANG
|
|
|
154
161
|
```shell
|
|
155
162
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
156
163
|
```
|
|
164
|
+
|
|
165
|
+
如果是便携版Maya,可以通过添加 `MAYA_LOCATION` 环境变量指定Maya路径
|
|
166
|
+
```shell
|
|
167
|
+
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
168
|
+
```
|
|
169
|
+
|
|
157
170
|
如果忽略请设置为
|
|
158
171
|
```shell
|
|
159
172
|
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
@@ -181,8 +194,8 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
181
194
|
# 案例
|
|
182
195
|
如果你想要快速通过maya standalone去批量清理maya文件,可以`下载`或者`git clone`当前`main`分支的工程,
|
|
183
196
|
根据上面指引设置好开发环境
|
|
184
|
-
通过`nox`命令去启动maya standalone
|
|
185
|
-
那么就是 `nox -s maya
|
|
197
|
+
通过`nox`命令去启动maya `standalone`环境,maya版本根据你当前本地安装的maya为准,比如你本地安装了`2018`,
|
|
198
|
+
那么就是 `nox -s maya -- 2018 --standalone`
|
|
186
199
|
下面的语法是启动一个maya-2020的环境去动态从`c:/test`文件夹下去查杀病毒
|
|
187
200
|
```shell
|
|
188
201
|
nox -s maya-2020-s -- c:/test/*.m[ab]
|
|
@@ -28,10 +28,15 @@ It ensures a secure and seamless user experience by proactively scanning for thr
|
|
|
28
28
|
It can be provided as an API for seamless integration into your existing pipeline.
|
|
29
29
|
|
|
30
30
|
# 安装
|
|
31
|
+
|
|
32
|
+
## pip 安装
|
|
31
33
|
maya_umbrella是以标准pipy包去发布的,所以我们可以通过pip install去安装
|
|
32
34
|
```shell
|
|
33
35
|
your/maya-root/mayapy -m pip install maya-umbrella
|
|
34
36
|
```
|
|
37
|
+
## 一键安装
|
|
38
|
+
在release里面下载对应版本的zip包,解压后双击`install.bat`即可安装
|
|
39
|
+
|
|
35
40
|
更新版本
|
|
36
41
|
```shell
|
|
37
42
|
your/maya-root/mayapy -m pip install maya-umbrella --upgrade
|
|
@@ -55,13 +60,15 @@ pip install nox poetry
|
|
|
55
60
|
# 开发调试
|
|
56
61
|
|
|
57
62
|
```shell
|
|
58
|
-
nox -s maya
|
|
63
|
+
nox -s maya -- 2020 --test
|
|
59
64
|
```
|
|
60
65
|
|
|
61
66
|
## 在maya中测试
|
|
62
67
|
|
|
63
|
-
通过`nox -s maya
|
|
64
|
-
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020
|
|
68
|
+
通过`nox -s maya -- <maya version>`, 启动maya.
|
|
69
|
+
nox会动态根据你本地安装得maya去注册nox session, 比如你本地安装了`maya-2020`,
|
|
70
|
+
|
|
71
|
+
那么通过`nox -s maya -- 2018`, **注意:maya 与 版本号之间有 俩个`-`**
|
|
65
72
|
|
|
66
73
|
启动maya后在脚本编辑器中执行下面得代码,就会动态的从`<repo>/tests/virus/`里面去open ma文件去进行测试.
|
|
67
74
|
|
|
@@ -87,7 +94,7 @@ nox -s ruff_check
|
|
|
87
94
|
# 生成安装包
|
|
88
95
|
|
|
89
96
|
执行下面的命令可以在<repo>/.zip下面创建zip,参数 `--version` 当前工具的版本号
|
|
90
|
-
|
|
97
|
+
**注意:`make-zip` 与 `--version`之间有 俩个`-`**
|
|
91
98
|
```shell
|
|
92
99
|
nox -s make-zip -- --version 0.5.0
|
|
93
100
|
```
|
|
@@ -129,6 +136,12 @@ MAYA_UMBRELLA_LANG
|
|
|
129
136
|
```shell
|
|
130
137
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
131
138
|
```
|
|
139
|
+
|
|
140
|
+
如果是便携版Maya,可以通过添加 `MAYA_LOCATION` 环境变量指定Maya路径
|
|
141
|
+
```shell
|
|
142
|
+
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
143
|
+
```
|
|
144
|
+
|
|
132
145
|
如果忽略请设置为
|
|
133
146
|
```shell
|
|
134
147
|
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
@@ -156,8 +169,8 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
156
169
|
# 案例
|
|
157
170
|
如果你想要快速通过maya standalone去批量清理maya文件,可以`下载`或者`git clone`当前`main`分支的工程,
|
|
158
171
|
根据上面指引设置好开发环境
|
|
159
|
-
通过`nox`命令去启动maya standalone
|
|
160
|
-
那么就是 `nox -s maya
|
|
172
|
+
通过`nox`命令去启动maya `standalone`环境,maya版本根据你当前本地安装的maya为准,比如你本地安装了`2018`,
|
|
173
|
+
那么就是 `nox -s maya -- 2018 --standalone`
|
|
161
174
|
下面的语法是启动一个maya-2020的环境去动态从`c:/test`文件夹下去查杀病毒
|
|
162
175
|
```shell
|
|
163
176
|
nox -s maya-2020-s -- c:/test/*.m[ab]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.9.0"
|
|
@@ -97,7 +97,6 @@ def atomic_writes(src, mode, **options):
|
|
|
97
97
|
shutil.move(temp_path, src)
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
|
|
101
100
|
def id_generator(size=6, chars=string.ascii_uppercase + string.digits):
|
|
102
101
|
"""Generate a random string of the given size using the given characters."""
|
|
103
102
|
return "".join(random.choice(chars) for _ in range(size))
|
|
@@ -266,3 +265,31 @@ def get_backup_path(path, root_path=None):
|
|
|
266
265
|
except (OSError, IOError): # noqa: UP024
|
|
267
266
|
pass
|
|
268
267
|
return os.path.join(backup_path, filename)
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
def get_maya_install_root(maya_version):
|
|
271
|
+
"""Get the Maya install root path."""
|
|
272
|
+
maya_location = os.environ.get("MAYA_LOCATION")
|
|
273
|
+
try:
|
|
274
|
+
# Import built-in modules
|
|
275
|
+
import winreg
|
|
276
|
+
except ImportError:
|
|
277
|
+
return maya_location
|
|
278
|
+
try:
|
|
279
|
+
key = winreg.OpenKey(
|
|
280
|
+
winreg.HKEY_LOCAL_MACHINE,
|
|
281
|
+
"SOFTWARE\\Autodesk\\Maya\\{maya_version}\\Setup\\InstallPath".format(maya_version=maya_version),
|
|
282
|
+
)
|
|
283
|
+
root, _ = winreg.QueryValueEx(key, "MAYA_INSTALL_LOCATION")
|
|
284
|
+
if not os.path.isdir(root):
|
|
285
|
+
print("Failed to locate the appropriate Maya path in the registration list.")
|
|
286
|
+
except OSError:
|
|
287
|
+
return maya_location
|
|
288
|
+
maya_location = maya_location or root
|
|
289
|
+
if not maya_location:
|
|
290
|
+
print("maya not found.")
|
|
291
|
+
return
|
|
292
|
+
maya_exe = os.path.join(maya_location, "bin", "maya.exe")
|
|
293
|
+
if not os.path.exists(maya_exe):
|
|
294
|
+
print("maya.exe not found in {maya_location}.".format(maya_location=maya_location))
|
|
295
|
+
return maya_location
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "maya_umbrella"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.9.0"
|
|
4
4
|
description = "Check and fix maya virus."
|
|
5
5
|
homepage = "https://github.com/loonghao/maya_umbrella"
|
|
6
6
|
repository = "https://github.com/loonghao/maya_umbrella"
|
|
@@ -36,7 +36,7 @@ nox = { version = "^2024.3.2", python = ">=3.8.1,<3.11" }
|
|
|
36
36
|
|
|
37
37
|
[tool.commitizen]
|
|
38
38
|
name = "cz_conventional_commits"
|
|
39
|
-
version = "0.
|
|
39
|
+
version = "0.9.0"
|
|
40
40
|
tag_format = "v$version"
|
|
41
41
|
version_files = [
|
|
42
42
|
"pyproject.toml:version",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.7.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{maya_umbrella-0.7.0 → maya_umbrella-0.9.0}/maya_umbrella/hooks/delete_unknown_plugin_node.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|