maya-umbrella 0.15.0__tar.gz → 0.16.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.
Files changed (41) hide show
  1. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/PKG-INFO +30 -1
  2. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/README.md +29 -0
  3. maya_umbrella-0.16.0/maya_umbrella/__version__.py +1 -0
  4. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/filesystem.py +45 -1
  5. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/pyproject.toml +2 -2
  6. maya_umbrella-0.15.0/maya_umbrella/__version__.py +0 -1
  7. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/LICENSE +0 -0
  8. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/__init__.py +0 -0
  9. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/__init__.py +0 -0
  10. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/atomicwrites/LICENSE +0 -0
  11. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/atomicwrites/__init__.py +0 -0
  12. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/atomicwrites.pyi +0 -0
  13. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/six/__init__.pyi +0 -0
  14. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/six/moves/__init__.pyi +0 -0
  15. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/six/moves/configparser.pyi +0 -0
  16. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/six.LICENSE +0 -0
  17. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/six.py +0 -0
  18. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/_vendor/vendor.txt +0 -0
  19. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/cleaner.py +0 -0
  20. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/collector.py +0 -0
  21. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/constants.py +0 -0
  22. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/defender.py +0 -0
  23. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/hooks/__init__.py +0 -0
  24. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/hooks/delete_turtle.py +0 -0
  25. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/hooks/delete_unknown_plugin_node.py +0 -0
  26. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/hooks/fix_model_panel.py +0 -0
  27. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/hooks/fix_no_scene_name.py +0 -0
  28. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/hooks/fix_on_model_change_3dc.py +0 -0
  29. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/i18n.py +0 -0
  30. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/locales/en_US.json +0 -0
  31. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/locales/zh_CN.json +0 -0
  32. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/log.py +0 -0
  33. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/maya_funs.py +0 -0
  34. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/scanner.py +0 -0
  35. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/signatures.py +0 -0
  36. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/vaccine.py +0 -0
  37. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/vaccines/__init__.py +0 -0
  38. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/vaccines/vaccine1.py +0 -0
  39. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/vaccines/vaccine2.py +0 -0
  40. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/vaccines/vaccine3.py +0 -0
  41. {maya_umbrella-0.15.0 → maya_umbrella-0.16.0}/maya_umbrella/vaccines/vaccine4.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: maya_umbrella
3
- Version: 0.15.0
3
+ Version: 0.16.0
4
4
  Summary: A better Autodesk Maya antivirus tool detects and removes malicious.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -36,6 +36,7 @@ Description-Content-Type: text/markdown
36
36
  [![Downloads](https://static.pepy.tech/badge/maya-umbrella)](https://pepy.tech/project/maya-umbrella)
37
37
  [![Downloads](https://static.pepy.tech/badge/maya-umbrella/month)](https://pepy.tech/project/maya-umbrella)
38
38
  [![Downloads](https://static.pepy.tech/badge/maya-umbrella/week)](https://pepy.tech/project/maya-umbrella)
39
+ [![GitHub Release](https://img.shields.io/github/downloads/loonghao/maya_umbrella/total?label=GitHub%20Downloads)](https://github.com/loonghao/maya_umbrella/releases)
39
40
  [![License](https://img.shields.io/pypi/l/maya-umbrella)](https://pypi.org/project/maya-umbrella/)
40
41
  [![PyPI Format](https://img.shields.io/pypi/format/maya-umbrella)](https://pypi.org/project/maya-umbrella/)
41
42
  [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/loonghao/maya-umbrella/graphs/commit-activity)
@@ -205,6 +206,34 @@ nox -s maya -- 2018 --install-root /your/local/maya/root
205
206
 
206
207
  ```
207
208
 
209
+ ## Hooks Control
210
+
211
+ Disable all hooks. When set to `true`, no hooks will be executed.
212
+ ```shell
213
+ MAYA_UMBRELLA_DISABLE_ALL_HOOKS
214
+ ```
215
+ If you want to disable all hooks:
216
+ ```shell
217
+ SET MAYA_UMBRELLA_DISABLE_ALL_HOOKS=true
218
+ ```
219
+
220
+ Disable specific hooks by name. Use a comma-separated list of hook names (without `.py` extension).
221
+
222
+ Available hooks:
223
+ - `delete_turtle` - Remove Turtle plugin and related nodes
224
+ - `delete_unknown_plugin_node` - Remove unknown plugin nodes
225
+ - `fix_model_panel` - Fix model panel issues
226
+ - `fix_no_scene_name` - Fix scenes without names
227
+ - `fix_on_model_change_3dc` - Fix 3D Coat model change callback
228
+
229
+ ```shell
230
+ MAYA_UMBRELLA_DISABLE_HOOKS
231
+ ```
232
+ For example, to disable the `delete_turtle` and `delete_unknown_plugin_node` hooks:
233
+ ```shell
234
+ SET MAYA_UMBRELLA_DISABLE_HOOKS=delete_turtle,delete_unknown_plugin_node
235
+ ```
236
+
208
237
  # API
209
238
 
210
239
  Get virus files that have not been repaired in the current scenario.
@@ -8,6 +8,7 @@
8
8
  [![Downloads](https://static.pepy.tech/badge/maya-umbrella)](https://pepy.tech/project/maya-umbrella)
9
9
  [![Downloads](https://static.pepy.tech/badge/maya-umbrella/month)](https://pepy.tech/project/maya-umbrella)
10
10
  [![Downloads](https://static.pepy.tech/badge/maya-umbrella/week)](https://pepy.tech/project/maya-umbrella)
11
+ [![GitHub Release](https://img.shields.io/github/downloads/loonghao/maya_umbrella/total?label=GitHub%20Downloads)](https://github.com/loonghao/maya_umbrella/releases)
11
12
  [![License](https://img.shields.io/pypi/l/maya-umbrella)](https://pypi.org/project/maya-umbrella/)
12
13
  [![PyPI Format](https://img.shields.io/pypi/format/maya-umbrella)](https://pypi.org/project/maya-umbrella/)
13
14
  [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/loonghao/maya-umbrella/graphs/commit-activity)
@@ -177,6 +178,34 @@ nox -s maya -- 2018 --install-root /your/local/maya/root
177
178
 
178
179
  ```
179
180
 
181
+ ## Hooks Control
182
+
183
+ Disable all hooks. When set to `true`, no hooks will be executed.
184
+ ```shell
185
+ MAYA_UMBRELLA_DISABLE_ALL_HOOKS
186
+ ```
187
+ If you want to disable all hooks:
188
+ ```shell
189
+ SET MAYA_UMBRELLA_DISABLE_ALL_HOOKS=true
190
+ ```
191
+
192
+ Disable specific hooks by name. Use a comma-separated list of hook names (without `.py` extension).
193
+
194
+ Available hooks:
195
+ - `delete_turtle` - Remove Turtle plugin and related nodes
196
+ - `delete_unknown_plugin_node` - Remove unknown plugin nodes
197
+ - `fix_model_panel` - Fix model panel issues
198
+ - `fix_no_scene_name` - Fix scenes without names
199
+ - `fix_on_model_change_3dc` - Fix 3D Coat model change callback
200
+
201
+ ```shell
202
+ MAYA_UMBRELLA_DISABLE_HOOKS
203
+ ```
204
+ For example, to disable the `delete_turtle` and `delete_unknown_plugin_node` hooks:
205
+ ```shell
206
+ SET MAYA_UMBRELLA_DISABLE_HOOKS=delete_turtle,delete_unknown_plugin_node
207
+ ```
208
+
180
209
  # API
181
210
 
182
211
  Get virus files that have not been repaired in the current scenario.
@@ -0,0 +1 @@
1
+ __version__ = "0.16.0"
@@ -123,14 +123,58 @@ def load_hook(hook_file):
123
123
  return module
124
124
 
125
125
 
126
+ def is_hooks_disabled():
127
+ """Check if all hooks are disabled via environment variable.
128
+
129
+ Returns:
130
+ bool: True if hooks are disabled, False otherwise.
131
+ """
132
+ return os.getenv("MAYA_UMBRELLA_DISABLE_ALL_HOOKS", "false").lower() == "true"
133
+
134
+
135
+ def get_disabled_hooks():
136
+ """Get the list of disabled hook names from environment variable.
137
+
138
+ The environment variable MAYA_UMBRELLA_DISABLE_HOOKS should be a comma-separated
139
+ list of hook names (without .py extension).
140
+
141
+ Example:
142
+ SET MAYA_UMBRELLA_DISABLE_HOOKS=delete_turtle,delete_unknown_plugin_node
143
+
144
+ Returns:
145
+ list: A list of disabled hook names.
146
+ """
147
+ disabled = os.getenv("MAYA_UMBRELLA_DISABLE_HOOKS", "")
148
+ if not disabled:
149
+ return []
150
+ return [name.strip() for name in disabled.split(",") if name.strip()]
151
+
152
+
126
153
  def get_hooks():
127
154
  """Return a list of paths to all hook files in the 'hooks' directory.
128
155
 
156
+ This function respects the following environment variables:
157
+ - MAYA_UMBRELLA_DISABLE_ALL_HOOKS: Set to "true" to disable all hooks.
158
+ - MAYA_UMBRELLA_DISABLE_HOOKS: Comma-separated list of hook names to disable.
159
+
129
160
  Returns:
130
161
  list: A list of paths to all hook files in the 'hooks' directory.
131
162
  """
163
+ if is_hooks_disabled():
164
+ return []
165
+
132
166
  pattern = os.path.join(this_root(), "hooks", "*.py")
133
- return [hook for hook in glob.glob(pattern) if "__init__" not in hook]
167
+ disabled_hooks = get_disabled_hooks()
168
+
169
+ hooks = []
170
+ for hook in glob.glob(pattern):
171
+ if "__init__" in hook:
172
+ continue
173
+ hook_name = os.path.basename(hook).replace(".py", "")
174
+ if hook_name in disabled_hooks:
175
+ continue
176
+ hooks.append(hook)
177
+ return hooks
134
178
 
135
179
 
136
180
  def get_vaccines():
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "maya_umbrella"
3
- version = "0.15.0"
3
+ version = "0.16.0"
4
4
  description = "A better Autodesk Maya antivirus tool detects and removes malicious."
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.15.0"
39
+ version = "0.16.0"
40
40
  tag_format = "v$version"
41
41
  version_files = [
42
42
  "pyproject.toml:version",
@@ -1 +0,0 @@
1
- __version__ = "0.15.0"
File without changes