MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / DrawObjectGUI

Method DrawObjectGUI

samples/luxcoreui/lightstrategywindow.cpp:56–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56bool LightStrategyWindow::DrawObjectGUI(Properties &props, bool &modifiedProps) {
57 //--------------------------------------------------------------------------
58 // lightstrategy.type
59 //--------------------------------------------------------------------------
60
61 const string currentSamplerType = props.Get(Property("lightstrategy.type")(typeTable.GetDefaultTag())).Get<string>();
62 int typeIndex = typeTable.GetVal(currentSamplerType);
63
64 if (ImGui::Combo("Light Strategy type", &typeIndex, typeTable.GetTagList())) {
65 props.Clear();
66
67 props << Property("lightstrategy.type")(typeTable.GetTag(typeIndex));
68
69 return true;
70 }
71 ImGui::SameLine();
72 ImGui::TextDisabled("(?)");
73 if (ImGui::IsItemHovered())
74 ImGui::SetTooltip("lightstrategy.type");
75
76 return false;
77}

Callers

nothing calls this directly

Calls 7

Get<string>Method · 0.80
GetMethod · 0.80
GetDefaultTagMethod · 0.80
GetValMethod · 0.80
GetTagListMethod · 0.80
ClearMethod · 0.45
GetTagMethod · 0.45

Tested by

no test coverage detected