simplex-solver 3.2.2__cp39-abi3-win_amd64.whl
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.
- simplex_solver-3.2.2.dist-info/DELVEWHEEL +2 -0
- simplex_solver-3.2.2.dist-info/METADATA +94 -0
- simplex_solver-3.2.2.dist-info/RECORD +84 -0
- simplex_solver-3.2.2.dist-info/WHEEL +5 -0
- simplex_solver.libs/.load-order-simplex_solver-3.2.2 +1 -0
- simplex_solver.libs/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll +0 -0
- simplexui/__init__.py +86 -0
- simplexui/_version.py +1 -0
- simplexui/channelBox.py +867 -0
- simplexui/comboCheckDialog.py +396 -0
- simplexui/commands/__init__.py +16 -0
- simplexui/commands/alembicCommon.py +1148 -0
- simplexui/commands/alembic_walker.py +299 -0
- simplexui/commands/applyCorrectives.py +452 -0
- simplexui/commands/correctiveInterface.py +259 -0
- simplexui/commands/expandedExport.py +434 -0
- simplexui/commands/hdf5Convert.py +62 -0
- simplexui/commands/mayaCorrectiveInterface.py +159 -0
- simplexui/commands/mayatonumpy.py +416 -0
- simplexui/commands/mesh.py +1085 -0
- simplexui/commands/poseblendlib.py +168 -0
- simplexui/commands/reorderSimplexPoints.py +102 -0
- simplexui/commands/replaceDefinitionJson.py +74 -0
- simplexui/commands/rigidAlign.py +97 -0
- simplexui/commands/unsubdivide.py +1222 -0
- simplexui/commands/uvTransfer.py +976 -0
- simplexui/dragFilter.py +334 -0
- simplexui/falloffDialog.py +504 -0
- simplexui/img/ChefHead.png +0 -0
- simplexui/img/frozen.png +0 -0
- simplexui/interface/__init__.py +30 -0
- simplexui/interface/dummyInterface.py +1313 -0
- simplexui/interface/mayaInterface.py +2294 -0
- simplexui/interfaceModel.py +655 -0
- simplexui/interfaceModelTrees.py +456 -0
- simplexui/items/__init__.py +50 -0
- simplexui/items/accessor.py +145 -0
- simplexui/items/combo.py +645 -0
- simplexui/items/dragItem.py +44 -0
- simplexui/items/falloff.py +748 -0
- simplexui/items/group.py +267 -0
- simplexui/items/progression.py +613 -0
- simplexui/items/shape.py +384 -0
- simplexui/items/simplex.py +1734 -0
- simplexui/items/slider.py +632 -0
- simplexui/items/stack.py +147 -0
- simplexui/items/traversal.py +780 -0
- simplexui/items/treeItem.py +441 -0
- simplexui/main.pyw +22 -0
- simplexui/menu/__init__.py +73 -0
- simplexui/menu/dummyPlugins/__init__.py +16 -0
- simplexui/menu/genericPlugins/__init__.py +16 -0
- simplexui/menu/genericPlugins/_builtins.py +270 -0
- simplexui/menu/genericPlugins/checkPossibleCombos.py +48 -0
- simplexui/menu/genericPlugins/exportSplit.py +67 -0
- simplexui/menu/genericPlugins/showFalloffs.py +26 -0
- simplexui/menu/genericPlugins/showTraversals.py +26 -0
- simplexui/menu/genericPlugins/simplexUvTransfer.py +106 -0
- simplexui/menu/genericPlugins/unsubdivide.py +72 -0
- simplexui/menu/mayaPlugins/__init__.py +16 -0
- simplexui/menu/mayaPlugins/exportOther.py +53 -0
- simplexui/menu/mayaPlugins/extractProgressives.py +68 -0
- simplexui/menu/mayaPlugins/freezeCombo.py +247 -0
- simplexui/menu/mayaPlugins/generateShapeIncrementals.py +99 -0
- simplexui/menu/mayaPlugins/importObjs.py +199 -0
- simplexui/menu/mayaPlugins/linearizeTraversal.py +60 -0
- simplexui/menu/mayaPlugins/makeShelfBtn.py +67 -0
- simplexui/menu/mayaPlugins/relaxToSelection.py +76 -0
- simplexui/menu/mayaPlugins/reloadDefinition.py +44 -0
- simplexui/menu/mayaPlugins/snapToNeutral.py +71 -0
- simplexui/menu/mayaPlugins/softSelectToCluster.py +201 -0
- simplexui/menu/mayaPlugins/tweakMix.py +136 -0
- simplexui/menu/mayaPlugins/updateRestShape.py +113 -0
- simplexui/pysimplex.lib +0 -0
- simplexui/pysimplex.pyd +0 -0
- simplexui/simplexDialog.py +1547 -0
- simplexui/travCheckDialog.py +419 -0
- simplexui/traversalDialog.py +299 -0
- simplexui/ui/comboCheckDialog.ui +475 -0
- simplexui/ui/falloffDialog.ui +243 -0
- simplexui/ui/simplexDialog.ui +1458 -0
- simplexui/ui/travCheckDialog.ui +488 -0
- simplexui/ui/traversalDialog.ui +532 -0
- simplexui/utils.py +307 -0
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Copyright 2016, Blur Studio
|
|
2
|
+
#
|
|
3
|
+
# This file is part of Simplex.
|
|
4
|
+
#
|
|
5
|
+
# Simplex is free software: you can redistribute it and/or modify
|
|
6
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
7
|
+
# the Free Software Foundation, either version 3 of the License, or
|
|
8
|
+
# (at your option) any later version.
|
|
9
|
+
#
|
|
10
|
+
# Simplex is distributed in the hope that it will be useful,
|
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
13
|
+
# GNU Lesser General Public License for more details.
|
|
14
|
+
#
|
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
16
|
+
# along with Simplex. If not, see <http://www.gnu.org/licenses/>.
|
|
17
|
+
|
|
18
|
+
from __future__ import annotations
|
|
19
|
+
|
|
20
|
+
import textwrap
|
|
21
|
+
from functools import partial
|
|
22
|
+
|
|
23
|
+
import maya.cmds as cmds
|
|
24
|
+
from Qt.QtGui import QAction
|
|
25
|
+
from Qt.QtWidgets import QMessageBox
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def registerTool(window, menu) -> None:
|
|
29
|
+
updateRestShapeACT = QAction("Update Rest Shape", window)
|
|
30
|
+
menu.addAction(updateRestShapeACT)
|
|
31
|
+
updateRestShapeACT.triggered.connect(partial(updateRestShapeInterface, window))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def updateRestShapeInterface(window) -> None:
|
|
35
|
+
if window.simplex is None:
|
|
36
|
+
QMessageBox.warning(
|
|
37
|
+
window,
|
|
38
|
+
"Nothing Loaded",
|
|
39
|
+
"No simplex system is loaded",
|
|
40
|
+
)
|
|
41
|
+
return
|
|
42
|
+
|
|
43
|
+
sel = cmds.ls(sl=True)
|
|
44
|
+
if not sel:
|
|
45
|
+
QMessageBox.warning(window, "Nothing Selected", "Nothing Selected")
|
|
46
|
+
return
|
|
47
|
+
sel = sel[0]
|
|
48
|
+
mesh = window.simplex.DCC.mesh
|
|
49
|
+
|
|
50
|
+
# TODO, Check vert number and blendshape input connections
|
|
51
|
+
selVerts = cmds.polyEvaluate(sel, vertex=1)
|
|
52
|
+
meshVerts = cmds.polyEvaluate(mesh, vertex=1)
|
|
53
|
+
|
|
54
|
+
if selVerts != meshVerts:
|
|
55
|
+
msg = f"Selected object {sel} has {selVerts} verts\nBase Object has {meshVerts} verts"
|
|
56
|
+
QMessageBox.warning(window, "Vert Mismatch", msg)
|
|
57
|
+
return
|
|
58
|
+
|
|
59
|
+
# TODO Check for live connections
|
|
60
|
+
bs = window.simplex.DCC.shapeNode
|
|
61
|
+
cnx = cmds.listConnections(bs, plugs=1, destination=0, type="mesh")
|
|
62
|
+
if cnx:
|
|
63
|
+
cnxs = ", ".join([i.split(".")[0] for i in cnx])
|
|
64
|
+
cnxs = textwrap.fill(cnxs)
|
|
65
|
+
msg = [
|
|
66
|
+
"Some shapes have a live input connection:",
|
|
67
|
+
cnxs,
|
|
68
|
+
"",
|
|
69
|
+
"These shapes will not get the update.",
|
|
70
|
+
"Continue anyway?",
|
|
71
|
+
]
|
|
72
|
+
msg = "\n".join(msg)
|
|
73
|
+
btns = QMessageBox.StandardButton.Ok | QMessageBox.StandardButton.Cancel
|
|
74
|
+
bret = QMessageBox.question(window, "Live Connections", msg, btns)
|
|
75
|
+
if not bret & QMessageBox.StandardButton.Ok:
|
|
76
|
+
return
|
|
77
|
+
|
|
78
|
+
updateRestShape(mesh, sel, window=window)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def updateRestShape(mesh, newRest, window=None) -> None:
|
|
82
|
+
allShapes = cmds.listRelatives(mesh, children=1, shapes=1) or []
|
|
83
|
+
noInter = cmds.listRelatives(mesh, children=1, shapes=1, noIntermediate=1) or []
|
|
84
|
+
hist = cmds.listHistory(mesh)
|
|
85
|
+
inter = (set(allShapes) - set(noInter)) & set(hist)
|
|
86
|
+
if not inter:
|
|
87
|
+
if window is not None:
|
|
88
|
+
QMessageBox.warning(
|
|
89
|
+
window, "No Intermediates", "No intermediate meshes found"
|
|
90
|
+
)
|
|
91
|
+
return
|
|
92
|
+
inter = list(inter)
|
|
93
|
+
|
|
94
|
+
if len(inter) == 1:
|
|
95
|
+
orig = inter[0]
|
|
96
|
+
else:
|
|
97
|
+
origs = [i for i in inter if "Orig" in i]
|
|
98
|
+
if len(origs) != 1:
|
|
99
|
+
if window is not None:
|
|
100
|
+
QMessageBox.warning(
|
|
101
|
+
window,
|
|
102
|
+
"Too Many Intermediates",
|
|
103
|
+
f"Too Many intermediate meshes found: {origs}",
|
|
104
|
+
)
|
|
105
|
+
return
|
|
106
|
+
orig = origs[0]
|
|
107
|
+
|
|
108
|
+
outMesh = f"{newRest}.worldMesh[0]"
|
|
109
|
+
inMesh = f"{orig}.inMesh"
|
|
110
|
+
|
|
111
|
+
cmds.connectAttr(outMesh, inMesh, force=1)
|
|
112
|
+
cmds.refresh(force=1)
|
|
113
|
+
cmds.disconnectAttr(outMesh, inMesh)
|
simplexui/pysimplex.lib
ADDED
|
Binary file
|
simplexui/pysimplex.pyd
ADDED
|
Binary file
|