From 56fd90d05a561c0b7b8bacacad0d300f21c2f268 Mon Sep 17 00:00:00 2001 From: Arihant Parsoya Date: Tue, 7 Apr 2020 12:53:58 +0530 Subject: [PATCH] Fixed bug in rendering of 3D primitives The Geometry class does not have children attribute which caused error in draw_shape() function --- p5/core/primitives.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/p5/core/primitives.py b/p5/core/primitives.py index 732ca058..8591c438 100644 --- a/p5/core/primitives.py +++ b/p5/core/primitives.py @@ -26,6 +26,7 @@ from ..pmath.utils import SINCOS from .shape import PShape +from .geometry import Geometry from . import p5 @@ -579,6 +580,10 @@ def draw_shape(shape, pos=(0, 0, 0)): """ p5.renderer.render(shape) + + if isinstance(shape, Geometry): + return + for child_shape in shape.children: draw_shape(child_shape)