PromeTheuS Posted March 26, 2014 Report Share Posted March 26, 2014 Por casualidad alguien sabría como hacer que cuando se utilize este python pues que cuando seleccione el archivo ".m4f" pues que no se cierre, que siga la ventana abierta y seleccione todas las veces que quiera y que no se cierre porque cuando selecciono los archivos ".m4f" si me los lee pero se me cierra la ventana y tengo que arrastrar otra vez y tengo como 1000 archivos en ".m4f" y es muy costoso... Aqui dejo el código. fname = getOpenFileName types:"File(*.m4f)|*.m4f" historyCategory:"Object Presets" f = fopen fname "rb" p = getFilenamePath fname fn PrintOffset Var = ( local Var = Var print ("This is the offset 0x" + (bit.intAsHex Var) as string) Var ) fn Readword fstream = ( return readshort fstream #unsigned ) fn ReadFixedString bstream fixedLen = ( local str = "" for i = 1 to fixedLen do ( str += bit.intAsChar (ReadByte bstream #unsigned) ) str ) struct weight_data ( boneids,weights ) Header = readlong f TexCount = readlong f TexOffset = readlong f Count2 = readlong f Offset2 = readlong f MeshCount = readlong f MeshOffset = readlong f BoneCount = readlong f BoneOffset = readlong f Count5 = readlong f Offset5 = readlong f fseek f TexOffset#seek_set TexName_array = #() for a = 1 to TexCount Do ( texname = ReadFixedString f 0x124 TexName_array[a] = getFilenameFile texname ) meditMaterials[1] = Multimaterial () meditMaterials[1].materialList.count = TexCount for a = 1 to TexCount Do ( meditMaterials[1].mapEnabled[a] = on meditMaterials[1].materialIDList[a] = a meditMaterials[1].names[a] = "" meditMaterials[1].materialList[a] = Standardmaterial () meditMaterials[1].materialList[a].diffuseMap = Bitmaptexture fileName:(p +TexName_array[a] + ".dds") meditMaterials[1].materialList[a].opacityMap = Bitmaptexture fileName:(p +TexName_array[a] + ".dds") meditMaterials[1].materialList[a].opacityMap.monoOutput = 1 ) for a = 1 to MeshCount Do ( Vert_array = #() Normal_array = #() UV_array = #() Face_array = #() Weight_array = #() texid_array = #() fseek f MeshOffset#seek_set MeshName = ReadFixedString f 0x50 unk01 = readlong f texid = readlong f + 1 unk02 = readlong f unk03 = readlong f unk04 = readlong f unk05 = readlong f VertCount = readlong f VertOffset = readlong f FaceCount = readlong f FaceOffset = readlong f VertCount1 = readlong f VertOffset1 = readlong f VertCount2 = readlong f VertOffset2 = readlong f UVCount = readlong f UVOffset = readlong f VertCount3 = readlong f VertOffset3 = readlong f fseek f 0x48#seek_cur MeshOffset = (ftell f) Print MeshName fseek f VertOffset#seek_set for b = 1 to VertCount Do ( vx = readfloat f vy = readfloat f vz = readfloat f append Vert_array [vx,vy,vz] ) fseek f FaceOffset#seek_set for b = 1 to FaceCount Do ( f1 = readshort f + 1 f2 = readshort f + 1 f3 = readshort f + 1 append Face_array [f1,f2,f3] ) for b = 1 to FaceCount Do ( append texid_array texid ) fseek f UVOffset#seek_set for b = 1 to UVCount Do ( tu = readfloat f tv = readfloat f * -1 append UV_array [tu,tv,0] ) --append Weight_array w --append Normal_array [nx,ny,nz] msh = mesh vertices:Vert_array faces:Face_array materialIDs:texid_array msh.numTVerts = UV_array.count buildTVFaces msh msh.name = MeshName msh.material = meditMaterials[1] for j = 1 to UV_array.count do setTVert msh j UV_array[j] for j = 1 to Face_array.count do setTVFace msh j Face_array[j] for j = 1 to Normal_array.count do setNormal msh j Normal_array[j] ) actionMan.executeAction 0 "63545" -- Views: Viewport Materials Display as Shaded with Maps actionMan.executeAction 0 "63547" -- Views: Viewport Materials Display as Realistic with Maps fclose f Lo siento no sé poner un spoiler ni nada de eso xDD Bueno veis lo último que pone "fclose f" Yo no quiero un fclose yo quiero que se vuelva atras y no cierre nunca la dichosa ventana xD Bueno muchas gracias adelantadas!!! Quote Link to comment Share on other sites More sharing options...
SeMa™ Posted March 26, 2014 Report Share Posted March 26, 2014 que yo sepa eso no es python Quote Link to comment Share on other sites More sharing options...
PromeTheuS Posted March 26, 2014 Author Report Share Posted March 26, 2014 y entonces que es? xDDD lo siento esque pensé que sería de python xD Es para abrir modelos en ".m4f" en 3ds max un importador de modelos pero pensé que era python. Quote Link to comment Share on other sites More sharing options...
Pantsu Posted March 26, 2014 Report Share Posted March 26, 2014 ¿Has probado a mirar un Max Script diferente y comparar lineas? Aunque normalmente los Max Script suelen quedar con la ventana minimizada, pero puede ser cosa de tu configuración del 3Ds Max. Yo cuando inicio un .ms normalmente me suele dejar la ventana abierta (Incluido el script que tu mencionas para las extensiones .m4f para el juego de Battle of the Immortals). Así que lo mas seguro es que sea o tu versión del 3Ds Max o la configuración del mismo. Quote Link to comment Share on other sites More sharing options...
PromeTheuS Posted March 27, 2014 Author Report Share Posted March 27, 2014 ¿Has probado a mirar un Max Script diferente y comparar lineas? Aunque normalmente los Max Script suelen quedar con la ventana minimizada, pero puede ser cosa de tu configuración del 3Ds Max. Yo cuando inicio un .ms normalmente me suele dejar la ventana abierta (Incluido el script que tu mencionas para las extensiones .m4f para el juego de Battle of the Immortals). Así que lo mas seguro es que sea o tu versión del 3Ds Max o la configuración del mismo. vale gracias, miraré lo que has dicho y otra cosa me encanta tu foto asi verde me encanta!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.