a big update for script programmers:
made a few changes to how string() loggs:
Code:
Universal Model Converter - Session Log
-- importing Pachirisu.md5mesh --
0x0000000000: read string 'MD5Version' from whitespace to ' '
0x000000000B: read string '10
' from whitespace to '\n'
0x000000000F: read string 'commandline' from whitespace to ' '
0x000000001B: read string '""
' from whitespace to '\n'
0x000000001F: read string 'numJoints' from whitespace to ' '
0x000000002B: read string '19
' from whitespace to '\n'
0x000000002F: read string 'numMeshes' from whitespace to ' '
0x0000000039: read string '3
' from whitespace to '\n'
0x000000003C: read string 'joints' from whitespace to ' '
0x0000000045: read string '
"Pachirisu" -1 ( 0.000000 0.000000 0.000000 ) ( 0.000000 0.000000 0.000000 )
"Origin" 0 ( 0.000000 0.000000 0.000000 ) ( 0.000000 0.000000 0.000000 )
"Waist" 1 ( 0.126114 0.000000 0.397004 ) ( -0.707107 0.000000 0.000000 )
"LThigh" 2 ( 0.068227 0.285930 0.397052 ) ( 0.000000 1.000000 0.000000 )
"LFoot" 3 ( 0.068227 0.285930 0.125448 ) ( 0.000000 1.000000 0.000000 )
"RThigh" 2 ( 0.068227 -0.285930 0.397052 ) ( 0.000000 0.000000 0.000000 )
"RFoot" 5 ( 0.068227 -0.285930 0.125448 ) ( 0.000000 0.000000 0.000000 )
"Spine" 2 ( 0.126114 0.000000 0.639819 ) ( -0.707107 0.000000 0.000000 )
"Head" 7 ( 0.126114 0.000000 1.099892 ) ( 0.000000 0.000000 0.000000 )
"LEar" 8 ( 0.090657 0.433147 2.319344 ) ( -0.694692 0.000000 0.000000 )
"REar" 8 ( 0.090657 -0.433147 2.319349 ) ( 0.000000 -0.719307 0.694692 )
"LArm" 7 ( 0.212077 0.319108 0.929318 ) ( 0.000000 1.000000 0.000000 )
"LHand" 11 ( 0.492319 0.319108 0.929318 ) ( 0.000000 1.000000 0.000000 )
"RArm" 7 ( 0.212077 -0.319108 0.929319 ) ( 0.000000 0.000000 0.000000 )
"RHand" 13 ( 0.492319 -0.319108 0.929319 ) ( 0.000000 0.000000 0.000000 )
"Tail1" 2 ( -0.301451 -0.000000 0.397000 ) ( 0.000000 0.000000 0.000000 )
"Tail2" 15 ( -0.985160 -0.000000 0.496078 ) ( -0.070561 -0.070561 -0.703577 )
"Tail3" 16 ( -2.049089 0.000000 0.757557 ) ( -0.054335 -0.054335 -0.705016 )
"Tail4" 17 ( -3.221888 0.000000 0.939409 ) ( -0.131021 -0.131021 -0.694862 )
' from '{' to '}'
-- created temporary file: 'joints' --
0x0000000000: wrote string '
"Pachirisu" -1 ( 0.000000 0.000000 0.000000 ) ( 0.000000 0.000000 0.000000 )
"Origin" 0 ( 0.000000 0.000000 0.000000 ) ( 0.000000 0.000000 0.000000 )
"Waist" 1 ( 0.126114 0.000000 0.397004 ) ( -0.707107 0.000000 0.000000 )
"LThigh" 2 ( 0.068227 0.285930 0.397052 ) ( 0.000000 1.000000 0.000000 )
"LFoot" 3 ( 0.068227 0.285930 0.125448 ) ( 0.000000 1.000000 0.000000 )
"RThigh" 2 ( 0.068227 -0.285930 0.397052 ) ( 0.000000 0.000000 0.000000 )
"RFoot" 5 ( 0.068227 -0.285930 0.125448 ) ( 0.000000 0.000000 0.000000 )
"Spine" 2 ( 0.126114 0.000000 0.639819 ) ( -0.707107 0.000000 0.000000 )
"Head" 7 ( 0.126114 0.000000 1.099892 ) ( 0.000000 0.000000 0.000000 )
"LEar" 8 ( 0.090657 0.433147 2.319344 ) ( -0.694692 0.000000 0.000000 )
"REar" 8 ( 0.090657 -0.433147 2.319349 ) ( 0.000000 -0.719307 0.694692 )
"LArm" 7 ( 0.212077 0.319108 0.929318 ) ( 0.000000 1.000000 0.000000 )
"LHand" 11 ( 0.492319 0.319108 0.929318 ) ( 0.000000 1.000000 0.000000 )
"RArm" 7 ( 0.212077 -0.319108 0.929319 ) ( 0.000000 0.000000 0.000000 )
"RHand" 13 ( 0.492319 -0.319108 0.929319 ) ( 0.000000 0.000000 0.000000 )
"Tail1" 2 ( -0.301451 -0.000000 0.397000 ) ( 0.000000 0.000000 0.000000 )
"Tail2" 15 ( -0.985160 -0.000000 0.496078 ) ( -0.070561 -0.070561 -0.703577 )
"Tail3" 16 ( -2.049089 0.000000 0.757557 ) ( -0.054335 -0.054335 -0.705016 )
"Tail4" 17 ( -3.221888 0.000000 0.939409 ) ( -0.131021 -0.131021 -0.694862 )
'
0x00000005A0: jumping to: 0x0000000000 from start of file
---FORMAT---: created Object: rig_obj
0x0000000000: read string 'Pachirisu' from '"' to '"'
0x000000000E: read string '-1' from whitespace to ' '
0x0000000012: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
0x0000000030: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: Pachirisu
0x000000004F: read string 'Origin' from '"' to '"'
0x000000005A: read string '0' from whitespace to ' '
0x000000005D: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
0x000000007B: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: Origin
0x000000009A: read string 'Waist' from '"' to '"'
0x00000000A4: read string '1' from whitespace to ' '
0x00000000A7: read string ' 0.126114 0.000000 0.397004 ' from '(' to ')'
0x00000000C5: read string ' -0.707107 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: Waist
0x00000000E5: read string 'LThigh' from '"' to '"'
0x00000000F0: read string '2' from whitespace to ' '
0x00000000F3: read string ' 0.068227 0.285930 0.397052 ' from '(' to ')'
0x0000000111: read string ' 0.000000 1.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: LThigh
0x0000000130: read string 'LFoot' from '"' to '"'
0x000000013A: read string '3' from whitespace to ' '
0x000000013D: read string ' 0.068227 0.285930 0.125448 ' from '(' to ')'
0x000000015B: read string ' 0.000000 1.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: LFoot
0x000000017A: read string 'RThigh' from '"' to '"'
0x0000000185: read string '2' from whitespace to ' '
0x0000000188: read string ' 0.068227 -0.285930 0.397052 ' from '(' to ')'
0x00000001A7: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: RThigh
0x00000001C6: read string 'RFoot' from '"' to '"'
0x00000001D0: read string '5' from whitespace to ' '
0x00000001D3: read string ' 0.068227 -0.285930 0.125448 ' from '(' to ')'
0x00000001F2: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: RFoot
0x0000000211: read string 'Spine' from '"' to '"'
0x000000021B: read string '2' from whitespace to ' '
0x000000021E: read string ' 0.126114 0.000000 0.639819 ' from '(' to ')'
0x000000023C: read string ' -0.707107 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: Spine
0x000000025C: read string 'Head' from '"' to '"'
0x0000000265: read string '7' from whitespace to ' '
0x0000000268: read string ' 0.126114 0.000000 1.099892 ' from '(' to ')'
0x0000000286: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: Head
0x00000002A5: read string 'LEar' from '"' to '"'
0x00000002AE: read string '8' from whitespace to ' '
0x00000002B1: read string ' 0.090657 0.433147 2.319344 ' from '(' to ')'
0x00000002CF: read string ' -0.694692 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: LEar
0x00000002EF: read string 'REar' from '"' to '"'
0x00000002F8: read string '8' from whitespace to ' '
0x00000002FB: read string ' 0.090657 -0.433147 2.319349 ' from '(' to ')'
0x000000031A: read string ' 0.000000 -0.719307 0.694692 ' from '(' to ')'
---FORMAT---: created Bone: REar
0x000000033A: read string 'LArm' from '"' to '"'
0x0000000343: read string '7' from whitespace to ' '
0x0000000346: read string ' 0.212077 0.319108 0.929318 ' from '(' to ')'
0x0000000364: read string ' 0.000000 1.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: LArm
0x0000000383: read string 'LHand' from '"' to '"'
0x000000038D: read string '11' from whitespace to ' '
0x0000000391: read string ' 0.492319 0.319108 0.929318 ' from '(' to ')'
0x00000003AF: read string ' 0.000000 1.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: LHand
0x00000003CE: read string 'RArm' from '"' to '"'
0x00000003D7: read string '7' from whitespace to ' '
0x00000003DA: read string ' 0.212077 -0.319108 0.929319 ' from '(' to ')'
0x00000003F9: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: RArm
0x0000000418: read string 'RHand' from '"' to '"'
0x0000000422: read string '13' from whitespace to ' '
0x0000000426: read string ' 0.492319 -0.319108 0.929319 ' from '(' to ')'
0x0000000445: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: RHand
0x0000000464: read string 'Tail1' from '"' to '"'
0x000000046E: read string '2' from whitespace to ' '
0x0000000471: read string ' -0.301451 -0.000000 0.397000 ' from '(' to ')'
0x0000000491: read string ' 0.000000 0.000000 0.000000 ' from '(' to ')'
---FORMAT---: created Bone: Tail1
0x00000004B0: read string 'Tail2' from '"' to '"'
0x00000004BA: read string '15' from whitespace to ' '
0x00000004BE: read string ' -0.985160 -0.000000 0.496078 ' from '(' to ')'
0x00000004DE: read string ' -0.070561 -0.070561 -0.703577 ' from '(' to ')'
---FORMAT---: created Bone: Tail2
0x0000000500: read string 'Tail3' from '"' to '"'
0x000000050A: read string '16' from whitespace to ' '
0x000000050E: read string ' -2.049089 0.000000 0.757557 ' from '(' to ')'
0x000000052D: read string ' -0.054335 -0.054335 -0.705016 ' from '(' to ')'
---FORMAT---: created Bone: Tail3
0x000000054F: read string 'Tail4' from '"' to '"'
0x0000000559: read string '17' from whitespace to ' '
0x000000055D: read string ' -3.221888 0.000000 0.939409 ' from '(' to ')'
0x000000057C: read string ' -0.131021 -0.131021 -0.694862 ' from '(' to ')'
---FORMAT---: created Bone: Tail4
-- switched to file: 'Pachirisu.md5mesh' --
0x00000005E7: read string 'mesh' from whitespace to ' '
also: pstring() now works properly
tbh String(), string(), and pstring() are all the same function pString()...
String() just sends the offset of the current file to pString().
(users cannot access the offset w/o making major changes to COMMON)
also, another dev5 update: I'm scrapping API.py for API/__init__.py
(COMMON, FORMAT, and FILE will be part of API/)
^ making things easier to program for and update
data/ is also renamed plugins/ for LOGGER, VIEWER, GUI, UPDATE, and more.
(GUI won't require VIEWER either)
if you only have GUI, the API will auto-adapt and display a basic buttons window showing alot of the options of the VIEWER+GUI mode, as well as info as to what's imported.
though I can only assume it will be slower due to PyQt.
also, I'm close to cracking PyStream Shaders ;D
I've figured out the installation, but am still working on the usage...
(creating shaders is easy, but using them, I still need to find)
and yes, these are GLSL shaders written in the Python language (following GLSL standards)
a nifty feature: I can import the shader and use the functions defined in it without hastle. :D
so that's another dev5 update. XD
as for MD5, I'm working on creating the meshes now.
EDIT:
I'll be honest, I still have yet to add a few of the complex features such as string( [1] ) (or readline) and recursive checking
note:
string( [5] ) - read 5 lines
string( [0] ) - string( [ ] )
string( [-0] ) - list(reversed( string( [ ] ) )) (I hope -0 < 0 = True)
string( [-5] ) - read 5 lines back (current pos - 5 = new pos)
EDIT2:
I'm tempted to work on a dev5 library for dev4.5 (to make porting scripts easier) :3
should I go for it and release that at the -->Next update, or should I leave it??
for example:
switch() is a class in dev5
s = switch(val)
if s.case(test):
if s.default:
why a class??:
the answer is global vs local.
"default" cannot be performed with global in an inner switch with an outer default in dev4,
and is therefore excluded:
switch
case:
-switch
-case:
-default: (optional)
default: (value-test is a result of the inner switch)
as such, you can't build a switch with cases that support fall-through and have a default.
the closest you could come to a "default" in dev4 is:
if case:
elif case:
else:
the fall-through method cannot properly support a "default"
if case:
if case:
if case:
else: (last "if" only)