From 7e222cf09c95508600dfd6b0c1edf4d9b0733b0b Mon Sep 17 00:00:00 2001 From: Darren Ranalli Date: Wed, 25 May 2005 01:45:35 +0000 Subject: [PATCH] added ParamObj __repr__ --- direct/src/showbase/PythonUtil.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index 58ae06ce19..3b6b33ec54 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -1104,6 +1104,12 @@ class ParamObj: # of the param was return self._priorValuesStack.top()[self._curParamStack.top()] + def __repr__(self): + argStr = '' + for param in self.ParamSet.getParams(): + argStr += '%s=%s,' % (param, getSetter(self, param, 'get')()) + return '%s(%s)' % (self.__class__.__name__, argStr) + def bound(value, bound1, bound2): """ returns value if value is between bound1 and bound2