Jump to content
  • 0

Delete alignements of non-existing textures


Meerschweinmann

Question

Hello.

 

I am using Ultimate DOOM Builder.

Sometimes when copying areas to cut them horizontally for portal use, there are alignements left of textures that do not exist anymore.

 

The attached screenshot shows what i mean.

 

Is there a tool that can automatically delete those unused alignements?

 

 

The screenshot is from an Eternity Engine UDMF format map. I get this effect with GZDoom UDMF format too.

 

 

UDB.png

Edited by Meerschweinmann

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

UDBScript to the resque.

/// <reference path="../../udbscript.d.ts" />

`#version 4`;

`#name Empty tex offset reset (UDMF)`;

`#description Reset offsets to 0/0 on any empty textures of selected linedefs`;


// Get the selected lines
let linedefs = UDB.Map.getSelectedLinedefs()
if(linedefs.length == 0){
	UDB.showMessage('Please select at least 1 linedef')
	UDB.die()
}

linedefs.forEach(linedef => {
	if(linedef.front != null){
		if(linedef.front.upperTexture == '-'){
			linedef.front.fields.offsetx_top = 0.0
			linedef.front.fields.offsety_top = 0.0
		}
		if(linedef.front.middleTexture == '-'){
			linedef.front.fields.offsetx_mid = 0.0
			linedef.front.fields.offsety_mid = 0.0
		}
		if(linedef.front.lowerTexture == '-'){
			linedef.front.fields.offsetx_bottom = 0.0
			linedef.front.fields.offsety_bottom = 0.0
		}
	}
	if(linedef.back != null){
		if(linedef.back.upperTexture == '-'){
			linedef.back.fields.offsetx_top = 0.0
			linedef.back.fields.offsety_top = 0.0
		}
		if(linedef.back.middleTexture == '-'){
			linedef.back.fields.offsetx_mid = 0.0
			linedef.back.fields.offsety_mid = 0.0
		}
		if(linedef.back.lowerTexture == '-'){
			linedef.back.fields.offsetx_bottom = 0.0
			linedef.back.fields.offsety_bottom = 0.0
		}
	}
})

Share this post


Link to post
  • 0

You mean the X,Y texture offsets? Can't you just set those to 0,0? If you need a texture for that, give them a temporary texture, set the offsets to 0,0 then rename the texture to "-" to remove the texture.

Share this post


Link to post
  • 0

Yes, i mean the X/Y offsets of those non-existent textures.

Deleting them by hand is possible, but when there is a tool that can do it automatically it would be much easier.

The problem is that there are hundreds, if not thousand of linedefs with those non-existent textures and it is too much work doing this by hand.

 

UDB's Map analysis tool can find many errors and remove them, but not this unused alignements.

Share this post


Link to post
  • 0
2 hours ago, Doomy__Doom said:

UDBScript to the resque.

 

That looks very promising. Thank you :)

 

Edit: I have tested it and it does exactly what i want. Thanks again.  

 

Edit2: Wow, that script made the WAD nearly 250kb smaller, thanks to removing of useless data.

Edited by Meerschweinmann

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...