[Bf-python] blender bundle files : uv_exporter

jean-michel soler jean-michel.soler at wanadoo.fr
Sun Jun 6 16:54:24 CEST 2004


> def Buffer(height=16, width=16, profondeur=3,rvb=255 ):  
>    """  
>    reserve l'espace memoire necessaire  
>    """  
>    p=[rvb]  
>    b=p*height*width*profondeur  
>    return b  
>
> def write_tgafile(loc2,bitmap,width,height,profondeur):  
>    f=open(loc2,'wb')  
>
>    Origine_en_haut_a_gauche=32  
>    Origine_en_bas_a_gauche=0  
>
>    Data_Type_2=2  
>    RVB=profondeur*8  
>    RVBA=32  
>    entete0=[]  
>    for t in range(18):  
>      entete0.append(chr(0))  
>
>    entete0[2]=chr(Data_Type_2)  
>    entete0[13]=chr(width/256)  
>    entete0[12]=chr(width % 256)  
>    entete0[15]=chr(height/256)  
>    entete0[14]=chr(height % 256)  
>    entete0[16]=chr(RVB)  
>    entete0[17]=chr(Origine_en_bas_a_gauche)  
>
>    #Origine_en_haut_a_gauche  
>
>    for t in entete0:  
>      f.write(t)  
>
>    for t in bitmap:  
>      f.write(chr(t))  
>    f.close()  



These two functions are borrowed from the script :
http://jmsoler.free.fr/didacticiel/blender/tutor/write_tga_pic.htm
which is released under gpl licence. But I think that the licence is
not really respected by a simple: " thanks to jms for the tga functions"
You can correct  by adding the few following lines

# ------------------------------------------
# Writetga and buffer  functions
# (c) 200 J-M Soler released under GPL licence
# Official Page :
# http://jmsoler.free.fr/didacticiel/blender/tutor/write_tga_pic.htm
# Communicate problems and errors on:
# 
http://www.zoo-logique.org/3D.Blender/newsportal/thread.php?group=3D.Blender 

# ------------------------------------------

 Thank you. With regards.







More information about the Bf-python mailing list