maya-umbrella 0.6.2__tar.gz → 0.8.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.6.2 → maya_umbrella-0.8.0}/PKG-INFO +23 -4
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/README.md +22 -3
- maya_umbrella-0.8.0/maya_umbrella/__version__.py +1 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/maya_funs.py +11 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/pyproject.toml +3 -3
- maya_umbrella-0.6.2/maya_umbrella/__version__.py +0 -1
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/LICENSE +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/__init__.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/cleaner.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/collector.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/constants.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/defender.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/filesystem.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/hooks/__init__.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/hooks/delete_turtle.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/hooks/delete_unknown_plugin_node.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/hooks/fix_model_panel.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/hooks/fix_on_model_change_3dc.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/i18n.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/locales/en_US.json +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/locales/zh_CN.json +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/log.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/scanner.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/signatures.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/vaccine.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/vaccines/__init__.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/vaccines/vaccine1.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.0}/maya_umbrella/vaccines/vaccine2.py +0 -0
- {maya_umbrella-0.6.2 → maya_umbrella-0.8.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.8.0
|
|
4
4
|
Summary: Check and fix maya virus.
|
|
5
5
|
Home-page: https://github.com/loonghao/maya_umbrella
|
|
6
6
|
License: MIT
|
|
@@ -43,7 +43,7 @@ Description-Content-Type: text/markdown
|
|
|
43
43
|
[](https://img.shields.io/badge/maya-2018-green)
|
|
44
44
|
|
|
45
45
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
46
|
-
[](#contributors-)
|
|
47
47
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
48
48
|
|
|
49
49
|
This tool is designed to provide a robust solution for identifying and resolving any potential viruses within Autodesk
|
|
@@ -141,7 +141,7 @@ MAYA_UMBRELLA_LOG_LEVEL
|
|
|
141
141
|
修改杀毒后文件的备份文件夹名称, 默认是`_virus`
|
|
142
142
|
比如:
|
|
143
143
|
你文件路径是 `c:/your/path/file.ma`
|
|
144
|
-
那么备份文件路径是 `c:/your/path/
|
|
144
|
+
那么备份文件路径是 `c:/your/path/_virus/file.ma`
|
|
145
145
|
```shell
|
|
146
146
|
MAYA_UMBRELLA_BACKUP_FOLDER_NAME
|
|
147
147
|
```
|
|
@@ -154,6 +154,12 @@ MAYA_UMBRELLA_LANG
|
|
|
154
154
|
```shell
|
|
155
155
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
156
156
|
```
|
|
157
|
+
|
|
158
|
+
如果是便携版Maya,可以通过添加 `MAYA_LOCATION` 环境变量指定Maya路径
|
|
159
|
+
```shell
|
|
160
|
+
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
161
|
+
```
|
|
162
|
+
|
|
157
163
|
如果忽略请设置为
|
|
158
164
|
```shell
|
|
159
165
|
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
@@ -169,7 +175,7 @@ api = MayaVirusDefender()
|
|
|
169
175
|
print(api.get_unfixed_references())
|
|
170
176
|
```
|
|
171
177
|
|
|
172
|
-
|
|
178
|
+
批量修复文件, 通过正则表达式
|
|
173
179
|
```python
|
|
174
180
|
from maya_umbrella import MayaVirusScanner
|
|
175
181
|
|
|
@@ -178,6 +184,16 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
178
184
|
|
|
179
185
|
```
|
|
180
186
|
|
|
187
|
+
# 案例
|
|
188
|
+
如果你想要快速通过maya standalone去批量清理maya文件,可以`下载`或者`git clone`当前`main`分支的工程,
|
|
189
|
+
根据上面指引设置好开发环境
|
|
190
|
+
通过`nox`命令去启动maya standalone环境,maya版本根据你当前本地安装的maya为准,比如你本地安装了`2018`,
|
|
191
|
+
那么就是 `nox -s maya-2018-s`
|
|
192
|
+
下面的语法是启动一个maya-2020的环境去动态从`c:/test`文件夹下去查杀病毒
|
|
193
|
+
```shell
|
|
194
|
+
nox -s maya-2020-s -- c:/test/*.m[ab]
|
|
195
|
+
```
|
|
196
|
+
|
|
181
197
|
## Contributors ✨
|
|
182
198
|
|
|
183
199
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
@@ -196,6 +212,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
196
212
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/CGRnDStudio"><img src="https://avatars.githubusercontent.com/u/8320794?v=4?s=100" width="100px;" alt="andyvfx"/><br /><sub><b>andyvfx</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=CGRnDStudio" title="Code">💻</a></td>
|
|
197
213
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cundesi"><img src="https://avatars.githubusercontent.com/u/15829469?v=4?s=100" width="100px;" alt="cundesi"/><br /><sub><b>cundesi</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=cundesi" title="Code">💻</a></td>
|
|
198
214
|
</tr>
|
|
215
|
+
<tr>
|
|
216
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Wenfeng-Zhang"><img src="https://avatars.githubusercontent.com/u/54899080?v=4?s=100" width="100px;" alt="Wenfeng Zhang"/><br /><sub><b>Wenfeng Zhang</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Tests">⚠️</a> <a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Code">💻</a></td>
|
|
217
|
+
</tr>
|
|
199
218
|
</tbody>
|
|
200
219
|
</table>
|
|
201
220
|
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
[](https://img.shields.io/badge/maya-2018-green)
|
|
19
19
|
|
|
20
20
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
|
21
|
-
[](#contributors-)
|
|
22
22
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
|
23
23
|
|
|
24
24
|
This tool is designed to provide a robust solution for identifying and resolving any potential viruses within Autodesk
|
|
@@ -116,7 +116,7 @@ MAYA_UMBRELLA_LOG_LEVEL
|
|
|
116
116
|
修改杀毒后文件的备份文件夹名称, 默认是`_virus`
|
|
117
117
|
比如:
|
|
118
118
|
你文件路径是 `c:/your/path/file.ma`
|
|
119
|
-
那么备份文件路径是 `c:/your/path/
|
|
119
|
+
那么备份文件路径是 `c:/your/path/_virus/file.ma`
|
|
120
120
|
```shell
|
|
121
121
|
MAYA_UMBRELLA_BACKUP_FOLDER_NAME
|
|
122
122
|
```
|
|
@@ -129,6 +129,12 @@ MAYA_UMBRELLA_LANG
|
|
|
129
129
|
```shell
|
|
130
130
|
MAYA_UMBRELLA_IGNORE_BACKUP
|
|
131
131
|
```
|
|
132
|
+
|
|
133
|
+
如果是便携版Maya,可以通过添加 `MAYA_LOCATION` 环境变量指定Maya路径
|
|
134
|
+
```shell
|
|
135
|
+
SET MAYA_LOCATION=d:/your/path/maya_version/
|
|
136
|
+
```
|
|
137
|
+
|
|
132
138
|
如果忽略请设置为
|
|
133
139
|
```shell
|
|
134
140
|
SET MAYA_UMBRELLA_IGNORE_BACKUP=true
|
|
@@ -144,7 +150,7 @@ api = MayaVirusDefender()
|
|
|
144
150
|
print(api.get_unfixed_references())
|
|
145
151
|
```
|
|
146
152
|
|
|
147
|
-
|
|
153
|
+
批量修复文件, 通过正则表达式
|
|
148
154
|
```python
|
|
149
155
|
from maya_umbrella import MayaVirusScanner
|
|
150
156
|
|
|
@@ -153,6 +159,16 @@ print(api.scan_files_from_pattern("your/path/*.m[ab]"))
|
|
|
153
159
|
|
|
154
160
|
```
|
|
155
161
|
|
|
162
|
+
# 案例
|
|
163
|
+
如果你想要快速通过maya standalone去批量清理maya文件,可以`下载`或者`git clone`当前`main`分支的工程,
|
|
164
|
+
根据上面指引设置好开发环境
|
|
165
|
+
通过`nox`命令去启动maya standalone环境,maya版本根据你当前本地安装的maya为准,比如你本地安装了`2018`,
|
|
166
|
+
那么就是 `nox -s maya-2018-s`
|
|
167
|
+
下面的语法是启动一个maya-2020的环境去动态从`c:/test`文件夹下去查杀病毒
|
|
168
|
+
```shell
|
|
169
|
+
nox -s maya-2020-s -- c:/test/*.m[ab]
|
|
170
|
+
```
|
|
171
|
+
|
|
156
172
|
## Contributors ✨
|
|
157
173
|
|
|
158
174
|
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
|
|
@@ -171,6 +187,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|
|
171
187
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/CGRnDStudio"><img src="https://avatars.githubusercontent.com/u/8320794?v=4?s=100" width="100px;" alt="andyvfx"/><br /><sub><b>andyvfx</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=CGRnDStudio" title="Code">💻</a></td>
|
|
172
188
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/cundesi"><img src="https://avatars.githubusercontent.com/u/15829469?v=4?s=100" width="100px;" alt="cundesi"/><br /><sub><b>cundesi</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=cundesi" title="Code">💻</a></td>
|
|
173
189
|
</tr>
|
|
190
|
+
<tr>
|
|
191
|
+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Wenfeng-Zhang"><img src="https://avatars.githubusercontent.com/u/54899080?v=4?s=100" width="100px;" alt="Wenfeng Zhang"/><br /><sub><b>Wenfeng Zhang</b></sub></a><br /><a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Tests">⚠️</a> <a href="https://github.com/loonghao/maya_umbrella/commits?author=Wenfeng-Zhang" title="Code">💻</a></td>
|
|
192
|
+
</tr>
|
|
174
193
|
</tbody>
|
|
175
194
|
</table>
|
|
176
195
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.8.0"
|
|
@@ -10,6 +10,7 @@ try:
|
|
|
10
10
|
import maya.api.OpenMaya as om
|
|
11
11
|
import maya.cmds as cmds
|
|
12
12
|
import maya.mel as mel
|
|
13
|
+
import maya.standalone as maya_standalone
|
|
13
14
|
except ImportError:
|
|
14
15
|
# Backward compatibility to support test in uinstalled maya.
|
|
15
16
|
try:
|
|
@@ -21,8 +22,10 @@ except ImportError:
|
|
|
21
22
|
cmds = MagicMock()
|
|
22
23
|
om = MagicMock()
|
|
23
24
|
mel = MagicMock()
|
|
25
|
+
maya_standalone = MagicMock()
|
|
24
26
|
|
|
25
27
|
# Import built-in modules
|
|
28
|
+
from contextlib import contextmanager
|
|
26
29
|
from functools import wraps
|
|
27
30
|
|
|
28
31
|
|
|
@@ -99,6 +102,7 @@ def block_prompt(func):
|
|
|
99
102
|
Returns:
|
|
100
103
|
function: The decorated function.
|
|
101
104
|
"""
|
|
105
|
+
|
|
102
106
|
@wraps(func)
|
|
103
107
|
def wrap(*args, **kwargs):
|
|
104
108
|
# Grabs the initial value.
|
|
@@ -134,3 +138,10 @@ def save_as_file(file_name):
|
|
|
134
138
|
"""
|
|
135
139
|
cmds.file(rename=file_name)
|
|
136
140
|
cmds.file(s=True, f=True)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@contextmanager
|
|
144
|
+
def maya_standalone_context():
|
|
145
|
+
maya_standalone.initialize()
|
|
146
|
+
yield cmds
|
|
147
|
+
maya_standalone.uninitialize()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "maya_umbrella"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.8.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.8.0"
|
|
40
40
|
tag_format = "v$version"
|
|
41
41
|
version_files = [
|
|
42
42
|
"pyproject.toml:version",
|
|
@@ -128,8 +128,8 @@ exclude = [
|
|
|
128
128
|
"site-packages",
|
|
129
129
|
"venv",
|
|
130
130
|
"dev",
|
|
131
|
+
"maya_umbrella/_vendor/",
|
|
131
132
|
"noxfile.py",
|
|
132
|
-
"maya_umbrella/_vendor/"
|
|
133
133
|
]
|
|
134
134
|
line-length = 120
|
|
135
135
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.2"
|
|
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
|
{maya_umbrella-0.6.2 → maya_umbrella-0.8.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
|