1 from logging
import info
, debug
6 for child
in render
.children
:
7 if child
.name
not in preserve
:
9 msg
= 'unexpected render3d node: %s' % child
.name
12 def assert_aspect2d():
14 'a2dBackground', 'a2dTopCenter', 'a2dTopCenterNS',
15 'a2dBottomCenter', 'a2dBottomCenterNS', 'a2dLeftCenter',
16 'a2dLeftCenterNS', 'a2dRightCenter', 'a2dRightCenterNS',
17 'a2dTopLeft', 'a2dTopLeftNS', 'a2dTopRight',
18 'a2dTopRightNS', 'a2dBottomLeft', 'a2dBottomLeftNS',
19 'a2dBottomRight', 'a2dBottomRightNS', 'test_txt']
20 for child
in aspect2d
.children
:
21 if child
.name
not in preserve
and not child
.has_python_tag('preserve'):
23 msg
= 'unexpected aspect2d node: %s' % child
.name
26 def assert_render2d():
27 for child
in render2d
.children
:
28 preserve
= ['aspect2d', 'pixel2d', 'camera2d']
29 if child
.name
not in preserve
and not child
.has_python_tag('preserve'):
31 msg
= 'unexpected render2d node: %s' % child
.name
35 preserve
= ['window-event', 'window-closed', 'async_loader_0',
36 'render-texture-targets-changed', 'aspectRatioChanged']
37 for evt
in messenger
.getEvents():
38 if evt
not in preserve
:
39 if (acc
:= messenger
.who_accepts(evt
)):
40 for key
, _acc
in acc
.items():
42 print('the event %s accepted by <%s, %s> is persistent' % (evt
, key
, _acc
[0]))
44 msg
= 'unexpected event: %s, %s' % (evt
, str(acc
))
49 'ivalLoop', 'garbageCollectStates', 'collisionLoop',
50 'igLoop', 'audioLoop', 'resetPrevTransform', 'dataLoop',
51 'eventManager', 'simplepbr update', 'on frame music',
53 for task
in taskMgr
.getTasks() + taskMgr
.getDoLaters():
54 if task
.name
not in preserve
and not hasattr(task
, 'preserve'):
55 msg
= 'unexpected task: %s' % task
.name
60 #for buffer in RenderToTexture.buffers:
64 thr_names
= [thread
.name
for thread
in threading
.enumerate()]
65 preserve
= ['MainThread', 'rpc_server']
66 for thr_name
in thr_names
:
67 if thr_name
not in preserve
:
68 msg
= 'unexpected thread: %s' % thr_name