So you want to remove unused sub-materials. I wouldn’t trust attaching to an empty mesh would do a good job. If two or more objects uses the same Mult…
gtafan: …Other reason is to remoove unused materials from mesh… …Is there posibly a beter solution for remooving unused materials, then my one?.. …
gtafan: Have a question about the code for node transform, what it´s doing? In my example I am fixing rotation, but this one seems to be related to …
Does this work? newmsh = mesh numverts:3 numfaces:1 meshop.attach newmsh msh attachMat:#IDToMat condenseMat:true deleteSourceNode:true meshop.delete…
Why do you want to attach n empty mesh to another mesh, what are you trying to achieve?
You have: polyop.getNumMaps <node> meshop.getNumMaps <node> They won’t return the used channels though. Or some generic functions to …
Try this and let us know if it worked. ( fn GetTextureAverageColor texture = ( tx = copy texture tx.filtering = 1 im…
I can’t warrantee that I will be able to fix the code (if it needs to be fixed). But if you feel posting the code here just do it. I will take a look …
It shouldn’t be a problem. ( gc() delete objects obj = converttomesh (plane length:100 width:100 lengthsegs:20 widthsegs:20) mat =…
Yes. ( mat = multimaterial numsubs:2000 format “numsubs:% ” mat.numsubs mat[1000] = standardmaterial diffuse:red mat[1001]…
( gc() delete objects obj = converttopoly (plane length:100 width:100 lengthsegs:20 widthsegs:20) mat = multimaterial numsub…
That clearly means that a mesh can have more than 256 materials. gtafan: but after importing I can see only 256 materials inside material edit…
If you know the iteration start, end and step values you could calculate the reminder: fn GetIterationReminder start end step = ( r = floor ((en…
Try this. (getMTLMEditFlags $.mat.diffusemap)[6] Change “diffusemap” for the texture mapyou need. Not fully tested.
Weird! Try passing the values as doubles.