XMF Joiner

DataMine
by DataMine · 17 posts
11 years ago in Other
Posted 11 years ago · Author
This is a vbs script written by dcdani @ imvu (http://www.dcdani.com).

The purpose of this script is to join multiple mesh files (xmf) into a single mesh file. For example, if you have 2 chair meshes, it will combine them into a single product. Both meshes will retain their texture information and positioning. However, if both products share the same position, it will clip them into each other.


Code
' By dcdani @ imvu
' www.dcdani.com
'

' se le arrastran encima los ficheros y los junta en uno solo :-|
Set WshShell = WScript.CreateObject("WScript.Shell")
 
Set inCsvSys = CreateObject("Scripting.FileSystemObject")
dim resultado,rtxt,submeshes
dim fout
If Wscript.Arguments.Count = 0 Then
    msgbox "Please drag-drop files to join"
Else
   resultado="":submeshes=0
   fout=Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "joined.xmf"
   ' w=WshShell.Popup("Joining... please wait", 1, "_JoinXmf by dcdani @imvu www.dcdani.com ", 64) 
 
 
   for k=0 to Wscript.Arguments.Count-1
    leefichero  Wscript.Arguments(k)
    rtxt=rtxt & vbcrlf & "Procesado:" &   Wscript.Arguments(k)
   next
  Set outxmf   = inCsvSys.OpenTextFile(fout ,"2",True) 
  outxmf.writeline "<HEADER MAGIC=""XMF"" VERSION=""919"" />"
  outxmf.writeline "<MESH NUMSUBMESH=" & """" & submeshes & """" & ">"
  resultado=replace(resultado,vbcrlf & vbcrlf ,vbcrlf)
  outxmf.writeline resultado 
  outxmf.writeline "</MESH>"
  msgbox "xmf Joiner : www.dcdani.com . dcdani @ imvu " & vbcrlf & "Submeshes:" & submeshes & vbcrlf & "File created in :" & fout
  outxmf.close
End If

 
sub leefichero(f)
  Set inxmf    = inCsvSys.OpenTextFile(f,"1",True)
  dim fall
  fall=inxmf.ReadAll
  if instr(fall,"<MESH") then
      fall=right(fall,len(fall)-instr(fall,"<MESH")-5)
      if instr(fall,"NUMSUBMESH=") then
         duma=left(fall,instr(fall,"NUMSUBMESH=")-1)
         dumb=right(fall,len(fall)-instr(fall,"NUMSUBMESH=")-11)
         dumc=left(dumb,instr(dumb,"""")-1)
         submeshes=submeshes + dumc*1
         fall=dumb
         ' tenemos hasta el submeshes, terminamos la linea
         fall=right(fall,len(fall)-instr(fall,vbcrlf)-1)
         
         
      end if
   
  end if
  fall=replace(fall,vbcrlf & "</MESH>","")
 
  resultado=resultado & fall
   
  inxmf.Close
end sub
Posted 10 years ago
Is there a script that separates out submeshes?

-- Sun Dec 08, 2013 1:48 pm --

http://deliverancenow.info/IMVU/cast/cast.html

Joins and provides UV maps into one xmf with submeshes.

Another thought, is it possible to use these joiners that combines several meshes into one without having them combine into submeshes? Or is this only accomplished from 3ds?
Posted 7 years ago
Do anybody know if this still works or can tell me how to use this script plz
Posted 7 years ago · Author
8ball187 wrote:
Do anybody know if this still works or can tell me how to use this script plz


Should still work.

Instructions:

1) Copy and paste the code into a new text file.
2) rename the text file to meshjoin.vbs
3) drag multiple meshes onto the file
Posted 7 years ago
Thanks DM I'm going try it when I get back home...It will be a life saver for me if it works
Posted 5 years ago
@DM Does this scrip still work? I tried to make one as per instruction but files wont drag drop onto it. Even http://deliverancenow.info/IMVU/cast/cast.html doesn't work for me now... when I click this link it says account suspended....Thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT