simplex-solver 3.1.0__39-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 (79) hide show
  1. simplex_solver-3.1.0.dist-info/METADATA +90 -0
  2. simplex_solver-3.1.0.dist-info/RECORD +79 -0
  3. simplex_solver-3.1.0.dist-info/WHEEL +5 -0
  4. simplexui/__init__.py +53 -0
  5. simplexui/_version.py +1 -0
  6. simplexui/channelBox.py +858 -0
  7. simplexui/comboCheckDialog.py +343 -0
  8. simplexui/commands/__init__.py +16 -0
  9. simplexui/commands/alembicCommon.py +991 -0
  10. simplexui/commands/applyCorrectives.py +451 -0
  11. simplexui/commands/correctiveInterface.py +261 -0
  12. simplexui/commands/expandedExport.py +436 -0
  13. simplexui/commands/hdf5Convert.py +60 -0
  14. simplexui/commands/mayaCorrectiveInterface.py +161 -0
  15. simplexui/commands/mayatonumpy.py +375 -0
  16. simplexui/commands/mesh.py +1081 -0
  17. simplexui/commands/numpytoimath.py +319 -0
  18. simplexui/commands/poseblendlib.py +166 -0
  19. simplexui/commands/reorderSimplexPoints.py +102 -0
  20. simplexui/commands/rigidAlign.py +99 -0
  21. simplexui/commands/smpxBlend.py +629 -0
  22. simplexui/commands/unsubdivide.py +1227 -0
  23. simplexui/commands/uvTransfer.py +977 -0
  24. simplexui/dragFilter.py +299 -0
  25. simplexui/falloffDialog.py +471 -0
  26. simplexui/img/ChefHead.png +0 -0
  27. simplexui/img/frozen.png +0 -0
  28. simplexui/interface/__init__.py +28 -0
  29. simplexui/interface/dummyInterface.py +1585 -0
  30. simplexui/interface/mayaInterface.py +3271 -0
  31. simplexui/interfaceModel.py +1053 -0
  32. simplexui/interfaceModelTrees.py +441 -0
  33. simplexui/items/__init__.py +42 -0
  34. simplexui/items/accessor.py +213 -0
  35. simplexui/items/combo.py +852 -0
  36. simplexui/items/falloff.py +778 -0
  37. simplexui/items/group.py +297 -0
  38. simplexui/items/progression.py +743 -0
  39. simplexui/items/shape.py +443 -0
  40. simplexui/items/simplex.py +1764 -0
  41. simplexui/items/slider.py +738 -0
  42. simplexui/items/stack.py +154 -0
  43. simplexui/items/traversal.py +966 -0
  44. simplexui/main.pyw +22 -0
  45. simplexui/menu/__init__.py +69 -0
  46. simplexui/menu/dummyPlugins/__init__.py +16 -0
  47. simplexui/menu/genericPlugins/__init__.py +16 -0
  48. simplexui/menu/genericPlugins/_builtins.py +268 -0
  49. simplexui/menu/genericPlugins/checkPossibleCombos.py +45 -0
  50. simplexui/menu/genericPlugins/exportSplit.py +59 -0
  51. simplexui/menu/genericPlugins/showFalloffs.py +24 -0
  52. simplexui/menu/genericPlugins/showTraversals.py +24 -0
  53. simplexui/menu/genericPlugins/simplexUvTransfer.py +107 -0
  54. simplexui/menu/genericPlugins/unsubdivide.py +70 -0
  55. simplexui/menu/mayaPlugins/__init__.py +16 -0
  56. simplexui/menu/mayaPlugins/exportOther.py +43 -0
  57. simplexui/menu/mayaPlugins/extractProgressives.py +65 -0
  58. simplexui/menu/mayaPlugins/freezeCombo.py +245 -0
  59. simplexui/menu/mayaPlugins/generateShapeIncrementals.py +97 -0
  60. simplexui/menu/mayaPlugins/importObjs.py +193 -0
  61. simplexui/menu/mayaPlugins/linearizeTraversal.py +48 -0
  62. simplexui/menu/mayaPlugins/makeShelfBtn.py +65 -0
  63. simplexui/menu/mayaPlugins/relaxToSelection.py +75 -0
  64. simplexui/menu/mayaPlugins/reloadDefinition.py +33 -0
  65. simplexui/menu/mayaPlugins/snapToNeutral.py +72 -0
  66. simplexui/menu/mayaPlugins/softSelectToCluster.py +200 -0
  67. simplexui/menu/mayaPlugins/tweakMix.py +134 -0
  68. simplexui/menu/mayaPlugins/updateRestShape.py +105 -0
  69. simplexui/pysimplex.dll.a +0 -0
  70. simplexui/pysimplex.pyd +0 -0
  71. simplexui/simplexDialog.py +1454 -0
  72. simplexui/travCheckDialog.py +397 -0
  73. simplexui/traversalDialog.py +271 -0
  74. simplexui/ui/comboCheckDialog.ui +475 -0
  75. simplexui/ui/falloffDialog.ui +243 -0
  76. simplexui/ui/simplexDialog.ui +1458 -0
  77. simplexui/ui/travCheckDialog.ui +488 -0
  78. simplexui/ui/traversalDialog.ui +532 -0
  79. simplexui/utils.py +320 -0
@@ -0,0 +1,154 @@
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
+ # pylint:disable=missing-docstring,unused-argument,no-self-use
19
+ import copy
20
+ from collections import OrderedDict
21
+ from contextlib import contextmanager
22
+ from functools import wraps
23
+
24
+ from ..interface import undoContext
25
+
26
+
27
+ # UNDO STACK SETUP
28
+ class Stack(object):
29
+ """Integrate simplex into the DCC undo stack"""
30
+
31
+ def __init__(self):
32
+ self._stack = OrderedDict()
33
+ self.depth = 0
34
+ self.currentRevision = 0
35
+ self.enabled = True
36
+
37
+ def __setitem__(self, key, value):
38
+ gt = []
39
+ # when setting a new key, remove all keys from
40
+ # the previous branch
41
+ for k in reversed(self._stack): # pylint: disable=bad-reversed-sequence
42
+ if k > key:
43
+ gt.append(k)
44
+ else:
45
+ # yay ordered dict
46
+ break
47
+ for k in gt:
48
+ del self._stack[k]
49
+ # traceback.print_stack()
50
+ self._stack[key] = value
51
+
52
+ def getRevision(self, revision):
53
+ """Every time a change is made to the simplex definition,
54
+ the revision counter is updated, and the revision/definition
55
+ pair is put on the undo stack
56
+
57
+ Parameters
58
+ ----------
59
+ revision : int
60
+ The revision number to get
61
+
62
+ Returns
63
+ -------
64
+ : Simplex or None
65
+ The stored Simplex system for the given revision
66
+ or None if nothing found
67
+
68
+ """
69
+ # This method will ***ONLY*** be called by the undo callback
70
+ # Seriously, don't call this yourself
71
+ if revision != self.currentRevision:
72
+ if revision in self._stack:
73
+ data = self._stack[revision]
74
+ self.currentRevision = revision
75
+ return data
76
+ return None
77
+
78
+ def purge(self):
79
+ """Clear the undo stack. This should be done on new-file"""
80
+ self._stack = OrderedDict()
81
+ self.depth = 0
82
+ self.currentRevision = 0
83
+
84
+ @contextmanager
85
+ def store(self, wrapObj):
86
+ """A context manager That will store changes to a Simplex system
87
+ Nested calls to this manager will only store the first one
88
+
89
+ Parameters
90
+ ----------
91
+ wrapObj : object
92
+ A system object that has a reference to the Simplex
93
+
94
+ Returns
95
+ -------
96
+
97
+ """
98
+ from .simplex import Simplex
99
+
100
+ if self.enabled:
101
+ with undoContext(wrapObj.DCC):
102
+ self.depth += 1
103
+ try:
104
+ yield
105
+ finally:
106
+ self.depth -= 1
107
+
108
+ if self.depth == 0:
109
+ # Only store the top Level of the stack
110
+ srevision = wrapObj.DCC.incrementRevision()
111
+ if not isinstance(wrapObj, Simplex):
112
+ wrapObj = wrapObj.simplex
113
+ self[srevision] = copy.deepcopy(wrapObj)
114
+ else:
115
+ yield
116
+
117
+
118
+ def stackable(method):
119
+ """A Decorator to make a method auto update the stack
120
+ This decorator can only be used on methods of an object
121
+ that has its .simplex value set with a stack. If you need
122
+ to wrap an init method, use the stack.store contextmanager
123
+
124
+ Parameters
125
+ ----------
126
+ method :
127
+
128
+
129
+ Returns
130
+ -------
131
+
132
+ """
133
+
134
+ @wraps(method)
135
+ def stacked(self, *data, **kwdata):
136
+ """Decorator closure that handles the stack
137
+
138
+ Parameters
139
+ ----------
140
+ *data :
141
+
142
+ **kwdata :
143
+
144
+
145
+ Returns
146
+ -------
147
+
148
+ """
149
+ ret = None
150
+ with self.stack.store(self):
151
+ ret = method(self, *data, **kwdata)
152
+ return ret
153
+
154
+ return stacked