mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
bpdb - bpGroup takes optional static parameter which will return a staticmethod rather than a normal function
This commit is contained in:
parent
54e72e860b
commit
259b3396a6
@ -4418,8 +4418,13 @@ class BpDb:
|
|||||||
argsCopy = args[:]
|
argsCopy = args[:]
|
||||||
def functor(*cArgs, **ckArgs):
|
def functor(*cArgs, **ckArgs):
|
||||||
ckArgs.update(kArgs)
|
ckArgs.update(kArgs)
|
||||||
|
ckArgs.pop('static', None)
|
||||||
ckArgs['frameCount'] = ckArgs.get('frameCount',1)+1
|
ckArgs['frameCount'] = ckArgs.get('frameCount',1)+1
|
||||||
return bpdb.bp(*(cArgs), **ckArgs)
|
return bpdb.bp(*(cArgs), **ckArgs)
|
||||||
|
|
||||||
|
if kArgs.get('static'):
|
||||||
|
return staticmethod(functor)
|
||||||
|
else:
|
||||||
return functor
|
return functor
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user