b450f51c295bd015912743a3a33a6c54336d1ca8
1 from logging
import info
, debug
6 for child
in render
.children
:
7 if child
.name
!= 'camera':
10 def assert_aspect2d():
11 for child
in aspect2d
.children
:
13 'a2dBackground', 'a2dTopCenter', 'a2dTopCenterNS',
14 'a2dBottomCenter', 'a2dBottomCenterNS', 'a2dLeftCenter',
15 'a2dLeftCenterNS', 'a2dRightCenter', 'a2dRightCenterNS',
16 'a2dTopLeft', 'a2dTopLeftNS', 'a2dTopRight',
17 'a2dTopRightNS', 'a2dBottomLeft', 'a2dBottomLeftNS',
18 'a2dBottomRight', 'a2dBottomRightNS']
19 if child
.name
not in preserve
and not child
.has_python_tag('preserve'):
22 def assert_render2d():
23 for child
in render2d
.children
:
24 preserve
= ['aspect2d', 'pixel2d', 'camera2d']
25 if child
.name
not in preserve
and not child
.has_python_tag('preserve'):
29 preserve
= ['window-event', 'window-closed', 'async_loader_0',
30 'render-texture-targets-changed', 'aspectRatioChanged']
31 for evt
in messenger
.getEvents():
32 if evt
not in preserve
:
33 msg
= 'unexpected event: %s' % evt
38 'ivalLoop', 'garbageCollectStates', 'collisionLoop',
39 'igLoop', 'audioLoop', 'resetPrevTransform', 'dataLoop',
40 'eventManager', 'simplepbr update', 'on frame music']
41 for task
in taskMgr
.getTasks() + taskMgr
.getDoLaters():
42 if task
.name
not in preserve
and not hasattr(task
, 'preserve'):
43 msg
= 'unexpected task: %s' % task
.name
48 #for buffer in RenderToTexture.buffers:
53 thr_names
= [thread
.name
for thread
in threading
.enumerate()]
54 preserve
= ['MainThread']
55 for thr_name
in thr_names
:
56 if thr_name
not in preserve
:
57 msg
= 'unexpected thread: %s' % thr_name