8,018
edits
m (oops, I should have used the vanilla/ path for those pages I edited, shouldn't I? ^_^;) |
Paradox-01 (talk | contribs) m (Dumping some old code snippet. Actually I remember I made a combined TRBS-TRMA-TXMP generator... Might be in the addons.) |
||
Line 47: | Line 47: | ||
:TXMPIteration001%2FKS_thigh_horiz.oni<br> | :TXMPIteration001%2FKS_thigh_horiz.oni<br> | ||
:[...] | :[...] | ||
==Code snippets== | |||
===VBS for XSI=== | |||
Gets file path, width and height of all textures of selected character. Could be [[Mod_Tool/Scripting#Write_text_file|extended to write XML]] for a TRMA and TXMP generator. | |||
if selection.count > 0 then | |||
' any part could be selected, let's find the root body part | |||
SelectNeighborObj selection(0), 4 | |||
' get all members including the pelvis | |||
set bodyparts = selection(0).FindChildren( , , siMeshFamily) | |||
for each member in bodyparts | |||
logmessage "object name: " & member.name | |||
if not typename(member.Material.CurrentImageClip) = "Nothing" then | |||
logmessage "texture: " & member.Material.CurrentImageClip.source.filename.value | |||
'logmessage "material: " & member.Material.name | |||
'logmessage "shader: " & member.Material.shaders(0).name | |||
logmessage "X: " & member.Material.CurrentImageClip.source.Parameters("XRes").Value | |||
logmessage "Y: " & member.Material.CurrentImageClip.source.Parameters("YRes").Value | |||
end if | |||
logmessage "----------------------------------------------------------" | |||
next | |||
logmessage "counted body parts: " & bodyparts.count | |||
end if | |||
{{XML}} | {{XML}} |
edits