Browse code

Core update 2.3.1

Hexatron authored on 13/04/2017 06:19:57
Showing 7 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,399 @@
0
+"""
1
+User interface for advanced controllers creation, you can view the controller shape,
2
+can be binded to a joint directly, preview ability, creates zero, color override, and so on :)
3
+
4
+v2.0      :   Now you can capture the selected controller
5
+              Controllers are stored in a database
6
+              You can preview the selected joint in the internal viewport
7
+              You can toggle axis display
8
+              Handle closed shapes
9
+
10
+v2.1      :   (Fake) 3D Viewport way more comfortable
11
+              Can recover from scratch if no database
12
+              Smooth controller preview using catmull rom formula
13
+              Controller can be renamed by double-clicking on
14
+              Clear filter button
15
+
16
+v2.2      :   Class based controllers
17
+              Merge multiple selection into one object
18
+              Merge multiple shapes into one shape
19
+              Now working with a simple .cfg file containing the controllers
20
+
21
+v2.3      :   Adding mirroring tool
22
+              Visual comfort
23
+
24
+v2.3.1    :   2017 Compatible
25
+"""
26
+
27
+__author__ = "Mehdi Louala"
28
+__copyright__ = "Copyright 2017, Mehdi Louala"
29
+__credits__ = ["Mehdi Louala"]
30
+__license__ = "GPL"
31
+__version__ = "2.3.1"
32
+__maintainer__ = "Mehdi Louala"
33
+__email__ = "mlouala@gmail.com"
34
+__status__ = "Stable Version"
35
+
36
+from copy import copy
37
+import os
38
+import json
39
+
40
+try:
41
+    from PySide.QtCore import Qt
42
+    from PySide.QtGui import QTreeWidgetItem, QWidget
43
+except ImportError:
44
+    from PySide2.QtCore import Qt
45
+    from PySide2.QtWidgets import QWidget, QTreeWidgetItem
46
+
47
+from maya.cmds import ls, getAttr, xform, listRelatives, jointDisplayScale, error, warning,\
48
+                      duplicate, makeIdentity, delete, select, parent, undoInfo
49
+from maya.OpenMaya import MEventMessage, MMessage
50
+
51
+from cc_rsc.funcs import Controller, Controller_Pool, from_shape, get_maya_win, \
52
+    mirror_shape, override_color, colors
53
+from cc_rsc.widgets import Ctrl_O_UI, Capture
54
+
55
+
56
+class Ctrl_O(Ctrl_O_UI, QWidget):
57
+    """
58
+    The main widget window
59
+    """
60
+    jds = jointDisplayScale(q=True)
61
+    config_path = os.path.join(os.path.dirname(__file__), 'cc_rsc', 'config.cfg')
62
+
63
+    def __init__(self, parent=None):
64
+        self.controllers = Controller_Pool()
65
+
66
+        # first we check if the config file exists, if no, we create a new one with
67
+        # few shapes
68
+        exists = os.path.isfile(self.config_path)
69
+
70
+        with open(self.config_path, 'a+') as f:
71
+            if not exists:
72
+                data = {'circle': [([(0.0, 0.7, -0.7), (0.0, 0.0, -1.0), (0.0, -0.7, -0.7), (0.0, -1.0, 0.0), (0.0, -0.7, 0.7), (0.0, 0.0, 1.0), (0.0, 0.7, 0.7), (0.0, 1.0, 0.0)], 3, 1)],
73
+                        'cross': [([(0.0, 0.5, -0.5), (0.0, 1.0, -0.5), (0.0, 1.0, 0.5), (0.0, 0.5, 0.5), (0.0, 0.5, 1.0), (0.0, -0.5, 1.0), (0.0, -0.5, 0.5), (0.0, -1.0, 0.5), (0.0, -1.0, -0.5), (0.0, -0.5, -0.5), (0.0, -0.5, -1.0), (0.0, 0.5, -1.0), (0.0, 0.5, -0.5)], 1, 1)],
74
+                        'cube': [([(-1.0, -1.0, 1.0), (-1.0, 1.0, 1.0), (-1.0, 1.0, -1.0), (-1.0, -1.0, -1.0), (-1.0, -1.0, 1.0), (1.0, -1.0, 1.0), (1.0, -1.0, -1.0), (1.0, 1.0, -1.0), (1.0, 1.0, 1.0), (1.0, -1.0, 1.0), (1.0, 1.0, 1.0), (-1.0, 1.0, 1.0), (-1.0, 1.0, -1.0), (1.0, 1.0, -1.0), (1.0, -1.0, -1.0), (-1.0, -1.0, -1.0)], 1, 1)],
75
+                        'locator': [([(-1.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 0.0, 0.0), (0.0, -1.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 0.0), (0.0, 0.0, 1.0), (0.0, 0.0, -1.0)], 1, 0)],
76
+                        'square': [([(0.0, -1.0, 1.0), (0.0, 1.0, 1.0), (0.0, 1.0, -1.0), (0.0, -1.0, -1.0), (0.0, -1.0, 1.0)], 1, 1)],
77
+                        'square_rounded': [([(0.0, 0.0, -1.0), (0.0, 0.5, -1.0), (0.0, 0.75, -1.0), (0.0, 1.0, -1.0), (0.0, 1.0, -0.75), (0.0, 1.0, -0.5), (0.0, 1.0, 0.5), (0.0, 1.0, 0.75), (0.0, 1.0, 1.0), (0.0, 0.75, 1.0), (0.0, 0.5, 1.0), (0.0, -0.5, 1.0), (0.0, -0.75, 1.0), (0.0, -1.0, 1.0), (0.0, -1.0, 0.75), (0.0, -1.0, 0.5), (0.0, -1.0, -0.5), (0.0, -1.0, -0.75), (0.0, -1.0, -1.0), (0.0, -0.75, -1.0), (0.0, -0.5, -1.0), (0.0, 0.0, -1.0)], 3, 1)],
78
+                        'thin_cross': [([(0.0, 0.2, -0.2), (0.0, 0.2, -1.0), (0.0, -0.2, -1.0), (0.0, -0.2, -0.2), (0.0, -1.0, -0.2), (0.0, -1.0, 0.2), (0.0, -0.2, 0.2), (0.0, -0.2, 1.0), (0.0, 0.2, 1.0), (0.0, 0.2, 0.2), (0.0, 1.0, 0.2), (0.0, 1.0, -0.2), (0.0, 0.2, -0.2)], 1, 1)],
79
+                        'triangle': [([(0.0, 1.0, 0.0), (0.0, -0.5, -0.86), (0.0, -0.5, 0.86), (0.0, 1.0, 0.0)], 1, 1)]}
80
+
81
+            else:
82
+                data = json.load(f)
83
+
84
+        for control in data:
85
+            new = Controller(self, control, data[control])
86
+            self.controllers.add(new)
87
+
88
+        # need to save our new controllers if the file doesn't exists
89
+        if not exists:
90
+            self.save_config()
91
+
92
+        super(Ctrl_O, self).__init__(parent)
93
+
94
+        # CONNECTIONS
95
+
96
+        self.filter.textChanged.connect(self.filterList)
97
+        self.controller_list.itemSelectionChanged.connect(self.display_controller)
98
+
99
+        self.capture.clicked.connect(self.capture_controller)
100
+        self.pop.clicked.connect(self.delete_controller)
101
+
102
+        self.radius.textChanged.connect(self.display_controller)
103
+        self.radius.textChanged.connect(self.rescale)
104
+
105
+        for offset in (self.offsetX, self.offsetY, self.offsetZ):
106
+            offset.setToolTip("Define the position offset of the shape(s)")
107
+            offset.textChanged.connect(self.display_controller)
108
+
109
+        for factor in (self.factorX, self.factorY, self.factorZ):
110
+            factor.setToolTip("Define the scale factor of the shape(s)")
111
+            factor.textChanged.connect(self.display_controller)
112
+
113
+        self.rotate_order.currentIndexChanged.connect(self.display_controller)
114
+
115
+        def toggle_zero(state):
116
+            if state and self.zero.isChecked():
117
+                self.zero.setChecked(False)
118
+
119
+        def toggle_shape(state):
120
+            if state and self.parent_shape.isChecked():
121
+                self.parent_shape.setChecked(False)
122
+            self.zero_iter.setEnabled(state)
123
+
124
+        self.parent_shape.stateChanged.connect(toggle_zero)
125
+        self.zero.stateChanged.connect(toggle_shape)
126
+
127
+        self.mirror.buttonClicked.connect(self.display_controller)
128
+
129
+        self.mirror_reparent.clicked.connect(self.mirror_shapes)
130
+
131
+        self.create.clicked.connect(self.execute)
132
+
133
+        # FINAL MANAGEMENT OF THE CONTROLLER LIST
134
+
135
+        # we get all the shapes contained by the dictionnary and add them as
136
+        # items in our list
137
+        for control in self.controllers:
138
+            item = QTreeWidgetItem(self.controller_list, [control.name])
139
+            item.controller = control
140
+            item.shapes = control.shapes
141
+            self.controller_list.addTopLevelItem(item)
142
+
143
+        # evaluate the controller
144
+        self.controller_list.setCurrentItem(self.controller_list.topLevelItem(0))
145
+        self.controller_list.setFocus(Qt.TabFocusReason)
146
+
147
+        # CALLBACKz
148
+
149
+        self.callbacks = []
150
+        try:
151
+            self.callbacks.append(MEventMessage.addEventCallback('SelectionChanged', self.rescale))
152
+        except TypeError:
153
+            pass
154
+
155
+    def closeEvent(self, *args, **kwargs):
156
+        for callback in reversed(self.callbacks):
157
+            MMessage.removeCallback(callback)
158
+            self.callbacks.remove(callback)
159
+
160
+    def save_config(self):
161
+        with open(self.config_path, 'w') as f:
162
+            json.dump(self.controllers(), f, sort_keys=True,
163
+                      indent=4, separators=(',', ': '))
164
+
165
+    def execute(self):
166
+        """
167
+        apply the presets on the Maya's selection
168
+        """
169
+        item = self.controller_list.currentItem()
170
+        if item:
171
+            undoInfo(openChunk=True)
172
+
173
+            ccs = from_shape(item.shapes,
174
+                             ls(sl=True),
175
+                             radius=self.radius.value(),
176
+                             prefix=self.name_prefix.value,
177
+                             name=self.name.value,
178
+                             suffix=self.name_suffix.value,
179
+                             oc=self.color_picker.color() if not self.mirror.checkedButton().value else self.mirror_color.color(),
180
+                             offset=self.offset(),
181
+                             ori=self.factor(),
182
+                             axis_order=self.rotate_order.itemData(self.rotate_order.currentIndex()),
183
+                             fwg=self.zero_iter.value() if self.zero.isChecked() else False,
184
+                             shape_parent=self.parent_shape.isChecked(),
185
+                             mirror=self.mirror.checkedButton().value)
186
+            select(cl=1)
187
+            for ctrls in ccs:
188
+                select(ctrls, add=True)
189
+
190
+            undoInfo(closeChunk=True)
191
+
192
+    def filterList(self, txt):
193
+        """
194
+        filter the controllers' list
195
+        :param txt: typed filter text
196
+        """
197
+        for i in range(self.controller_list.topLevelItemCount()):
198
+            item = self.controller_list.topLevelItem(i)
199
+            item.setHidden(txt not in item.text(0))
200
+
201
+    def rescale(self, v=None):
202
+        """
203
+        In case the joint's selection have a different radius,
204
+        or the jointDisplayScale has changed, we update our cheap viewport
205
+        :param v:
206
+        :return:
207
+        """
208
+        v = float(self.radius.value())
209
+        try:
210
+            r = getAttr('%s.radius' % ls(sl=True, type='joint')[0]) * self.jds
211
+        except TypeError:
212
+            r = 1
213
+        except IndexError:
214
+            r = self.viewer.ref * v
215
+        finally:
216
+            self.viewer.ref = r / v
217
+        self.viewer.setCoords()
218
+
219
+    def display_controller(self):
220
+        """
221
+        Making the last transforms on the controller, forwarding to the viewer
222
+        """
223
+        item = self.controller_list.currentItem()
224
+        if item:
225
+            cc = item.text(0)
226
+            # global settings sent to the shapes
227
+            offset = self.offset()
228
+            factor = self.factor()
229
+            axis = self.rotate_order.itemData(self.rotate_order.currentIndex())
230
+            mirror = self.mirror.checkedButton().value
231
+
232
+            if self.viewer.controller != cc:
233
+                self.viewer.controller = cc
234
+                self.viewer.load(copy(item.shapes))
235
+
236
+                # defining the scene's scale for the viewer
237
+                try:
238
+                    r = getAttr('%s.radius' % ls(sl=True, type='joint')[0]) * self.jds
239
+                except (TypeError, IndexError):
240
+                    r = 1
241
+                finally:
242
+                    self.viewer.ref = r
243
+
244
+            for i, shape in enumerate(self.viewer.shapes):
245
+                shape.transform(offset, factor, axis, mirror)
246
+
247
+            self.viewer.setCoords()
248
+
249
+    def capture_controller(self):
250
+        """
251
+        This is the first step when we want to get a new controller from
252
+        Maya's scene selection, it gets selection summary then opens
253
+        the Capture dialog
254
+        """
255
+        crvs = ls(sl=True)
256
+
257
+        # abort if selection's empty
258
+        if not len(crvs):
259
+            warning('Cannot capture an empty selection :]')
260
+            return
261
+
262
+        # getting the max values for degrees and closed from all shapes
263
+        degree = 0
264
+        closed = -1
265
+        for crv in crvs:
266
+            shapes = listRelatives(crv, s=True, ni=True, f=True)
267
+            for shape in shapes:
268
+                degree = max(degree, getAttr('%s.d' % shape))
269
+                closed = max(closed, getAttr('%s.f' % shape))
270
+
271
+        # calling the Capture dialog
272
+        Capture(self, crvs[0], degree, closed).show(self.add_controller)
273
+
274
+    def add_controller(self, *args):
275
+        """
276
+        This function is called by the Capture dialog after valid closing
277
+        it can send 3 or 5 arguments, it depends if global settings are
278
+        used for the degrees & closed state
279
+        :param  t: transform (name)
280
+        :param ts: translate space
281
+        :param rs: rotate space
282
+        :param  d: degree (ADDITIONNAL)
283
+        :param  c: closed (ADDITIONNAL)
284
+        """
285
+        try:
286
+            t, ts, rs, d, c = args
287
+        except ValueError:
288
+            # Unpack error, this (probably) means we have 3 args, not 5
289
+            t, ts, rs = args
290
+            d, c = None, None
291
+
292
+        # We raise an error in case of duplicate, will prevent the
293
+        # dialog to be closed
294
+        if t in self.controllers:
295
+            error('Duplicate controller name')
296
+            return
297
+
298
+        # original selection which we duplicate to freeze transform
299
+        orig = ls(sl=True)
300
+        crvs = duplicate(orig, n='duplicates')
301
+
302
+        shapes = []
303
+        mx = -1
304
+
305
+        # we first get the global bounds of the selection so we can
306
+        # normalize the cv coordinates later
307
+        for obj in crvs:
308
+            if listRelatives(obj, p=True):
309
+                parent(obj, w=True)
310
+            if ts or rs:
311
+                makeIdentity(obj, apply=True, t=ts, r=rs, s=1, n=0, pn=1)
312
+
313
+            for crv in listRelatives(obj, c=True, s=True, f=True):
314
+                for i in range(getAttr('%s.degree' % crv) + getAttr('%s.spans' % crv)):
315
+                    for p in xform('%s.cv[%d]' % (crv, i), q=True, t=True, os=True):
316
+                        if mx < abs(p):
317
+                            mx = abs(p)
318
+
319
+        # second loop to store the normalized data of the shapes
320
+        for obj in crvs:
321
+            for crv in listRelatives(obj, c=True, s=True, f=True):
322
+                # number of CVs = spans + (degree if not closed).
323
+                degs = getAttr('%s.degree' % crv)
324
+                spans = getAttr('%s.spans' % crv)
325
+                closed = getAttr('%s.f' % crv)
326
+                pts = []
327
+
328
+                for i in range(spans + (0 if closed else degs)):
329
+                    pts.append(xform('%s.cv[%d]' % (crv, i), q=True, t=True, os=True))
330
+
331
+                pts = [[p / mx for p in pt] for pt in pts]
332
+                shapes.append((pts, d or degs, c or closed))
333
+
334
+        # creating the Controller class for this record
335
+        new = Controller(self, t, shapes)
336
+        self.controllers.add(new)
337
+
338
+        # and making the treewidget item
339
+        item = QTreeWidgetItem(self.controller_list, [t])
340
+        item.controller = new
341
+        item.shapes = new.shapes
342
+
343
+        self.controller_list.addTopLevelItem(item)
344
+        self.controller_list.setCurrentItem(item)
345
+
346
+        # saving the .cfg file
347
+        self.save_config()
348
+
349
+        # cleaning the mess
350
+        delete(crvs)
351
+        select(orig)
352
+
353
+    def delete_controller(self):
354
+        """
355
+        We pop a controller from our controllers' list
356
+        """
357
+        item = self.controller_list.currentItem()
358
+        self.controller_list.takeTopLevelItem(self.controller_list.indexOfTopLevelItem(item))
359
+        self.controllers.remove(item.text(0))
360
+        self.save_config()
361
+
362
+    def update_controller(self, fr, to):
363
+        """
364
+        Renaming a controller
365
+        :param fr: from name
366
+        :param to: new name
367
+        """
368
+        self.controllers[fr].name = to
369
+        # updating the .cfg
370
+        self.save_config()
371
+
372
+    def mirror_shapes(self):
373
+        undoInfo(openChunk=True)
374
+        f, t = self.from_name.value, self.to_name.value
375
+        plane = {'XY': 'z', 'YZ': 'x', 'ZX': 'y'}[self.mirror.checkedButton().text()]
376
+        if not len(f) and not len(t):
377
+            warning("Replacement pattern - name conflict")
378
+        sel = ls(sl=True)
379
+        dups = list()
380
+        for shape in sel:
381
+            old_parent = listRelatives(shape, p=True)
382
+            dup = duplicate(shape, n=shape.replace(f, t))
383
+            mirror_shape(dup, plane)
384
+            override_color(dup, colors[self.mirror_color.currentText()])
385
+            if old_parent:
386
+                parent(dup, old_parent.replace(f, t))
387
+            dups.extend(dup)
388
+        select(dups)
389
+        undoInfo(closeChunk=True)
390
+
391
+
392
+def Display_CtrlO_UI():
393
+    """
394
+    Display function
395
+    """
396
+    CC_Window = Ctrl_O(get_maya_win())
397
+    CC_Window.show()
398
+    return CC_Window
0 399
new file mode 100644
1 400
new file mode 100644
2 401
Binary files /dev/null and b/ccCreator.db differ
3 402
new file mode 100644
... ...
@@ -0,0 +1 @@
0
+__author__ = 'Administrator'
0 1
new file mode 100644
... ...
@@ -0,0 +1,6402 @@
0
+{
1
+    "aim": [
2
+        [
3
+            [
4
+                [
5
+                    -0.9999999999999998,
6
+                    0.0,
7
+                    0.0
8
+                ],
9
+                [
10
+                    0.0,
11
+                    0.0,
12
+                    1.0
13
+                ],
14
+                [
15
+                    0.0,
16
+                    0.0,
17
+                    -1.0
18
+                ],
19
+                [
20
+                    -0.9999999999999998,
21
+                    0.0,
22
+                    0.0
23
+                ],
24
+                [
25
+                    0.0,
26
+                    -1.0,
27
+                    0.0
28
+                ],
29
+                [
30
+                    0.0,
31
+                    1.0,
32
+                    0.0
33
+                ],
34
+                [
35
+                    -0.9999999999999998,
36
+                    0.0,
37
+                    0.0
38
+                ]
39
+            ],
40
+            1,
41
+            false
42
+        ]
43
+    ],
44
+    "arrow": [
45
+        [
46
+            [
47
+                [
48
+                    -1.0,
49
+                    0.0,
50
+                    0.6000000892300252
51
+                ],
52
+                [
53
+                    0.0,
54
+                    0.0,
55
+                    0.6000000892300252
56
+                ],
57
+                [
58
+                    0.0,
59
+                    0.0,
60
+                    1.0
61
+                ],
62
+                [
63
+                    0.6000000892300252,
64
+                    0.0,
65
+                    0.0
66
+                ],
67
+                [
68
+                    0.0,
69
+                    0.0,
70
+                    -1.0
71
+                ],
72
+                [
73
+                    0.0,
74
+                    0.0,
75
+                    -0.6000000892300252
76
+                ],
77
+                [
78
+                    -1.0,
79
+                    0.0,
80
+                    -0.6000000892300252
81
+                ],
82
+                [
83
+                    -1.0,
84
+                    0.0,
85
+                    0.6000000892300252
86
+                ]
87
+            ],
88
+            1,
89
+            false
90
+        ]
91
+    ],
92
+    "arrow_3D": [
93
+        [
94
+            [
95
+                [
96
+                    0.0,
97
+                    0.0,
98
+                    0.0
99
+                ],
100
+                [
101
+                    -1.0,
102
+                    0.0,
103
+                    -1.0
104
+                ],
105
+                [
106
+                    -1.0,
107
+                    0.0,
108
+                    -0.5
109
+                ],
110
+                [
111
+                    -2.0,
112
+                    0.0,
113
+                    -0.5
114
+                ],
115
+                [
116
+                    -2.0,
117
+                    0.0,
118
+                    0.5
119
+                ],
120
+                [
121
+                    -1.0,
122
+                    0.0,
123
+                    0.5
124
+                ],
125
+                [
126
+                    -1.0,
127
+                    0.0,
128
+                    1.0
129
+                ],
130
+                [
131
+                    0.0,
132
+                    0.0,
133
+                    0.0
134
+                ],
135
+                [
136
+                    -1.0,
137
+                    1.0,
138
+                    0.0
139
+                ],
140
+                [
141
+                    -1.0,
142
+                    0.5000000000000003,
143
+                    0.0
144
+                ],
145
+                [
146
+                    -2.0,
147
+                    0.5000000000000006,
148
+                    0.0
149
+                ],
150
+                [
151
+                    -2.0,
152
+                    -0.4999999999999993,
153
+                    0.0
154
+                ],
155
+                [
156
+                    -1.0,
157
+                    -0.5,
158
+                    0.0
159
+                ],
160
+                [
161
+                    -1.0,
162
+                    -1.0,
163
+                    0.0
164
+                ],
165
+                [
166
+                    0.0,
167
+                    0.0,
168
+                    0.0
169
+                ]
170
+            ],
171
+            1,
172
+            false
173
+        ]
174
+    ],
175
+    "arrow_cross": [
176
+        [
177
+            [
178
+                [
179
+                    0.0,
180
+                    0.0,
181
+                    -1.0
182
+                ],
183
+                [
184
+                    0.0,
185
+                    -0.2993197278911566,
186
+                    -0.5510204081632655
187
+                ],
188
+                [
189
+                    0.0,
190
+                    -0.1496598639455783,
191
+                    -0.5510204081632655
192
+                ],
193
+                [
194
+                    0.0,
195
+                    -0.1496598639455783,
196
+                    -0.1496598639455783
197
+                ],
198
+                [
199
+                    0.0,
200
+                    -0.5510204081632655,
201
+                    -0.1496598639455783
202
+                ],
203
+                [
204
+                    0.0,
205
+                    -0.5510204081632655,
206
+                    -0.2993197278911566
207
+                ],
208
+                [
209
+                    0.0,
210
+                    -1.0,
211
+                    0.0
212
+                ],
213
+                [
214
+                    0.0,
215
+                    -0.5510204081632655,
216
+                    0.2993197278911566
217
+                ],
218
+                [
219
+                    0.0,
220
+                    -0.5510204081632655,
221
+                    0.1496598639455783
222
+                ],
223
+                [
224
+                    0.0,
225
+                    -0.1496598639455783,
226
+                    0.1496598639455783
227
+                ],
228
+                [
229
+                    0.0,
230
+                    -0.1496598639455783,
231
+                    0.5510204081632655
232
+                ],
233
+                [
234
+                    0.0,
235
+                    -0.2993197278911566,
236
+                    0.5510204081632655
237
+                ],
238
+                [
239
+                    0.0,
240
+                    0.0,
241
+                    1.0
242
+                ],
243
+                [
244
+                    0.0,
245
+                    0.2993197278911566,
246
+                    0.5510204081632655
247
+                ],
248
+                [
249
+                    0.0,
250
+                    0.1496598639455783,
251
+                    0.5510204081632655
252
+                ],
253
+                [
254
+                    0.0,
255
+                    0.1496598639455783,
256
+                    0.1496598639455783
257
+                ],
258
+                [
259
+                    0.0,
260
+                    0.5510204081632655,
261
+                    0.1496598639455783
262
+                ],
263
+                [
264
+                    0.0,
265
+                    0.5510204081632655,
266
+                    0.2993197278911566
267
+                ],
268
+                [
269
+                    0.0,
270
+                    1.0,
271
+                    0.0
272
+                ],
273
+                [
274
+                    0.0,
275
+                    0.5510204081632655,
276
+                    -0.2993197278911566
277
+                ],
278
+                [
279
+                    0.0,
280
+                    0.5510204081632655,
281
+                    -0.1496598639455783
282
+                ],
283
+                [
284
+                    0.0,
285
+                    0.1496598639455783,
286
+                    -0.1496598639455783
287
+                ],
288
+                [
289
+                    0.0,
290
+                    0.1496598639455783,
291
+                    -0.5510204081632655
292
+                ],
293
+                [
294
+                    0.0,
295
+                    0.2993197278911566,
296
+                    -0.5510204081632655
297
+                ],
298
+                [
299
+                    0.0,
300
+                    0.0,
301
+                    -1.0
302
+                ]
303
+            ],
304
+            1,
305
+            false
306
+        ]
307
+    ],
308
+    "arrow_double_side_long": [
309
+        [
310
+            [
311
+                [
312
+                    0.0,
313
+                    0.0,
314
+                    -1.0
315
+                ],
316
+                [
317
+                    0.0,
318
+                    -0.4285714285714278,
319
+                    -0.4285714285714278
320
+                ],
321
+                [
322
+                    0.0,
323
+                    -0.14285714285714265,
324
+                    -0.4285714285714278
325
+                ],
326
+                [
327
+                    0.0,
328
+                    -0.14285714285714265,
329
+                    0.4285714285714278
330
+                ],
331
+                [
332
+                    0.0,
333
+                    -0.4285714285714278,
334
+                    0.4285714285714278
335
+                ],
336
+                [
337
+                    0.0,
338
+                    0.0,
339
+                    1.0
340
+                ],
341
+                [
342
+                    0.0,
343
+                    0.4285714285714278,
344
+                    0.4285714285714278
345
+                ],
346
+                [
347
+                    0.0,
348
+                    0.14285714285714265,
349
+                    0.4285714285714278
350
+                ],
351
+                [
352
+                    0.0,
353
+                    0.14285714285714265,
354
+                    -0.4285714285714278
355
+                ],
356
+                [
357
+                    0.0,
358
+                    0.4285714285714278,
359
+                    -0.4285714285714278
360
+                ],
361
+                [
362
+                    0.0,
363
+                    0.0,
364
+                    -1.0
365
+                ]
366
+            ],
367
+            1,
368
+            false
369
+        ]
370
+    ],
371
+    "arrow_line_cross": [
372
+        [
373
+            [
374
+                [
375
+                    0.0,
376
+                    0.7142857142857156,
377
+                    -0.28571428571428564
378
+                ],
379
+                [
380
+                    0.0,
381
+                    1.0,
382
+                    0.0
383
+                ],
384
+                [
385
+                    0.0,
386
+                    0.7142857142857156,
387
+                    0.28571428571428564
388
+                ],
389
+                [
390
+                    0.0,
391
+                    1.0,
392
+                    0.0
393
+                ],
394
+                [
395
+                    0.0,
396
+                    -1.0,
397
+                    0.0
398
+                ],
399
+                [
400
+                    0.0,
401
+                    -0.7142857142857156,
402
+                    -0.28571428571428564
403
+                ],
404
+                [
405
+                    0.0,
406
+                    -1.0,
407
+                    0.0
408
+                ],
409
+                [
410
+                    0.0,
411
+                    -0.7142857142857156,
412
+                    0.28571428571428564
413
+                ],
414
+                [
415
+                    0.0,
416
+                    -1.0,
417
+                    0.0
418
+                ],
419
+                [
420
+                    0.0,
421
+                    0.0,
422
+                    0.0
423
+                ],
424
+                [
425
+                    0.0,
426
+                    0.0,
427
+                    1.0
428
+                ],
429
+                [
430
+                    0.0,
431
+                    -0.28571428571428564,
432
+                    0.7142857142857156
433
+                ],
434
+                [
435
+                    0.0,
436
+                    0.0,
437
+                    1.0
438
+                ],
439
+                [
440
+                    0.0,
441
+                    0.28571428571428564,
442
+                    0.7142857142857156
443
+                ],
444
+                [
445
+                    0.0,
446
+                    0.0,
447
+                    1.0
448
+                ],
449
+                [
450
+                    0.0,
451
+                    0.0,
452
+                    -1.0
453
+                ],
454
+                [
455
+                    0.0,
456
+                    0.28571428571428564,
457
+                    -0.7142857142857156
458
+                ],
459
+                [
460
+                    0.0,
461
+                    0.0,
462
+                    -1.0
463
+                ],
464
+                [
465
+                    0.0,
466
+                    -0.28571428571428564,
467
+                    -0.7142857142857156
468
+                ],
469
+                [
470
+                    0.0,
471
+                    0.0,
472
+                    -1.0
473
+                ]
474
+            ],
475
+            1,
476
+            false
477
+        ]
478
+    ],
479
+    "arrow_line_rot180": [
480
+        [
481
+            [
482
+                [
483
+                    0.0,
484
+                    -0.3303439316279786,
485
+                    -1.0
486
+                ],
487
+                [
488
+                    0.0,
489
+                    0.007919349779235071,
490
+                    -0.7408779104866304
491
+                ],
492
+                [
493
+                    0.0,
494
+                    -0.2512029616827851,
495
+                    -0.40261485102806593
496
+                ],
497
+                [
498
+                    0.0,
499
+                    0.007919349779235071,
500
+                    -0.7408779104866304
501
+                ],
502
+                [
503
+                    0.0,
504
+                    -0.09622213804614169,
505
+                    -0.7398288332011501
506
+                ],
507
+                [
508
+                    0.0,
509
+                    -0.2907734466553821,
510
+                    -0.701307425514033
511
+                ],
512
+                [
513
+                    0.0,
514
+                    -0.5366814533789462,
515
+                    -0.5367576557487659
516
+                ],
517
+                [
518
+                    0.0,
519
+                    -0.7013288805501956,
520
+                    -0.29049083204109916
521
+                ],
522
+                [
523
+                    0.0,
524
+                    -0.7590784396122116,
525
+                    0.0
526
+                ],
527
+                [
528
+                    0.0,
529
+                    -0.7013288805501956,
530
+                    0.29049083204109916
531
+                ],
532
+                [
533
+                    0.0,
534
+                    -0.5366814533789462,
535
+                    0.5367576557487659
536
+                ],
537
+                [
538
+                    0.0,
539
+                    -0.2907734466553821,
540
+                    0.701307425514033
541
+                ],
542
+                [
543
+                    0.0,
544
+                    -0.09622213804614169,
545
+                    0.7398288332011501
546
+                ],
547
+                [
548
+                    0.0,
549
+                    0.0,
550
+                    0.7398288332011501
551
+                ],
552
+                [
553
+                    0.0,
554
+                    -0.2512029616827851,
555
+                    0.40261485102806593
556
+                ],
557
+                [
558
+                    0.0,
559
+                    0.0,
560
+                    0.7398288332011501
561
+                ],
562
+                [
563
+                    0.0,
564
+                    -0.3303439316279786,
565
+                    1.0
566
+                ]
567
+            ],
568
+            1,
569
+            false
570
+        ]
571
+    ],
572
+    "arrow_line_rot90": [
573
+        [
574
+            [
575
+                [
576
+                    0.0,
577
+                    -0.7590784396122116,
578
+                    0.0
579
+                ],
580
+                [
581
+                    0.0,
582
+                    -0.7013288805501956,
583
+                    0.29049083204109916
584
+                ],
585
+                [
586
+                    0.0,
587
+                    -0.5366814533789462,
588
+                    0.5367576557487659
589
+                ],
590
+                [
591
+                    0.0,
592
+                    -0.2907734466553821,
593
+                    0.701307425514033
594
+                ],
595
+                [
596
+                    0.0,
597
+                    -0.09622213804614169,
598
+                    0.7398288332011501
599
+                ],
600
+                [
601
+                    0.0,
602
+                    0.007919349779235071,
603
+                    0.7408779104866304
604
+                ],
605
+                [
606
+                    0.0,
607
+                    -0.2512029616827851,
608
+                    0.40261485102806593
609
+                ],
610
+                [
611
+                    0.0,
612
+                    0.007919349779235071,
613
+                    0.7408779104866304
614
+                ],
615
+                [
616
+                    0.0,
617
+                    -0.3303439316279786,
618
+                    1.0
619
+                ]
620
+            ],
621
+            1,
622
+            false
623
+        ]
624
+    ],
625
+    "arrow_octo": [
626
+        [
627
+            [
628
+                [
629
+                    0.0,
630
+                    -1.0,
631
+                    0.0
632
+                ],
633
+                [
634
+                    0.0,
635
+                    -0.7391304347826083,
636
+                    0.19565217391304343
637
+                ],
638
+                [
639
+                    0.0,
640
+                    -0.7391304347826083,
641
+                    0.06521739130434778
642
+                ],
643
+                [
644
+                    0.0,
645
+                    -0.2007725955204215,
646
+                    0.08316258234519103
647
+                ],
648
+                [
649
+                    0.0,
650
+                    -0.5687599472990785,
651
+                    0.4765285902503298
652
+                ],
653
+                [
654
+                    0.0,
655
+                    -0.6609913043478273,
656
+                    0.3842972332015808
657
+                ],
658
+                [
659
+                    0.0,
660
+                    -0.7071067193675887,
661
+                    0.7071067193675887
662
+                ],
663
+                [
664
+                    0.0,
665
+                    -0.3842972332015808,
666
+                    0.6609913043478273
667
+                ],
668
+                [
669
+                    0.0,
670
+                    -0.4765285902503298,
671
+                    0.5687599472990785
672
+                ],
673
+                [
674
+                    0.0,
675
+                    -0.08316258234519103,
676
+                    0.2007725955204215
677
+                ],
678
+                [
679
+                    0.0,
680
+                    -0.06521739130434778,
681
+                    0.7391304347826083
682
+                ],
683
+                [
684
+                    0.0,
685
+                    -0.19565217391304343,
686
+                    0.7391304347826083
687
+                ],
688
+                [
689
+                    0.0,
690
+                    0.0,
691
+                    1.0
692
+                ],
693
+                [
694
+                    0.0,
695
+                    0.19565217391304343,
696
+                    0.7391304347826083
697
+                ],
698
+                [
699
+                    0.0,
700
+                    0.06521739130434778,
701
+                    0.7391304347826083
702
+                ],
703
+                [
704
+                    0.0,
705
+                    0.08316258234519103,
706
+                    0.2007725955204215
707
+                ],
708
+                [
709
+                    0.0,
710
+                    0.4765285902503298,
711
+                    0.5687599472990785
712
+                ],
713
+                [
714
+                    0.0,
715
+                    0.3842972332015808,
716
+                    0.6609913043478273
717
+                ],
718
+                [
719
+                    0.0,
720
+                    0.7071067193675887,
721
+                    0.7071067193675887
722
+                ],
723
+                [
724
+                    0.0,
725
+                    0.6609913043478273,
726
+                    0.3842972332015808
727
+                ],
728
+                [
729
+                    0.0,
730
+                    0.5687599472990785,
731
+                    0.4765285902503298
732
+                ],
733
+                [
734
+                    0.0,
735
+                    0.2007725955204215,
736
+                    0.08316258234519103
737
+                ],
738
+                [
739
+                    0.0,
740
+                    0.7391304347826083,
741
+                    0.06521739130434778
742
+                ],
743
+                [
744
+                    0.0,
745
+                    0.7391304347826083,
746
+                    0.19565217391304343
747
+                ],
748
+                [
749
+                    0.0,
750
+                    1.0,
751
+                    0.0
752
+                ],
753
+                [
754
+                    0.0,
755
+                    0.7391304347826083,
756
+                    -0.19565217391304343
757
+                ],
758
+                [
759
+                    0.0,
760
+                    0.7391304347826083,
761
+                    -0.06521739130434778
762
+                ],
763
+                [
764
+                    0.0,
765
+                    0.2007725955204215,
766
+                    -0.08316258234519103
767
+                ],
768
+                [
769
+                    0.0,
770
+                    0.5687599472990785,
771
+                    -0.4765285902503298
772
+                ],
773
+                [
774
+                    0.0,
775
+                    0.6609913043478273,
776
+                    -0.3842972332015808
777
+                ],
778
+                [
779
+                    0.0,
780
+                    0.7071067193675887,
781
+                    -0.7071067193675887
782
+                ],
783
+                [
784
+                    0.0,
785
+                    0.3842972332015808,
786
+                    -0.6609913043478273
787
+                ],
788
+                [
789
+                    0.0,
790
+                    0.4765285902503298,
791
+                    -0.5687599472990785
792
+                ],
793
+                [
794
+                    0.0,
795
+                    0.08316258234519103,
796
+                    -0.2007725955204215
797
+                ],
798
+                [
799
+                    0.0,
800
+                    0.06521739130434778,
801
+                    -0.7391304347826083
802
+                ],
803
+                [
804
+                    0.0,
805
+                    0.19565217391304343,
806
+                    -0.7391304347826083
807
+                ],
808
+                [
809
+                    0.0,
810
+                    0.0,
811
+                    -1.0
812
+                ],
813
+                [
814
+                    0.0,
815
+                    -0.19565217391304343,
816
+                    -0.7391304347826083
817
+                ],
818
+                [
819
+                    0.0,
820
+                    -0.06521739130434778,
821
+                    -0.7391304347826083
822
+                ],
823
+                [
824
+                    0.0,
825
+                    -0.08316258234519103,
826
+                    -0.2007725955204215
827
+                ],
828
+                [
829
+                    0.0,
830
+                    -0.4765285902503298,
831
+                    -0.5687599472990785
832
+                ],
833
+                [
834
+                    0.0,
835
+                    -0.3842972332015808,
836
+                    -0.6609913043478273
837
+                ],
838
+                [
839
+                    0.0,
840
+                    -0.7071067193675887,
841
+                    -0.7071067193675887
842
+                ],
843
+                [
844
+                    0.0,
845
+                    -0.6609913043478273,
846
+                    -0.3842972332015808
847
+                ],
848
+                [
849
+                    0.0,
850
+                    -0.5687599472990785,
851
+                    -0.4765285902503298
852
+                ],
853
+                [
854
+                    0.0,
855
+                    -0.2007725955204215,
856
+                    -0.08316258234519103
857
+                ],
858
+                [
859
+                    0.0,
860
+                    -0.7391304347826083,
861
+                    -0.06521739130434778
862
+                ],
863
+                [
864
+                    0.0,
865
+                    -0.7391304347826083,
866
+                    -0.19565217391304343
867
+                ],
868
+                [
869
+                    0.0,
870
+                    -1.0,
871
+                    0.0
872
+                ]
873
+            ],
874
+            1,
875
+            false
876
+        ]
877
+    ],
878
+    "arrow_rot90_spin": [
879
+        [
880
+            [
881
+                [
882
+                    0.0,
883
+                    -0.8420984472497198,
884
+                    0.0
885
+                ],
886
+                [
887
+                    0.0,
888
+                    -1.0293349967989243,
889
+                    0.0
890
+                ],
891
+                [
892
+                    0.0,
893
+                    -0.9509314130520042,
894
+                    0.3939185011299529
895
+                ],
896
+                [
897
+                    0.0,
898
+                    -0.727810882931786,
899
+                    0.7277962911283671
900
+                ],
901
+                [
902
+                    0.0,
903
+                    -0.5115393805414659,
904
+                    0.8629556062620739
905
+                ],
906
+                [
907
+                    0.0,
908
+                    -0.8900243135924487,
909
+                    0.9451101954754484
910
+                ],
911
+                [
912
+                    0.0,
913
+                    -0.1136354931026372,
914
+                    1.0
915
+                ],
916
+                [
917
+                    0.0,
918
+                    -0.4903922094361552,
919
+                    0.31893669528484164
920
+                ],
921
+                [
922
+                    0.0,
923
+                    -0.40198685643307025,
924
+                    0.7192473183001297
925
+                ],
926
+                [
927
+                    0.0,
928
+                    -0.595323691799225,
929
+                    0.5955261530716662
930
+                ],
931
+                [
932
+                    0.0,
933
+                    -0.7781270690721268,
934
+                    0.3222581545381424
935
+                ],
936
+                [
937
+                    0.0,
938
+                    -0.8420984472497198,
939
+                    0.0
940
+                ]
941
+            ],
942
+            1,
943
+            false
944
+        ]
945
+    ],
946
+    "arrow_rot90_thin": [
947
+        [
948
+            [
949
+                [
950
+                    0.0,
951
+                    -0.24713823872227828,
952
+                    1.0
953
+                ],
954
+                [
955
+                    0.0,
956
+                    -0.749978342363912,
957
+                    0.9644499747983875
958
+                ],
959
+                [
960
+                    0.0,
961
+                    -0.47897535754788345,
962
+                    0.9159880607358875
963
+                ],
964
+                [
965
+                    0.0,
966
+                    -0.5618542086693548,
967
+                    0.8726530997983877
968
+                ],
969
+                [
970
+                    0.0,
971
+                    -0.7165330456149188,
972
+                    0.7627760364163318
973
+                ],
974
+                [
975
+                    0.0,
976
+                    -0.8951504615045375,
977
+                    0.5420857091103832
978
+                ],
979
+                [
980
+                    0.0,
981
+                    -1.0079650878906254,
982
+                    0.28140554120463707
983
+                ],
984
+                [
985
+                    0.0,
986
+                    -1.0465097735005044,
987
+                    0.0
988
+                ],
989
+                [
990
+                    0.0,
991
+                    -0.9468295189642137,
992
+                    0.0
993
+                ],
994
+                [
995
+                    0.0,
996
+                    -0.9119823824974795,
997
+                    0.2545943721648186
998
+                ],
999