mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
accept VBase4 as a more general Vec4
This commit is contained in:
parent
f57c102fcd
commit
9da136db47
@ -761,8 +761,8 @@ class DirectGuiWidget(DirectGuiBase, NodePath):
|
|||||||
apply(self.setHpr, hpr)
|
apply(self.setHpr, hpr)
|
||||||
if self['scale']:
|
if self['scale']:
|
||||||
scale = self['scale']
|
scale = self['scale']
|
||||||
# Can either be a Vec3 or a tuple of 3 values
|
# Can either be a VBase3 or a tuple of 3 values
|
||||||
if (isinstance(scale, Vec3) or
|
if (isinstance(scale, VBase3) or
|
||||||
(type(scale) == types.IntType) or
|
(type(scale) == types.IntType) or
|
||||||
(type(scale) == types.FloatType)):
|
(type(scale) == types.FloatType)):
|
||||||
self.setScale(scale)
|
self.setScale(scale)
|
||||||
@ -770,8 +770,8 @@ class DirectGuiWidget(DirectGuiBase, NodePath):
|
|||||||
apply(self.setScale, scale)
|
apply(self.setScale, scale)
|
||||||
if self['color']:
|
if self['color']:
|
||||||
color = self['color']
|
color = self['color']
|
||||||
# Can either be a Vec4 or a tuple of 4 values
|
# Can either be a VBase4 or a tuple of 4 values
|
||||||
if (isinstance(color, Vec4)):
|
if (isinstance(color, VBase4)):
|
||||||
self.setColor(color)
|
self.setColor(color)
|
||||||
else:
|
else:
|
||||||
apply(self.setColor, color)
|
apply(self.setColor, color)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user