| 194 | } |
| 195 | |
| 196 | static 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 | |
| 211 | static Properties GetTextureMapping3D(const string &prefix, const Transform &tex2World, const Properties &props) { |
| 212 | const string type = props.Get(Property("coordinates")("uv")).Get<string>(); |
no test coverage detected