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

Function GetTextureMapping2D

src/luxcore/luxparser/luxparse.cpp:196–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196static Properties GetTextureMapping2D(const string &prefix, const Properties &props) {
197 const string type = props.Get(Property("mapping")("uv")).Get<string>();
198
199 if (type == "uv") {
200 return Property(prefix + ".mapping.type")("uvmapping2d") <<
201 Property(prefix + ".mapping.uvscale")(props.Get(Property("uscale")(1.f)).Get<float>(),
202 props.Get(Property("vscale")(1.f)).Get<float>()) <<
203 Property(prefix + ".mapping.uvdelta")(props.Get(Property("udelta")(0.f)).Get<float>(),
204 props.Get(Property("udelta")(0.f)).Get<float>());
205 } else {
206 LC_LOG("LuxCore supports only texture coordinate mapping 2D with 'uv' (i.e. not " << type << "). Ignoring the mapping.");
207 return Properties();
208 }
209}
210
211static Properties GetTextureMapping3D(const string &prefix, const Transform &tex2World, const Properties &props) {
212 const string type = props.Get(Property("coordinates")("uv")).Get<string>();

Callers 1

yyparseFunction · 0.85

Calls 3

Get<string>Method · 0.80
GetMethod · 0.80
Get<float>Method · 0.80

Tested by

no test coverage detected