sledge icon indicating copy to clipboard operation
sledge copied to clipboard

Fix texture lock when doing Shift+Drag to clone brushes

Open ericwa opened this issue 9 years ago • 4 comments

I noticed that doing Shift+Drag to clone brushes with the Select Tool wasn't using texture lock, even if texture lock was enabled.

The cause was, face.Texture.Texture was null when the transformation was applied to the cloned brushes. I copied this from OperationsPasteSpecial()... doesn't feel like a great fix, but at least it's something.

ericwa avatar Dec 01 '15 08:12 ericwa

Hm.. that wasn't quite enough, for a more complex case where faces have texture shifts and scales set, I also need to add a call to face.CalculateTextureCoordinates(true); there, like the PartialPostLoadProcess method does.

ericwa avatar Dec 01 '15 08:12 ericwa

Thanks for this, I've been busy on another project so I'll leave this open until I can get back into Sledge early next year. I'm not too happy with how textures are working right now, so hopefully I can avoid this problem by changing some of the messy code in other areas. This fix looks like it'll work until then, though.

LogicAndTrick avatar Dec 01 '15 09:12 LogicAndTrick

Cool, totally understand. :-)

I do also have an improved version of my quake texture patch, that loads the palette from the game data (even supports hexen 2 for free), and I got a simple quake .mdl loader working too. I'll probably make PR's for them soon but no worries if you can't look at them until next year.

ericwa avatar Dec 01 '15 19:12 ericwa

That sounds awesome, looking forward to seeing them!

LogicAndTrick avatar Dec 02 '15 00:12 LogicAndTrick