DarkRadiant - Copy Texture

From The DarkMod Wiki
Revision as of 23:19, 11 November 2007 by Tels (talk | contribs) (flag todo for me)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This command is available via the MMB (click into the cam view) or the Menu > Edit > Copy Shader. When using the MMB to select a texture, the shader of the clicked object is loaded into the ShaderClipboard. Once you picked your texture the name of the texture appears in the status bar and it's highlighted in the Media and the Texture Browser.

The shader is memorised until you pick a new one from any other object, so this can be used to texture multiple target objects with a few clicks.

Another possibility to memorise a Shader is to select one via the MediaBrowser. When subsequently pasting this shader, just the shader gets applied (no projection or anything).

Behind the Scenes

What actually happens in the code is the following: When you pick an object with the MMB, the object is memorised, not the shader itself. It's just a reference to the source patch or brush face that gets saved and is taken to retrieve the shader information when you click on a target

The ShaderClipboard gets cleared as soon as you load a map, start a new map or undo an operation.