Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 183a5a4439
Fetching contributors…

Cannot retrieve contributors at this time

325 lines (309 sloc) 25.082 kB
# Test the mayabinary module
import unittest
from cgkit import mayabinary
polycubesceneContents = [
('GRP_BEGIN', 'FOR4[Maya]', 'FOR4', 'Maya', 64376, 8, 0, None),
('GRP_BEGIN', 'FOR4[Maya].FOR4[HEAD]', 'FOR4', 'HEAD', 380, 20, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[HEAD].VERS', 'VERS', 3, 3, 32, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].UVER', 'UVER', 5, 5, 44, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].MADE', 'MADE', 5, 5, 60, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].CHNG', 'CHNG', 29, 29, 76, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].ICON', 'ICON', 5, 5, 116, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].INFO', 'INFO', 5, 5, 132, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].OBJN', 'OBJN', 5, 5, 148, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].INCL', 'INCL', 6, 6, 164, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].LUNI', 'LUNI', 2, 2, 180, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].TUNI', 'TUNI', 4, 4, 192, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].AUNI', 'AUNI', 3, 3, 204, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].FINF', 'FINF', 17, 17, 216, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].FINF', 'FINF', 27, 27, 244, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].FINF', 'FINF', 12, 12, 280, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].FINF', 'FINF', 34, 34, 300, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].FINF', 'FINF', 55, 55, 344, 2, 'FOR4[Maya].FOR4[HEAD]'),
('GRP_END', 'FOR4[Maya].FOR4[HEAD]', 'FOR4', 'HEAD', 380, 20, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 112, 408, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[XFRM].CREA', 'CREA', 7, 7, 420, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBLE', 'DBLE', 11, 11, 436, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 456, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 492, 2, 'FOR4[Maya].FOR4[XFRM]'),
('GRP_END', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 112, 408, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 236, 528, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DCAM].CREA', 'CREA', 18, 18, 540, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 568, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 588, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 608, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 11, 11, 632, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 17, 17, 652, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 16, 16, 680, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBL3', 'DBL3', 28, 28, 704, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 23, 23, 740, 2, 'FOR4[Maya].FOR4[DCAM]'),
('GRP_END', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 236, 528, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 112, 772, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[XFRM].CREA', 'CREA', 5, 5, 784, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBLE', 'DBLE', 11, 11, 800, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 820, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 856, 2, 'FOR4[Maya].FOR4[XFRM]'),
('GRP_END', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 112, 772, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 236, 892, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DCAM].CREA', 'CREA', 14, 14, 904, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 928, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 948, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 972, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 996, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 9, 9, 1016, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 15, 15, 1036, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 14, 14, 1060, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 23, 23, 1084, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 1116, 2, 'FOR4[Maya].FOR4[DCAM]'),
('GRP_END', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 236, 892, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 76, 1136, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[XFRM].CREA', 'CREA', 7, 7, 1148, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBLE', 'DBLE', 11, 11, 1164, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 1184, 2, 'FOR4[Maya].FOR4[XFRM]'),
('GRP_END', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 76, 1136, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 244, 1220, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DCAM].CREA', 'CREA', 18, 18, 1232, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 1260, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 1280, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 1304, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 1328, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 11, 11, 1348, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 17, 17, 1368, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 16, 16, 1396, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 23, 23, 1420, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 1452, 2, 'FOR4[Maya].FOR4[DCAM]'),
('GRP_END', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 244, 1220, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 112, 1472, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[XFRM].CREA', 'CREA', 6, 6, 1484, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBLE', 'DBLE', 11, 11, 1500, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 1520, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 1556, 2, 'FOR4[Maya].FOR4[XFRM]'),
('GRP_END', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 112, 1472, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 236, 1592, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DCAM].CREA', 'CREA', 16, 16, 1604, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 1628, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 1648, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 1672, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 1696, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 10, 10, 1716, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 16, 16, 1736, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 15, 15, 1760, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 23, 23, 1784, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 1816, 2, 'FOR4[Maya].FOR4[DCAM]'),
('GRP_END', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 236, 1592, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 20, 1836, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[XFRM].CREA', 'CREA', 8, 8, 1848, 2, 'FOR4[Maya].FOR4[XFRM]'),
('GRP_END', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 20, 1836, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DMSH]', 'FOR4', 'DMSH', 260, 1864, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DMSH].CREA', 'CREA', 20, 20, 1876, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].FLGS', 'FLGS', 3, 3, 1904, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].DBLE', 'DBLE', 13, 13, 1916, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].DBLE', 'DBLE', 13, 13, 1940, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].STR ', 'STR ', 19, 19, 1964, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].STR ', 'STR ', 11, 11, 1992, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].STR ', 'STR ', 21, 21, 2012, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].CMPD', 'CMPD', 33, 33, 2044, 2, 'FOR4[Maya].FOR4[DMSH]'),
('FOR4[Maya].FOR4[DMSH].CMPD', 'CMPD', 33, 33, 2088, 2, 'FOR4[Maya].FOR4[DMSH]'),
('GRP_END', 'FOR4[Maya].FOR4[DMSH]', 'FOR4', 'DMSH', 260, 1864, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 96, 2132, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[XFRM].CREA', 'CREA', 9, 9, 2144, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 2164, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 2200, 2, 'FOR4[Maya].FOR4[XFRM]'),
('GRP_END', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 96, 2132, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 272, 2236, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DCAM].CREA', 'CREA', 22, 22, 2248, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].FLGS', 'FLGS', 3, 3, 2280, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 2292, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBL2', 'DBL2', 21, 21, 2316, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 2348, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 2368, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 2392, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 2416, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 13, 13, 2436, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 19, 19, 2460, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].STR ', 'STR ', 18, 18, 2488, 2, 'FOR4[Maya].FOR4[DCAM]'),
('GRP_END', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 272, 2236, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 96, 2516, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[XFRM].CREA', 'CREA', 12, 12, 2528, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 2548, 2, 'FOR4[Maya].FOR4[XFRM]'),
('FOR4[Maya].FOR4[XFRM].DBL3', 'DBL3', 27, 27, 2584, 2, 'FOR4[Maya].FOR4[XFRM]'),
('GRP_END', 'FOR4[Maya].FOR4[XFRM]', 'FOR4', 'XFRM', 96, 2516, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SPTL]', 'FOR4', 'SPTL', 52, 2620, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SPTL].CREA', 'CREA', 28, 28, 2632, 2, 'FOR4[Maya].FOR4[SPTL]'),
('FOR4[Maya].FOR4[SPTL].FLGS', 'FLGS', 3, 3, 2668, 2, 'FOR4[Maya].FOR4[SPTL]'),
('GRP_END', 'FOR4[Maya].FOR4[SPTL]', 'FOR4', 'SPTL', 52, 2620, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 172, 2680, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DCAM].CREA', 'CREA', 25, 25, 2692, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 11, 11, 2728, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 2748, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 2772, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 2792, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 13, 13, 2816, 2, 'FOR4[Maya].FOR4[DCAM]'),
('FOR4[Maya].FOR4[DCAM].DBLE', 'DBLE', 12, 12, 2840, 2, 'FOR4[Maya].FOR4[DCAM]'),
('GRP_END', 'FOR4[Maya].FOR4[DCAM]', 'FOR4', 'DCAM', 172, 2680, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[RLLK]', 'FOR4', 'RLLK', 68, 2860, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[RLLK].CREA', 'CREA', 14, 14, 2872, 2, 'FOR4[Maya].FOR4[RLLK]'),
('FOR4[Maya].FOR4[RLLK].FLGS', 'FLGS', 9, 9, 2896, 2, 'FOR4[Maya].FOR4[RLLK]'),
('FOR4[Maya].FOR4[RLLK].FLGS', 'FLGS', 10, 10, 2916, 2, 'FOR4[Maya].FOR4[RLLK]'),
('GRP_END', 'FOR4[Maya].FOR4[RLLK]', 'FOR4', 'RLLK', 68, 2860, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DPLM]', 'FOR4', 'DPLM', 48, 2936, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DPLM].CREA', 'CREA', 14, 14, 2948, 2, 'FOR4[Maya].FOR4[DPLM]'),
('FOR4[Maya].FOR4[DPLM].FLGS', 'FLGS', 9, 9, 2972, 2, 'FOR4[Maya].FOR4[DPLM]'),
('GRP_END', 'FOR4[Maya].FOR4[DPLM]', 'FOR4', 'DPLM', 48, 2936, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DSPL]', 'FOR4', 'DSPL', 28, 2992, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DSPL].CREA', 'CREA', 14, 14, 3004, 2, 'FOR4[Maya].FOR4[DSPL]'),
('GRP_END', 'FOR4[Maya].FOR4[DSPL]', 'FOR4', 'DSPL', 28, 2992, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[RNLM]', 'FOR4', 'RNLM', 52, 3028, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[RNLM].CREA', 'CREA', 20, 20, 3040, 2, 'FOR4[Maya].FOR4[RNLM]'),
('FOR4[Maya].FOR4[RNLM].FLGS', 'FLGS', 10, 10, 3068, 2, 'FOR4[Maya].FOR4[RNLM]'),
('GRP_END', 'FOR4[Maya].FOR4[RNLM]', 'FOR4', 'RNLM', 52, 3028, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[RNDL]', 'FOR4', 'RNDL', 52, 3088, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[RNDL].CREA', 'CREA', 20, 20, 3100, 2, 'FOR4[Maya].FOR4[RNDL]'),
('FOR4[Maya].FOR4[RNDL].DBLE', 'DBLE', 11, 11, 3128, 2, 'FOR4[Maya].FOR4[RNDL]'),
('GRP_END', 'FOR4[Maya].FOR4[RNDL]', 'FOR4', 'RNDL', 52, 3088, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[PCUB]', 'FOR4', 'PCUB', 88, 3148, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[PCUB].CREA', 'CREA', 11, 11, 3160, 2, 'FOR4[Maya].FOR4[PCUB]'),
('FOR4[Maya].FOR4[PCUB].DBLE', 'DBLE', 11, 11, 3180, 2, 'FOR4[Maya].FOR4[PCUB]'),
('FOR4[Maya].FOR4[PCUB].DBLE', 'DBLE', 11, 11, 3200, 2, 'FOR4[Maya].FOR4[PCUB]'),
('FOR4[Maya].FOR4[PCUB].DBLE', 'DBLE', 13, 13, 3220, 2, 'FOR4[Maya].FOR4[PCUB]'),
('GRP_END', 'FOR4[Maya].FOR4[PCUB]', 'FOR4', 'PCUB', 88, 3148, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[RBLN]', 'FOR4', 'RBLN', 44, 3244, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[RBLN].CREA', 'CREA', 8, 8, 3256, 2, 'FOR4[Maya].FOR4[RBLN]'),
('FOR4[Maya].FOR4[RBLN].FLT3', 'FLT3', 15, 15, 3272, 2, 'FOR4[Maya].FOR4[RBLN]'),
('GRP_END', 'FOR4[Maya].FOR4[RBLN]', 'FOR4', 'RBLN', 44, 3244, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SHAD]', 'FOR4', 'SHAD', 68, 3296, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SHAD].CREA', 'CREA', 10, 10, 3308, 2, 'FOR4[Maya].FOR4[SHAD]'),
('FOR4[Maya].FOR4[SHAD].DBLE', 'DBLE', 13, 13, 3328, 2, 'FOR4[Maya].FOR4[SHAD]'),
('FOR4[Maya].FOR4[SHAD].DBLE', 'DBLE', 12, 12, 3352, 2, 'FOR4[Maya].FOR4[SHAD]'),
('GRP_END', 'FOR4[Maya].FOR4[SHAD]', 'FOR4', 'SHAD', 68, 3296, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[DMTI]', 'FOR4', 'DMTI', 28, 3372, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[DMTI].CREA', 'CREA', 15, 15, 3384, 2, 'FOR4[Maya].FOR4[DMTI]'),
('GRP_END', 'FOR4[Maya].FOR4[DMTI]', 'FOR4', 'DMTI', 28, 3372, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SCRP]', 'FOR4', 'SCRP', 58848, 3408, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SCRP].CREA', 'CREA', 27, 27, 3420, 2, 'FOR4[Maya].FOR4[SCRP]'),
('FOR4[Maya].FOR4[SCRP].STR ', 'STR ', 58779, 58779, 3456, 2, 'FOR4[Maya].FOR4[SCRP]'),
('FOR4[Maya].FOR4[SCRP].DBLE', 'DBLE', 12, 12, 62244, 2, 'FOR4[Maya].FOR4[SCRP]'),
('GRP_END', 'FOR4[Maya].FOR4[SCRP]', 'FOR4', 'SCRP', 58848, 3408, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SCRP]', 'FOR4', 'SCRP', 124, 62264, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SCRP].CREA', 'CREA', 30, 30, 62276, 2, 'FOR4[Maya].FOR4[SCRP]'),
('FOR4[Maya].FOR4[SCRP].STR ', 'STR ', 50, 50, 62316, 2, 'FOR4[Maya].FOR4[SCRP]'),
('FOR4[Maya].FOR4[SCRP].DBLE', 'DBLE', 12, 12, 62376, 2, 'FOR4[Maya].FOR4[SCRP]'),
('GRP_END', 'FOR4[Maya].FOR4[SCRP]', 'FOR4', 'SCRP', 124, 62264, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 36, 62396, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 6, 6, 62408, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].DBLE', 'DBLE', 7, 7, 62424, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 36, 62396, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 44, 62440, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 16, 16, 62452, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].FLGS', 'FLGS', 8, 8, 62476, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 44, 62440, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 32, 62492, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 19, 19, 62504, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 32, 62492, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 48, 62532, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 19, 19, 62544, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].FLGS', 'FLGS', 7, 7, 62572, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 48, 62532, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 48, 62588, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 17, 17, 62600, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].FLGS', 'FLGS', 7, 7, 62628, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 48, 62588, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 24, 62644, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 11, 11, 62656, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 24, 62644, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 52, 62676, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 20, 20, 62688, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].DBLE', 'DBLE', 12, 12, 62716, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 52, 62676, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 52, 62736, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 18, 18, 62748, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].DBLE', 'DBLE', 12, 12, 62776, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 52, 62736, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 52, 62796, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 18, 18, 62808, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].DBLE', 'DBLE', 12, 12, 62836, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 52, 62796, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 28, 62856, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 16, 16, 62868, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 28, 62856, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 84, 62892, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 22, 22, 62904, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].DBLE', 'DBLE', 14, 14, 62936, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].DBLE', 'DBLE', 14, 14, 62960, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 84, 62892, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 96, 62984, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[SLCT].SLCT', 'SLCT', 29, 29, 62996, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].STR ', 'STR ', 7, 7, 63036, 2, 'FOR4[Maya].FOR4[SLCT]'),
('FOR4[Maya].FOR4[SLCT].STR ', 'STR ', 27, 27, 63052, 2, 'FOR4[Maya].FOR4[SLCT]'),
('GRP_END', 'FOR4[Maya].FOR4[SLCT]', 'FOR4', 'SLCT', 96, 62984, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].LIS4[CONS]', 'LIS4', 'CONS', 1256, 63088, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].LIS4[CONS].FOR4[CONN]', 'FOR4', 'CONN', 1244, 63100, 2, 'FOR4[Maya].LIS4[CONS]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 29, 29, 63112, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 38, 38, 63152, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 47, 47, 63200, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 51, 51, 63256, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 47, 47, 63316, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 49, 49, 63372, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 47, 47, 63432, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 39, 39, 63488, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 48, 48, 63536, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 52, 52, 63592, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 48, 48, 63652, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 50, 50, 63708, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 48, 48, 63768, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 40, 40, 63824, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 37, 37, 63872, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 52, 52, 63920, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 23, 23, 63980, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 30, 30, 64012, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 31, 31, 64052, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 28, 28, 64092, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 33, 33, 64128, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 34, 34, 64172, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 33, 33, 64216, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 35, 35, 64260, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('FOR4[Maya].LIS4[CONS].FOR4[CONN].CWFL', 'CWFL', 37, 37, 64304, 3, 'FOR4[Maya].LIS4[CONS].FOR4[CONN]'),
('GRP_END', 'FOR4[Maya].LIS4[CONS].FOR4[CONN]', 'FOR4', 'CONN', 1244, 63100, 2, 'FOR4[Maya].LIS4[CONS]'),
('GRP_END', 'FOR4[Maya].LIS4[CONS]', 'LIS4', 'CONS', 1256, 63088, 1, 'FOR4[Maya]'),
('GRP_BEGIN', 'FOR4[Maya].FOR4[HEAD]', 'FOR4', 'HEAD', 32, 64352, 1, 'FOR4[Maya]'),
('FOR4[Maya].FOR4[HEAD].OBJN', 'OBJN', 2, 2, 64364, 2, 'FOR4[Maya].FOR4[HEAD]'),
('FOR4[Maya].FOR4[HEAD].INCL', 'INCL', 6, 6, 64376, 2, 'FOR4[Maya].FOR4[HEAD]'),
('GRP_END', 'FOR4[Maya].FOR4[HEAD]', 'FOR4', 'HEAD', 32, 64352, 1, 'FOR4[Maya]'),
('GRP_END', 'FOR4[Maya]', 'FOR4', 'Maya', 64376, 8, 0, None)]
class TestReader(mayabinary.MBReader):
"""Collect all data passed to the callbacks.
"""
def __init__(self):
mayabinary.MBReader.__init__(self)
self.dataList = []
def onBeginGroup(self, chunk):
if chunk.parent is None:
parentTag = None
else:
parentTag = chunk.parent.chunkPath()
data = ("GRP_BEGIN", chunk.chunkPath(), chunk.tag, chunk.type, chunk.size, chunk.pos, chunk.depth, parentTag)
self.dataList.append(data)
def onEndGroup(self, chunk):
if chunk.parent is None:
parentTag = None
else:
parentTag = chunk.parent.chunkPath()
data = ("GRP_END", chunk.chunkPath(), chunk.tag, chunk.type, chunk.size, chunk.pos, chunk.depth, parentTag)
self.dataList.append(data)
def onDataChunk(self, chunk):
buffer = chunk.read()
data = (chunk.chunkPath(), chunk.tag, chunk.size, len(buffer), chunk.pos, chunk.depth, chunk.parent.chunkPath())
self.dataList.append(data)
class TestMayaBinary(unittest.TestCase):
def testMBReader(self):
rd = TestReader()
rd.read("data/polycubescene.mb")
# f = open("datalist.py", "wt")
# for data in rd.dataList:
# print >>f, " %s,"%(data,)
# f.close()
if rd.dataList!=polycubesceneContents:
self.fail("Maya binary contents mismatch (polycubescene.mb)")
######################################################################
if __name__=="__main__":
unittest.main()
Jump to Line
Something went wrong with that request. Please try again.