mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
Fix repair taking very long time for many heavy meshes (optimization)
This commit is contained in:
parent
1e49b7c87c
commit
7340061243
1 changed files with 8 additions and 2 deletions
|
|
@ -3,6 +3,7 @@ from maya import cmds
|
|||
import pyblish.api
|
||||
import openpype.api
|
||||
import openpype.hosts.maya.api.action
|
||||
from openpype.hosts.maya.api import lib
|
||||
|
||||
from avalon.maya import maintained_selection
|
||||
|
||||
|
|
@ -53,8 +54,13 @@ class ValidateShapeZero(pyblish.api.Validator):
|
|||
return
|
||||
|
||||
with maintained_selection():
|
||||
for shape in invalid_shapes:
|
||||
cmds.polyCollapseTweaks(shape)
|
||||
with lib.tool("selectSuperContext"):
|
||||
for shape in invalid_shapes:
|
||||
cmds.polyCollapseTweaks(shape)
|
||||
# cmds.polyCollapseTweaks keeps selecting the geometry
|
||||
# after each command. When running on many meshes
|
||||
# after one another this tends to get really heavy
|
||||
cmds.select(clear=True)
|
||||
|
||||
def process(self, instance):
|
||||
"""Process all the nodes in the instance "objectSet"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue