On Fri, 3 Nov 2006 17:11:20 +0100
fabius <[EMAIL PROTECTED]> wrote:
> hi soya people
> I'm a new soya3d user and I'm facing an issue that I would know if it is a
> real one or something wrong I'm doing.
> I'm actually studying how to use sprites and I've found in balazar brothers
> game code how to do this, using the following line:
> star=soya.Sprite(self.parent, soya.Material.get("star"))
> then I set color, size etc and it works...as long I use the material
> file .data provided by the game data folder. If I delete the .data (star.data
> in the specific) letting soya to rebuild the .data from the source image
> (star.png) soya won't show the sprite. The question is: am I missing some or
> are there actually any known issues open about sprites?
The material .data file contains a reference to the image file, but also
additional attributes. These attributes are seldom used, but one of them is
used for stars: additive_blending (which makes the stars transparent).
When you delete the .data file, this property is lost. Then the material file
is re-created from the image file, but it doesn't have the additive_blending
property.
You can add it again with:
material = soya.Material.get("star")
material.additive_blending = 1
material.save()
Jiba
_______________________________________________
Soya-user mailing list
[email protected]
https://mail.gna.org/listinfo/soya-user