sledge
sledge copied to clipboard
Fix texture lock when doing Shift+Drag to clone brushes
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.
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.
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.
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.
That sounds awesome, looking forward to seeing them!