try(cui.UnRegisterDialogBar IdBirlestirici)catch() try(destroyDialog IdBirlestirici)catch() try(cui.UnRegisterDialogBar bilgi1)catch() try(destroyDialog bilgi1)catch() rollout IdBirlestirici "ID Birlestirici" width:200 height:815 ( subRollout ana "test1" pos:[0,100] width:200 height:800 global anaresim=(getdir #userScripts +"\\Sineay\\IdBirlestirici\\ui\\IdBirlestirici_k.jpg") global converter,hakkinda,IdBirlestirici,Unite, bilgi1,lbl2,mmat,lbl1 imgtag 'IdBirlestiriciimg' "Bitmap" pos:[0,0] width:200 height:100 align:#left bitmap:(openbitmap anaresim) --imgtag 'direksiyonimg' "Bitmap" pos:[70,188] width:61 height:60 align:#left bitmap:(openbitmap sbdireksiyon) global information=(getdir #userScripts +"\\Sineay\\AracRig\\info.txt") ) rollout converter "From Vray--->StandartMat." width:200 height:110 ( GroupBox 'grp1' "Select Object" pos:[0,0] width:187 height:56 align:#left pickbutton 'nesne' "Select " pos:[6,19] width:176 height:30 align:#left button 'convertt' "Converting" pos:[33,61] width:117 height:32 align:#left enabled:false ------------------------------------------------------------------------------------- on nesne picked obj do ( nesne.caption = nesne.object.name convertt.enabled=true ) on convertt pressed do ( -----tek material ise bu bölüm-------------------- if classof nesne.object.material == VRayMtl do ( stm = Standardmaterial () stm.diffusemap = nesne.object.material.texmap_diffuse stm.diffuse = nesne.object.material.diffuse stm.opacityMap = nesne.object.material.texmap_opacity if nesne.object.material.selfIllumination!= (color 0 0 0) do stm.useSelfIllumColor = on stm.selfillumMap = nesne.object.material.texmap_self_illumination if nesne.object.material.texmap_bump!=undefined do stm.bumpMapEnable=on stm.bumpMap=nesne.object.material.texmap_bump stm.bumpMapAmount=nesne.object.material.texmap_bump_multiplier if nesne.object.material.texmap_displacement!=undefined do stm.displacementMapEnable = on stm.displacementMap=nesne.object.material.texmap_displacement stm.displacementMapAmount=nesne.object.material.texmap_displacement_multiplier nesne.object.material = stm ) -------multimaterial ise bu bölüm------------------ if classof nesne.object.material == Multimaterial then for x = 1 to nesne.object.material.numsubs do ( if classof nesne.object.material [x] == VRayMtl do ( mmstm = Standardmaterial () mmstm.diffusemap = nesne.object.material[x].texmap_diffuse mmstm.diffuse = nesne.object.material[x].diffuse mmstm.opacityMap = nesne.object.material[x].texmap_opacity if nesne.object.material[x].selfIllumination!= (color 0 0 0) do mmstm.useSelfIllumColor = on mmstm.selfillumMap = nesne.object.material[x].texmap_self_illumination if nesne.object.material[x].texmap_bump!=undefined do mmstm.bumpMapEnable=on mmstm.bumpMap=nesne.object.material[x].texmap_bump mmstm.bumpMapAmount=nesne.object.material[x].texmap_bump_multiplier if nesne.object.material[x].texmap_displacement!=undefined do mmstm.displacementMapEnable = on mmstm.displacementMap=nesne.object.material[x].texmap_displacement mmstm.displacementMapAmount=nesne.object.material[x].texmap_displacement_multiplier nesne.object.material [x] = mmstm ) ) ) ) rollout Unite "Join" width:200 height:155 ( GroupBox 'grp3' "Id Mat Combine" pos:[0,0] width:187 height:82 align:#left pickbutton 'Sec' "Select Obj" pos:[9,18] width:121 height:25 align:#left button 'bilgi' "Info" pos:[135,18] width:39 height:24 align:#left enabled:false button 'birlestir' "Id Mat Combine" pos:[10,49] width:162 height:24 enabled:false align:#left GroupBox 'grp2' "Object Information" pos:[0,83] width:187 height:100 align:#left label 'lbl1' "Object : Not Selected" pos:[14,100] width:160 height:18 align:#center align:#center label 'lbl2' "Multimaterial : (-)" pos:[14,120] width:160 height:18 align:#center align:#center label 'lbl3' "Object Class : (-)" pos:[14,140] width:160 height:18 align:#center align:#center label 'lbl4' "ID Memory/Quantity :(-)" pos:[14,160] width:160 height:18 align:#center align:#center GroupBox 'grp5' "" pos:[0,185] width:187 height:45 align:#left HyperLink 'hblink' "Important Information" pos:[50,195] width:70 height:15 align:#left color:(color 255 0 0) across:2 address:information HyperLink 'hblink2' "video" pos:[125,195] width:25 height:15 url:"https://www.dailymotion.com/video/x2si9qu_kurbaan-classroom-debate-scene-vivek-oberoi-saif-ali-khan_fun"address:"https://www.dailymotion.com/video/x2si9qu_kurbaan-classroom-debate-scene-vivek-oberoi-saif-ali-khan_fun"align:#left color:(color 150 255 150) across:2 HyperLink aaatutorial "Tutorial " pos:[75,212] width:50 height:15 url:"https://youtu.be/DWwuSbDBM08" address:"https://youtu.be/DWwuSbDBM08" color:(color 0 150 255) across:1 on Sec picked obj do ( global matidtemizleme,sirala,idcound,bilgiyenile Sec.caption = Sec.object.name birlestir.enabled=true bilgi.enabled=true --global a=1 fn matidtemizleme = ( if classof Sec.object == Editable_Poly then ( for a=1 to 60 do ( for b=1 to 60 do ( if (Sec.object.material[a]!= undefined)and(Sec.object.material[a+b]!= undefined) do( if (Sec.object.material.materialList[a].name== Sec.object.material.materialList[a+b].name) do if Sec.object.material.materialList[a].diffusemap!= undefined and Sec.object.material.materialList[a+b].diffusemap!= undefined do if Sec.object.material.materialList[a].diffusemap.name== Sec.object.material.materialList[a+b].diffusemap.name do if Sec.object.material.materialList[a].diffusemap.filename== Sec.object.material.materialList[a+b].diffusemap.filename do ( select Sec.object setSelectionLevel Sec.object #face Sec.object.EditablePoly.selectByMaterial (a+b) Sec.object.EditablePoly.setMaterialIndex a 1 Sec.object.material[a+b]=undefined )) ) ) ) else ( messagebox"Object Class Editable_Poly Not." ) ) fn sirala= ( for a=1 to 60 do ( for b=1 to 60 do ( if (Sec.object.material[a]== undefined)and(Sec.object.material[a+b]!= undefined) do ( Sec.object.material[a] = copy Sec.object.material[a+b] Sec.object.material[a+b]= undefined select Sec.object setSelectionLevel Sec.object #face Sec.object.EditablePoly.selectByMaterial (a+b) Sec.object.EditablePoly.setMaterialIndex a 1 Sec.object.material[a+b]=undefined ) ) ) ) ------nesnenin id sayisini veren kod--------- fn idcound= ( local poGetFaceMatID = polyop.getFaceMatID if selection.count == 1 do-- tek secilen obje ( curO = Sec.object ----bir seçimin deisken ismi if classof curO == Editable_Poly do--- eger nesne editable poly ise ( facesCnt = polyop.getNumFaces curO ----nesnenin kaç facezi varsa onlarin sayisini aliyor global existingMatIds = #() for f = 1 to facesCnt do ( appendIfUnique existingMatIds (poGetFaceMatID curO f) ) ) ) ) idcound() -----bilgi alanina görüntü verir.-------------- fn bilgiyenile= ( if Sec.object!=undefined do Unite.lbl1.text ="Nesne : "+(Sec.object.name as string) if classof Sec.object.material == Multimaterial then topmaterial=for o in 1 to Sec.object.material.count where (Sec.object.material[o] != undefined) collect (Sec.object.material[0]) if classof Sec.object.material == Multimaterial then Unite.lbl2.text= "Multimaterial : "+(topmaterial.count as string) else Unite.lbl2.text=Unite.lbl2.name +(Sec.object.material as string) Unite.lbl3.text="Object Class : "+(ClassOf sec.object as string) Unite.lbl4.text="ID Memory/Quantity : "+(existingMatIds.count as string) ) bilgiyenile() ) on birlestir pressed do ( matidtemizleme() sirala() fn idcound= ( local poGetFaceMatID = polyop.getFaceMatID if selection.count == 1 do-- tek secilen obje ( curO = Sec.object ----bir seçimin deisken ismi if classof curO == Editable_Poly do--- eger nesne editable poly ise ( facesCnt = polyop.getNumFaces curO ----nesnenin kaç facezi varsa onlarin sayisini aliyor global existingMatIds = #() for f = 1 to facesCnt do ( appendIfUnique existingMatIds (poGetFaceMatID curO f) ) ) ) ) idcound() bilgiyenile() Sec.object.material.materialIDList.count = existingMatIds.count ) on bilgi pressed do ( createdialog bilgi1 bilgiyenile() if Sec.object!=undefined do bilgi1.lbl1.text ="Nesne : "+(Sec.object.name as string) if classof Sec.object.material == Multimaterial then topmaterial=for o in 1 to Sec.object.material.count where (Sec.object.material[o] != undefined) collect (Sec.object.material[0]) if classof Sec.object.material == Multimaterial then bilgi1.lbl2.text= "Multimaterial : "+(topmaterial.count as string) else bilgi1.lbl2.text= "Multimaterial : (-) /"+(Sec.object.material as string) bilgi1.lbl3.text="Object Class : "+(ClassOf sec.object as string) bilgi1.lbl4.text="ID Memory/Quantity : "+(existingMatIds.count as string) ) ) rollout bilgi1 "Obj Material id Bilgisi" width:220 height:120 ( label 'lbl1' "" pos:[14,13] width:200 height:24 align:#center align:#center label 'lbl2' "" pos:[14,38] width:200 height:24 align:#center align:#center label 'lbl3' "" pos:[14,62] width:200 height:24 align:#center align:#center label 'lbl4' "" pos:[14,87] width:200 height:24 align:#center align:#center on kapat pressed do ( try(cui.UnRegisterDialogBar bilgi1)catch() try(destroyDialog bilgi1)catch() ) ) rollout hakkinda "About" width:200 height:380 ( GroupBox 'grp3' "" pos:[0,0] width:187 height:212 align:#left label 'lbl3' " Id Birlestirici v1.0. " pos:[20,16] width:150 height:16 align:#left label 'lbl4' " 21-02-2017 ___yunusbbayram@gmail.com___ " pos:[12,30] width:164 height:32 align:#left HyperLink 'yunuslink1' "Turkey" pos:[50,63] width:50 height:15 url:"https://www.kultur.gov.tr/" address:"https://www.kultur.gov.tr/" color:(color 0 255 255) across:2 align:#left HyperLink 'yunuslink2' "Konya" pos:[90,63] width:50 height:15 url:"http://www.konya.bel.tr/sayfadetay.php?sayfaID=162" address:"http://www.konya.bel.tr/sayfadetay.php?sayfaID=162" color:(color 255 255 0) across:2 align:#left HyperLink 'cust9' "AracBoneRig" pos:[8,84] width:120 height:15 url:"http://www.sineay.com/wp/arac-bone-rig-1-0/" address:"http://www.sineay.com/wp/arac-bone-rig-1-0/" color:(color 0 255 0) across:2 align:#left HyperLink 'cust8' "ProjectShowcase" pos:[8,99] width:120 height:15 url:"http://www.sineay.com/wp/bipcatselector_2-0/" address:"http://www.sineay.com/wp/bipcatselector_2-0/" color:(color 0 255 0) across:2 align:#left HyperLink 'yunuslink6' "Biped Cat Selector" pos:[8,115] width:120 height:15 url:"http://www.sineay.com/wp/bipcatselector_2-0/" address:"http://www.sineay.com/wp/bipcatselector_2-0/" color:(color 0 255 0) across:2 align:#left HyperLink 'yunuslink4' "Sun System" pos:[8,131] width:120 height:15 enabled:true url:"http://www.sineay.com/wp/sunsyste/" address:"http://www.sineay.com/wp/sunsyste/" color:(color 0 255 0) across:2 align:#left HyperLink 'yunuslink5' "Yuzkontrol" pos:[8,147] width:120 height:15 url:"http://yuzkontrol.blogspot.com/" address:"http://yuzkontrol.blogspot.com" color:(color 0 255 0) across:2 align:#left HyperLink 'yunuslink7' "sineay.com" pos:[8,163] width:120 height:15 url:"http://sineay.com/" address:"http://sineay.com/" color:(color 0 255 0) across:2 align:#left HyperLink 'yunuslink3' "http://yunusbuyukbayram" pos:[8,181] width:154 height:15 url:"http://yunusbuyukbayram.blogspot.com" address:"http://yunusbuyukbayram.blogspot.com" color:(color 255 0 0) across:2 align:#left ) rollout mmat "Renk yada Dosya MultiMat" width:162 height:68 ( pickbutton 'btn1' "Select Object" pos:[4,8] width:180 height:25 align:#left button 'btn2' "Colour MMat" pos:[4,37] width:70 height:25 align:#left button 'btn7' "File MMat" pos:[78,37] width:106 height:25 align:#left on btn1 picked obj do ( btn1.caption = btn1.object.name convertTo btn1.object PolyMeshObject ) on btn2 pressed do ( cajpg=#( (getdir #maxRoot +"\\map\\tiger.bmp"),(getdir #maxRoot +"\\map\\EUPHBARK.TGA"),(getdir #maxRoot +"\\map\\Masonry.Unit Masonry.Brick.Modular.Running.Grey.jpg"),(getdir #maxRoot +"map\\JAGLEAF.TGA")) renk=#((color 255 0 0),(color 253 255 0),(color 253 0 255),(color 253 255 255),(color 0 255 0),(color 0 253 255),(color 0 0 255),(color 253 0 150),(color 253 100 0),(color 100 0 100)) mmstnd= Multimaterial() stm = Standardmaterial () mmstnd.materialList.count = 10 for i in 1 to mmstnd.materialList.count do ( mmstnd[i]=Standardmaterial () mmstnd[i].name= ( "Standard"+(i as string)) mmstnd[i].Diffuse=renk[random 1 10] )--(color 255 255 255)) btn1.object.material = mmstnd ) on btn7 pressed do ( try( cajpg=#( (getdir #maxRoot +"map\\tiger.bmp"),(getdir #maxRoot +"map\\EUPHBARK.TGA"),(getdir #maxRoot +"map\\Masonry.Unit Masonry.Brick.Modular.Running.Grey.jpg"),(getdir #maxRoot +"map\\JAGLEAF.TGA")) renk=#((color 255 0 0),(color 253 255 0),(color 253 0 255),(color 253 255 255),(color 0 255 0),(color 0 253 255),(color 0 0 255),(color 253 0 150),(color 253 100 0),(color 100 0 100)) mmstnd= Multimaterial() stm = Standardmaterial () mmstnd.materialList.count = 10 for i in 1 to mmstnd.materialList.count do ( mmstnd[i]=Standardmaterial () mmstnd[i].name= "Standart"--( "Standard"+(i as string)) mmstnd[i].Diffusemap=Bitmaptexture fileName:cajpg[random 1 4] mmstnd[i].showInViewport =true )--(color 255 255 255)) btn1.object.material = mmstnd ) catch(messagebox "lütfen bir nesne seçin") ) ) createdialog IdBirlestirici addSubRollout IdBirlestirici.ana Converter rolledUp:false addSubRollout IdBirlestirici.ana Unite rolledUp:false addSubRollout IdBirlestirici.ana mmat rolledUp:false addSubRollout IdBirlestirici.ana hakkinda rolledUp:false cui.RegisterDialogBar IdBirlestirici minSize:[200,540] maxSize:[200,940] style:#(#cui_dock_right, #cui_dock_left, #cui_floatable) cui.DockDialogBar IdBirlestirici #cui_dock_left