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.
Files changed (84) hide show
  1. simplex_solver-3.2.2.dist-info/DELVEWHEEL +2 -0
  2. simplex_solver-3.2.2.dist-info/METADATA +94 -0
  3. simplex_solver-3.2.2.dist-info/RECORD +84 -0
  4. simplex_solver-3.2.2.dist-info/WHEEL +5 -0
  5. simplex_solver.libs/.load-order-simplex_solver-3.2.2 +1 -0
  6. simplex_solver.libs/msvcp140-a4c2229bdc2a2a630acdc095b4d86008.dll +0 -0
  7. simplexui/__init__.py +86 -0
  8. simplexui/_version.py +1 -0
  9. simplexui/channelBox.py +867 -0
  10. simplexui/comboCheckDialog.py +396 -0
  11. simplexui/commands/__init__.py +16 -0
  12. simplexui/commands/alembicCommon.py +1148 -0
  13. simplexui/commands/alembic_walker.py +299 -0
  14. simplexui/commands/applyCorrectives.py +452 -0
  15. simplexui/commands/correctiveInterface.py +259 -0
  16. simplexui/commands/expandedExport.py +434 -0
  17. simplexui/commands/hdf5Convert.py +62 -0
  18. simplexui/commands/mayaCorrectiveInterface.py +159 -0
  19. simplexui/commands/mayatonumpy.py +416 -0
  20. simplexui/commands/mesh.py +1085 -0
  21. simplexui/commands/poseblendlib.py +168 -0
  22. simplexui/commands/reorderSimplexPoints.py +102 -0
  23. simplexui/commands/replaceDefinitionJson.py +74 -0
  24. simplexui/commands/rigidAlign.py +97 -0
  25. simplexui/commands/unsubdivide.py +1222 -0
  26. simplexui/commands/uvTransfer.py +976 -0
  27. simplexui/dragFilter.py +334 -0
  28. simplexui/falloffDialog.py +504 -0
  29. simplexui/img/ChefHead.png +0 -0
  30. simplexui/img/frozen.png +0 -0
  31. simplexui/interface/__init__.py +30 -0
  32. simplexui/interface/dummyInterface.py +1313 -0
  33. simplexui/interface/mayaInterface.py +2294 -0
  34. simplexui/interfaceModel.py +655 -0
  35. simplexui/interfaceModelTrees.py +456 -0
  36. simplexui/items/__init__.py +50 -0
  37. simplexui/items/accessor.py +145 -0
  38. simplexui/items/combo.py +645 -0
  39. simplexui/items/dragItem.py +44 -0
  40. simplexui/items/falloff.py +748 -0
  41. simplexui/items/group.py +267 -0
  42. simplexui/items/progression.py +613 -0
  43. simplexui/items/shape.py +384 -0
  44. simplexui/items/simplex.py +1734 -0
  45. simplexui/items/slider.py +632 -0
  46. simplexui/items/stack.py +147 -0
  47. simplexui/items/traversal.py +780 -0
  48. simplexui/items/treeItem.py +441 -0
  49. simplexui/main.pyw +22 -0
  50. simplexui/menu/__init__.py +73 -0
  51. simplexui/menu/dummyPlugins/__init__.py +16 -0
  52. simplexui/menu/genericPlugins/__init__.py +16 -0
  53. simplexui/menu/genericPlugins/_builtins.py +270 -0
  54. simplexui/menu/genericPlugins/checkPossibleCombos.py +48 -0
  55. simplexui/menu/genericPlugins/exportSplit.py +67 -0
  56. simplexui/menu/genericPlugins/showFalloffs.py +26 -0
  57. simplexui/menu/genericPlugins/showTraversals.py +26 -0
  58. simplexui/menu/genericPlugins/simplexUvTransfer.py +106 -0
  59. simplexui/menu/genericPlugins/unsubdivide.py +72 -0
  60. simplexui/menu/mayaPlugins/__init__.py +16 -0
  61. simplexui/menu/mayaPlugins/exportOther.py +53 -0
  62. simplexui/menu/mayaPlugins/extractProgressives.py +68 -0
  63. simplexui/menu/mayaPlugins/freezeCombo.py +247 -0
  64. simplexui/menu/mayaPlugins/generateShapeIncrementals.py +99 -0
  65. simplexui/menu/mayaPlugins/importObjs.py +199 -0
  66. simplexui/menu/mayaPlugins/linearizeTraversal.py +60 -0
  67. simplexui/menu/mayaPlugins/makeShelfBtn.py +67 -0
  68. simplexui/menu/mayaPlugins/relaxToSelection.py +76 -0
  69. simplexui/menu/mayaPlugins/reloadDefinition.py +44 -0
  70. simplexui/menu/mayaPlugins/snapToNeutral.py +71 -0
  71. simplexui/menu/mayaPlugins/softSelectToCluster.py +201 -0
  72. simplexui/menu/mayaPlugins/tweakMix.py +136 -0
  73. simplexui/menu/mayaPlugins/updateRestShape.py +113 -0
  74. simplexui/pysimplex.lib +0 -0
  75. simplexui/pysimplex.pyd +0 -0
  76. simplexui/simplexDialog.py +1547 -0
  77. simplexui/travCheckDialog.py +419 -0
  78. simplexui/traversalDialog.py +299 -0
  79. simplexui/ui/comboCheckDialog.ui +475 -0
  80. simplexui/ui/falloffDialog.ui +243 -0
  81. simplexui/ui/simplexDialog.ui +1458 -0
  82. simplexui/ui/travCheckDialog.ui +488 -0
  83. simplexui/ui/traversalDialog.ui +532 -0
  84. 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)
Binary file
Binary file