MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / getSelectedShader

Function getSelectedShader

radiantcore/patch/algorithm/Prefab.cpp:30–40  ·  view source on GitHub ↗

Gets the active/selected shader or the default fallback value

Source from the content-addressed store, hash-verified

28{
29 // Gets the active/selected shader or the default fallback value
30 inline std::string getSelectedShader()
31 {
32 auto selectedShader = GlobalShaderClipboard().getShaderName();
33
34 if (selectedShader.empty())
35 {
36 selectedShader = texdef_name_default();
37 }
38
39 return selectedShader;
40 }
41}
42
43void constructPrefab(const AABB& aabb, const std::string& shader, EPatchPrefab eType,

Callers 2

createPrefabInternalFunction · 0.85
createSimplePatchFunction · 0.85

Calls 2

getShaderNameMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected