mirror of
https://github.com/csd4ni3l/simulator-games.git
synced 2026-01-01 04:13:44 +01:00
fix windows crash again by not even importing svgpathtools
This commit is contained in:
@@ -6,8 +6,6 @@ from arcade.gui.experimental.scroll_area import UIScrollArea, UIScrollBar
|
|||||||
|
|
||||||
from pymunk.autogeometry import convex_decomposition
|
from pymunk.autogeometry import convex_decomposition
|
||||||
|
|
||||||
from svgpathtools import svg2paths
|
|
||||||
|
|
||||||
from game.physics_playground.body_inventory import BodyInventory
|
from game.physics_playground.body_inventory import BodyInventory
|
||||||
|
|
||||||
from utils.constants import menu_background_color, button_style
|
from utils.constants import menu_background_color, button_style
|
||||||
@@ -282,7 +280,10 @@ class Game(arcade.gui.UIView):
|
|||||||
return pts
|
return pts
|
||||||
|
|
||||||
def add_custom_body(self, file_path):
|
def add_custom_body(self, file_path):
|
||||||
|
#add imports here to avoid Windows crash
|
||||||
import cairosvg
|
import cairosvg
|
||||||
|
from svgpathtools import svg2paths
|
||||||
|
|
||||||
paths, _ = svg2paths(file_path)
|
paths, _ = svg2paths(file_path)
|
||||||
|
|
||||||
pts = self.sample_path(paths[0], 64)
|
pts = self.sample_path(paths[0], 64)
|
||||||
|
|||||||
Reference in New Issue
Block a user