Hi.
I am getting "--Type error: Call needs function or class, got: 100.0", when I am trying to use my sript which should write opacity parameters of selected texture in file. I don't know what I should write to make it work correctly.
local found = 0
local objMat = selection[1].mat
for i = 1 to meditMaterials.count where found == 0 do
if meditMaterials[i] == objmat then found = i
found -- contains the index of the material slot, or 0 if it was not found
--local Mnames = GetMeditMaterial found as string
for Mname=1 to found do
(
Mnames = GetMeditMaterial Mname as string
Opty = meditMaterials[1].opacity Mname as integer
format "%" Opty to:file01
format "\n" to:file01
format Mnames to:file01
format "\n" to:file01
)<span class="post-color-blue"></span><span class=""><span class="post-color-blue"></span></span>
Replies
You could just do :
No need to deal with the material editor.
If so, you need to parse it, like an array.
This covers the case, and works with multiple objects selection. I've added some security checks.