Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0

Defining properties for multiple Textures


I have about 2 hundred over sized textures and all I need to do is rescale to all to 0.5, I can't find a way to do it quickly enough so far when I look into the wiki, I'm supposed to define all of these 200 textures individually.

There must be a way to do apply the 2 scale to all of them...

Edited by ([zen3001])

Share this post

Link to post

3 answers to this question

Recommended Posts

  • 0

it lowers the quallity of the textures, I've been trying to write a python script to create a textures file for me if I get bored with it I'll go for this I guess

Share this post

Link to post
  • 0

that went faster than i expected. had to install the pillow module but I have a clean looking texture file now.

if anyone's interested, here's the code I wrote

from os import listdir, chdir
from PIL import Image


cats = listdir()

Textures = str()

done = 0


for cat in cats:
	for texture in listdir():
		width, height = Image.open(texture).size
		Textures += "texture "+cat+"\\"+texture+", "+str(width)+", "+str(height)+" {\nXScale 2\nYScale 2\nPatch "+texture+", 0, 0\n}\n\n"
		done +=1
		print(done, end="\r")

file = open("TEXTURES.txt", "w")

when I'm allready at it, as you can see I put textures in subfolder, to make it easier to navigate in gzdoombuilder, am I supposed to name the whole of the path to it? I'm worried the whole thing won't work at all with subdirectories

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now