开发者

Blender: Changing the alpha transparency of an object through Python?

开发者 https://www.devze.com 2023-02-19 21:19 出处:网络
I\'m looking to change the transparency of a plane in real time using the games engine. I found this script:

I'm looking to change the transparency of a plane in real time using the games engine. I found this script:

for x in [0,1,2,3]:
开发者_运维技巧    own.meshes[0].getVertex(0,x).setRGBA([1,1,1,alpha_rate])

This works on materials with no image attached. However I have now added a UV texture to it and attached an image. The code above doesn't work now. Is there any way to change the alpha of the object?

I'm using Blender 2.49b with Python 2.5.1

Any ideas would be greatly appreciated

Cheers,

Will

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号