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