Skip to content

Commit

Permalink
improving script reloading and PEP8
Browse files Browse the repository at this point in the history
  • Loading branch information
spoonless committed Mar 4, 2019
1 parent 89f9c47 commit ba9eac9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 11 deletions.
16 changes: 13 additions & 3 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,19 @@
"tracker_url": "https://github.com/digicreatures/rigacar/issues",
"category": "Rigging"}

import importlib
importlib.reload(bake_operators)
importlib.reload(car_rig)

if "bpy" in locals():
import importlib
if "bake_operators" in locals():
importlib.reload(bake_operators)
if "car_rig" in locals():
importlib.reload(car_rig)
if "widgets" in locals():
importlib.reload(widgets)
else:
import bpy
from . import bake_operators
from . import car_rig


class BaseCarRigPanel:
Expand Down
17 changes: 9 additions & 8 deletions widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ def create():
ob = bpy.context.scene.objects.link(o)
ob.layers = layers


def get_widgets():
"""
Return array of data compatible with method Mesh.from_pydata.
Expand Down Expand Up @@ -223,14 +224,14 @@ def get_widgets():
(0, 6.800737537560053e-07, -0.6702519059181213), (0, 0.1307603269815445, -0.6573730111122131),
(0, 0.372372567653656, -0.5572936534881592), (0, 0.4739401638507843, -0.47393906116485596),
(0, 0.557294487953186, -0.37237125635147095), (0, 0.6573732495307922, -0.13075871765613556)],
'edges': [(1, 0), (3, 2), (4, 3), (6, 5), (7, 6), (9, 8), (10, 9), (12, 11), (13, 12), (15, 14), (16, 15),
(18, 17), (19, 18), (21, 20), (22, 21), (0, 23), (25, 24), (27, 26), (28, 27), (30, 29), (31, 30),
(33, 32), (34, 33), (36, 35), (37, 36), (39, 38), (40, 39), (42, 41), (43, 42), (45, 44), (46, 45),
(24, 47), (34, 10), (46, 22), (11, 35), (25, 1), (23, 47), (37, 13), (2, 26), (14, 38), (28, 4),
(40, 16), (5, 29), (17, 41), (31, 7), (43, 19), (8, 32), (20, 44), (49, 48), (51, 50), (52, 51),
(54, 53), (55, 54), (57, 56), (58, 57), (60, 59), (61, 60), (63, 62), (64, 63), (66, 65), (67, 66),
(69, 68), (70, 69), (48, 71), (73, 72), (75, 74), (76, 75), (78, 77), (79, 78), (81, 80), (82, 81),
(84, 83), (85, 84), (87, 86), (88, 87), (90, 89), (91, 90), (93, 92), (94, 93), (72, 95)]
'edges': [(1, 0), (3, 2), (4, 3), (6, 5), (7, 6), (9, 8), (10, 9), (12, 11), (13, 12), (15, 14), (16, 15),
(18, 17), (19, 18), (21, 20), (22, 21), (0, 23), (25, 24), (27, 26), (28, 27), (30, 29), (31, 30),
(33, 32), (34, 33), (36, 35), (37, 36), (39, 38), (40, 39), (42, 41), (43, 42), (45, 44), (46, 45),
(24, 47), (34, 10), (46, 22), (11, 35), (25, 1), (23, 47), (37, 13), (2, 26), (14, 38), (28, 4),
(40, 16), (5, 29), (17, 41), (31, 7), (43, 19), (8, 32), (20, 44), (49, 48), (51, 50), (52, 51),
(54, 53), (55, 54), (57, 56), (58, 57), (60, 59), (61, 60), (63, 62), (64, 63), (66, 65), (67, 66),
(69, 68), (70, 69), (48, 71), (73, 72), (75, 74), (76, 75), (78, 77), (79, 78), (81, 80), (82, 81),
(84, 83), (85, 84), (87, 86), (88, 87), (90, 89), (91, 90), (93, 92), (94, 93), (72, 95)]
}

widgets['Steering'] = {
Expand Down

0 comments on commit ba9eac9

Please sign in to comment.