MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / setLook

Method setLook

Source/Node/Model.cpp:91–108  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89}
90
91void Model::setLook(int index) {
92 if (_looks.empty()) return;
93 if (index < Look::None || index >= s_cast<int>(_looks.size())) {
94 if (_looks.empty() && Look::None < index && _currentLook == Look::None) {
95 _currentLook = index;
96 }
97 return;
98 }
99 if (_currentLook != index) {
100 if (_currentLook != Look::None) {
101 _looks[_currentLook]->unApply();
102 }
103 _currentLook = index;
104 if (_currentLook != Look::None) {
105 _looks[_currentLook]->apply();
106 }
107 }
108}
109
110void Model::setLook(String name) {
111 int index = _modelDef->getLookIndexByName(name);

Callers 2

runMethod · 0.45
playable_set_lookFunction · 0.45

Calls 5

unApplyMethod · 0.80
getLookIndexByNameMethod · 0.80
applyMethod · 0.65
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected