View Full Version : Surface manipulation weirdness. A bug?

07-22-2004, 01:34 AM
I made this script to help to set transparency channels according to color channel's image texture's alpha. It seems to work fine with some models, but acts strangely with some. Object with lots of surfaces seems to cause the problem.
The problem seems to have something to do with lines:
CommandInput("Surf_SetSurf " + surfObj.name + " " + meshObj.name);
CommandInput("Surf_SetInt Transparency 2");

With some models (lots of surfaces), these two CommandInputs just manipulate the surface currenty selected by user, or the first one in the surface list. So the first CommandInput doesn't seem to work, for some strange reason. With other models (less surfaces) it works fine, and user selected surface doesn't interfere.
At least I think the problem has something to do with surface count, but I haven't tested this matter throughoutly.

One other thing:
Is there a way to manipulate loaded images via lscript as in image editor? Make instances, set parameters etc?