From 9da136db47378f9823bd0a213a653f31a5ec6a3d Mon Sep 17 00:00:00 2001 From: Josh Wilson Date: Fri, 7 Sep 2007 22:49:08 +0000 Subject: [PATCH] accept VBase4 as a more general Vec4 --- direct/src/gui/DirectGuiBase.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/direct/src/gui/DirectGuiBase.py b/direct/src/gui/DirectGuiBase.py index d355969cf4..aac60895d9 100644 --- a/direct/src/gui/DirectGuiBase.py +++ b/direct/src/gui/DirectGuiBase.py @@ -761,8 +761,8 @@ class DirectGuiWidget(DirectGuiBase, NodePath): apply(self.setHpr, hpr) if self['scale']: scale = self['scale'] - # Can either be a Vec3 or a tuple of 3 values - if (isinstance(scale, Vec3) or + # Can either be a VBase3 or a tuple of 3 values + if (isinstance(scale, VBase3) or (type(scale) == types.IntType) or (type(scale) == types.FloatType)): self.setScale(scale) @@ -770,8 +770,8 @@ class DirectGuiWidget(DirectGuiBase, NodePath): apply(self.setScale, scale) if self['color']: color = self['color'] - # Can either be a Vec4 or a tuple of 4 values - if (isinstance(color, Vec4)): + # Can either be a VBase4 or a tuple of 4 values + if (isinstance(color, VBase4)): self.setColor(color) else: apply(self.setColor, color)