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,299 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
from typing import cast, Iterator
|
|
3
|
+
|
|
4
|
+
from .alembicCommon import getIArchive
|
|
5
|
+
|
|
6
|
+
from alembic.Abc import (
|
|
7
|
+
IArchive,
|
|
8
|
+
OArchive,
|
|
9
|
+
IObject,
|
|
10
|
+
OObject,
|
|
11
|
+
IProperty,
|
|
12
|
+
OProperty,
|
|
13
|
+
OCompoundProperty,
|
|
14
|
+
OScalarProperty,
|
|
15
|
+
OArrayProperty,
|
|
16
|
+
ICompoundProperty,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AlembicWalker(object):
|
|
21
|
+
"""This class recursively walks an alembic hierarchy, copying
|
|
22
|
+
all objects and properties along the way.
|
|
23
|
+
|
|
24
|
+
It's written as a class to allow for overriding methods used in the
|
|
25
|
+
copying process. To add extra decision making and archive mutation
|
|
26
|
+
|
|
27
|
+
copy_alembic Takes input and output filepaths and kicks off the copy process
|
|
28
|
+
copy_hierarchy takes input and output alembic objects and copies the hierarchy
|
|
29
|
+
from the input to the output
|
|
30
|
+
copy_object_properties copies the property data from one object to another.
|
|
31
|
+
copy_property_data copies the the data from input to output
|
|
32
|
+
|
|
33
|
+
make_obj_walk is the recursive generator function that walks the object hierarchy
|
|
34
|
+
depth-first, and creates the empty output objects with the correct type metadata
|
|
35
|
+
that copy_object_properties will fill
|
|
36
|
+
make_prop_walk is the recursive generator function that walks the property hierarchy
|
|
37
|
+
depth-first, and creates the empty output properties of the correct type that
|
|
38
|
+
copy_property_data fills
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def make_prop_walk(
|
|
43
|
+
cls,
|
|
44
|
+
iPar: ICompoundProperty,
|
|
45
|
+
oPar: OCompoundProperty,
|
|
46
|
+
depth: int = 0,
|
|
47
|
+
name: list[str] | None = None,
|
|
48
|
+
debug: bool = False,
|
|
49
|
+
*args,
|
|
50
|
+
**kwargs,
|
|
51
|
+
) -> Iterator[tuple[IProperty, OProperty, int, list[str]]]:
|
|
52
|
+
"""Generator for depth-first iteration and duplication of the
|
|
53
|
+
properties of an alembic object. Every input property is recreated with the
|
|
54
|
+
same name and type as an output object, then yielded from the method
|
|
55
|
+
|
|
56
|
+
You would override this method if you needed to add or remove certain properties
|
|
57
|
+
from the objects when processing the input archive
|
|
58
|
+
|
|
59
|
+
Arguments:
|
|
60
|
+
iPar (ICompoundProperty): The parent input property whose sub-properties we will
|
|
61
|
+
iterate over
|
|
62
|
+
oPar (OCompoundProperty): The output property that will act as the container
|
|
63
|
+
for all the newly created properties
|
|
64
|
+
depth (int): The current depth of the hierarchy
|
|
65
|
+
name (list): The full path-name of the current property. This is the name
|
|
66
|
+
of all parent container properties as a list
|
|
67
|
+
debug (bool): Whether to print the debug messages
|
|
68
|
+
args/kwargs : Additional arguments that will get passed down the stack
|
|
69
|
+
This saves you from having to override all methods to pass a single
|
|
70
|
+
argument to the bottom of the call stack
|
|
71
|
+
|
|
72
|
+
Yields:
|
|
73
|
+
iProperty: An input property to copy sub-properties and values from
|
|
74
|
+
oProperty: An output property to copy sub-properties and values to
|
|
75
|
+
int: The current depth of the objects in the hierarchy
|
|
76
|
+
list: The current path-name of the properties to be copied
|
|
77
|
+
"""
|
|
78
|
+
name = name or []
|
|
79
|
+
num = iPar.getNumProperties()
|
|
80
|
+
pfx = " " * depth
|
|
81
|
+
for i in range(num):
|
|
82
|
+
iProp = iPar.getProperty(i)
|
|
83
|
+
nextName = name + [iProp.getName()]
|
|
84
|
+
|
|
85
|
+
if iProp.isCompound():
|
|
86
|
+
if debug:
|
|
87
|
+
print(pfx, iProp.getName())
|
|
88
|
+
oProp = OCompoundProperty(oPar, iProp.getName(), iProp.getMetaData())
|
|
89
|
+
elif iProp.isArray():
|
|
90
|
+
if debug:
|
|
91
|
+
print(pfx, iProp.getName())
|
|
92
|
+
oProp = OArrayProperty(
|
|
93
|
+
oPar, iProp.getName(), iProp.getDataType(), iProp.getMetaData()
|
|
94
|
+
)
|
|
95
|
+
else:
|
|
96
|
+
if debug:
|
|
97
|
+
print(pfx, iProp.getName())
|
|
98
|
+
oProp = OScalarProperty(
|
|
99
|
+
oPar, iProp.getName(), iProp.getDataType(), iProp.getMetaData()
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
yield iProp, oProp, depth, nextName
|
|
103
|
+
if iProp.isCompound():
|
|
104
|
+
iProp = cast(ICompoundProperty, iProp)
|
|
105
|
+
oProp = cast(OCompoundProperty, oProp)
|
|
106
|
+
|
|
107
|
+
for ip, op, d, nn in cls.make_prop_walk(
|
|
108
|
+
iProp, oProp, depth + 1, nextName, *args, debug=debug, **kwargs
|
|
109
|
+
):
|
|
110
|
+
yield ip, op, d, nn
|
|
111
|
+
|
|
112
|
+
@classmethod
|
|
113
|
+
def make_obj_walk(
|
|
114
|
+
cls,
|
|
115
|
+
iPar: IObject,
|
|
116
|
+
oPar: OObject,
|
|
117
|
+
depth: int = 0,
|
|
118
|
+
debug: bool = False,
|
|
119
|
+
*args,
|
|
120
|
+
**kwargs,
|
|
121
|
+
) -> Iterator[tuple[IObject, OObject, int]]:
|
|
122
|
+
"""Generator for depth-first iteration and duplication over the
|
|
123
|
+
objects in an alembic file. Every input object is recreated with the same
|
|
124
|
+
name and metadata as an output object, then yielded from the method
|
|
125
|
+
|
|
126
|
+
You would override this method if you needed to change the type of an
|
|
127
|
+
object, change the output hierarchy, or skip certain objects when
|
|
128
|
+
processing the input archive
|
|
129
|
+
|
|
130
|
+
Arguments:
|
|
131
|
+
iPar (iObject): The parent input object whose children we will
|
|
132
|
+
iterate over
|
|
133
|
+
oPar (oObject): The output object that will act as the parent
|
|
134
|
+
for all the newly created duplicates of the iPar's children
|
|
135
|
+
depth (int): The current depth of the hierarchy
|
|
136
|
+
debug (bool): Whether to print the debug messages
|
|
137
|
+
args/kwargs : Additional arguments that will get passed down the stack
|
|
138
|
+
This saves you from having to override all methods to pass a single
|
|
139
|
+
argument to the bottom of the call stack
|
|
140
|
+
|
|
141
|
+
Yields:
|
|
142
|
+
iObject: An object to copy properties from
|
|
143
|
+
oObject: An object to copy properties to
|
|
144
|
+
int: The current depth of the objects in the hierarchy
|
|
145
|
+
"""
|
|
146
|
+
num = iPar.getNumChildren()
|
|
147
|
+
pfx = " " * depth
|
|
148
|
+
for i in range(num):
|
|
149
|
+
iChild = iPar.getChild(i)
|
|
150
|
+
if debug:
|
|
151
|
+
print(pfx, iChild.getName())
|
|
152
|
+
oChild = OObject(oPar, iChild.getName(), iChild.getMetaData())
|
|
153
|
+
|
|
154
|
+
yield iChild, oChild, depth
|
|
155
|
+
for ic, oc, d in cls.make_obj_walk(
|
|
156
|
+
iChild, oChild, depth + 1, *args, debug=debug, **kwargs
|
|
157
|
+
):
|
|
158
|
+
yield ic, oc, d
|
|
159
|
+
|
|
160
|
+
@classmethod
|
|
161
|
+
def copy_time_sampling(
|
|
162
|
+
cls, inProp: IProperty, outProp: OProperty, *args, **kwargs
|
|
163
|
+
) -> None:
|
|
164
|
+
"""Choose the output timeSampling corresponding to the input one
|
|
165
|
+
|
|
166
|
+
Arguments:
|
|
167
|
+
inProp (IProperty): The property to copy the time sampling from
|
|
168
|
+
outProp (OProperty): The property to copy the time sampling to
|
|
169
|
+
args/kwargs : Additional arguments that will get passed down the stack
|
|
170
|
+
This saves you from having to override all methods to pass a single
|
|
171
|
+
argument to the bottom of the call stack
|
|
172
|
+
"""
|
|
173
|
+
iSampling = inProp.getTimeSampling()
|
|
174
|
+
outProp.setTimeSampling(iSampling)
|
|
175
|
+
|
|
176
|
+
@classmethod
|
|
177
|
+
def copy_property_data(
|
|
178
|
+
cls,
|
|
179
|
+
inProp: IProperty,
|
|
180
|
+
outProp: OProperty,
|
|
181
|
+
name: list[str],
|
|
182
|
+
objDepth: int,
|
|
183
|
+
propDepth: int,
|
|
184
|
+
*args,
|
|
185
|
+
**kwargs,
|
|
186
|
+
) -> None:
|
|
187
|
+
"""Copy the data from an input property to an output property
|
|
188
|
+
|
|
189
|
+
Override this method if you need to change the data that gets stored
|
|
190
|
+
on a specific property
|
|
191
|
+
|
|
192
|
+
Arguments:
|
|
193
|
+
inProp (iProperty): The input property to copy data from
|
|
194
|
+
outProp (oProperty): The output property to copy data to
|
|
195
|
+
name (list): The full path-name of the property being copied
|
|
196
|
+
objDepth (int): The depth in the *object* hierarchy that the parent
|
|
197
|
+
object of this property is
|
|
198
|
+
propDepth (int): The depth of the *property* hierarchy that this
|
|
199
|
+
property is
|
|
200
|
+
"""
|
|
201
|
+
if not inProp.isCompound():
|
|
202
|
+
cls.copy_time_sampling(inProp, outProp, *args, **kwargs)
|
|
203
|
+
for s in inProp.samples:
|
|
204
|
+
outProp.setValue(s)
|
|
205
|
+
|
|
206
|
+
@classmethod
|
|
207
|
+
def copy_object_properties(
|
|
208
|
+
cls,
|
|
209
|
+
inObj: IObject,
|
|
210
|
+
outObj: OObject,
|
|
211
|
+
objDepth: int,
|
|
212
|
+
debug: bool = False,
|
|
213
|
+
*args,
|
|
214
|
+
**kwargs,
|
|
215
|
+
) -> None:
|
|
216
|
+
"""Copy an input object and all of its properties to an output object
|
|
217
|
+
|
|
218
|
+
Override this method if you need to change the structure of the properties on an object
|
|
219
|
+
|
|
220
|
+
Arguments:
|
|
221
|
+
inObj (iObject): The input object whose properties to copy from
|
|
222
|
+
outObj (oObject): The output object to recieve the copied properties
|
|
223
|
+
objDepth (int): The depth in the hierarchy these objects are
|
|
224
|
+
debug (bool): Whether to print debug messages
|
|
225
|
+
args/kwargs : Additional arguments that will get passed down the stack
|
|
226
|
+
This saves you from having to override all methods to pass a single
|
|
227
|
+
argument to the bottom of the call stack
|
|
228
|
+
"""
|
|
229
|
+
|
|
230
|
+
iProps = inObj.getProperties()
|
|
231
|
+
oProps = outObj.getProperties()
|
|
232
|
+
for ip, op, propDepth, name in cls.make_prop_walk(
|
|
233
|
+
iProps, oProps, *args, debug=debug, **kwargs
|
|
234
|
+
):
|
|
235
|
+
cls.copy_property_data(ip, op, name, objDepth, propDepth, *args, **kwargs)
|
|
236
|
+
|
|
237
|
+
@classmethod
|
|
238
|
+
def copy_hierarchy(
|
|
239
|
+
cls, inPar: IObject, outPar: OObject, debug: bool = False, *args, **kwargs
|
|
240
|
+
) -> None:
|
|
241
|
+
"""Start off the copying of an object hierarchy
|
|
242
|
+
|
|
243
|
+
Arguments:
|
|
244
|
+
inPar (iObject): The top-level input object to copy the hierarchy from
|
|
245
|
+
outPar (oObject): The top-level output object to copy the hierarchy to
|
|
246
|
+
debug (bool): Whether to print debug messages
|
|
247
|
+
args/kwargs : Additional arguments that will get passed down the stack
|
|
248
|
+
This saves you from having to override all methods to pass a single
|
|
249
|
+
argument to the bottom of the call stack
|
|
250
|
+
"""
|
|
251
|
+
for iChild, oChild, depth in cls.make_obj_walk(
|
|
252
|
+
inPar, outPar, *args, debug=debug, **kwargs
|
|
253
|
+
):
|
|
254
|
+
cls.copy_object_properties(
|
|
255
|
+
iChild, oChild, depth, *args, debug=debug, **kwargs
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
@classmethod
|
|
259
|
+
def copy_archive_time_samplings(
|
|
260
|
+
cls, iArch: IArchive, oArch: OArchive, debug: bool = False, *args, **kwargs
|
|
261
|
+
) -> None:
|
|
262
|
+
"""Copy the time samplings from the iArch to the oArch
|
|
263
|
+
|
|
264
|
+
Arguments:
|
|
265
|
+
iArch (IArchive): The input archive object
|
|
266
|
+
oArch (OArchive): The output archive object
|
|
267
|
+
debug (bool): Whether to print debug messages
|
|
268
|
+
args/kwargs : Additional arguments that will get passed down the stack
|
|
269
|
+
This saves you from having to override all methods to pass a single
|
|
270
|
+
argument to the bottom of the call stack
|
|
271
|
+
"""
|
|
272
|
+
for idx in range(iArch.getNumTimeSamplings()):
|
|
273
|
+
ts = iArch.getTimeSampling(idx)
|
|
274
|
+
oArch.addTimeSampling(ts)
|
|
275
|
+
|
|
276
|
+
@classmethod
|
|
277
|
+
def copy_alembic(
|
|
278
|
+
cls, inPath: str, outPath: str, debug: bool = False, *args, **kwargs
|
|
279
|
+
):
|
|
280
|
+
"""Start off the copying of an alembic archive
|
|
281
|
+
|
|
282
|
+
Override this method if you need to get extra data about the
|
|
283
|
+
archives before starting the copy process
|
|
284
|
+
|
|
285
|
+
Arguments:
|
|
286
|
+
inPath (str): The path to the input archive to copy
|
|
287
|
+
outPath (str): The path where to create a the copied archive
|
|
288
|
+
debug (bool): Whether to print debug messages
|
|
289
|
+
args/kwargs : Additional arguments that will get passed down the stack
|
|
290
|
+
This saves you from having to override all methods to pass a single
|
|
291
|
+
argument to the bottom of the call stack
|
|
292
|
+
"""
|
|
293
|
+
iArch = getIArchive(inPath)
|
|
294
|
+
oArch = OArchive(str(outPath))
|
|
295
|
+
cls.copy_archive_time_samplings(iArch, oArch, *args, debug=debug, **kwargs)
|
|
296
|
+
|
|
297
|
+
iTop = iArch.getTop()
|
|
298
|
+
oTop = oArch.getTop()
|
|
299
|
+
cls.copy_hierarchy(iTop, oTop, *args, debug=debug, **kwargs)
|