/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
materialDef.mFlags |= semantic;
}
+ if(ReadString(node.GetChild("occlusionMap"), texturePath))
+ {
+ ToUnixFileSeparators(texturePath);
+ const auto semantic = MaterialDefinition::OCCLUSION;
+ materialDef.mTextureStages.push_back({semantic, TextureDefinition{std::move(texturePath)}});
+ materialDef.mFlags |= semantic;
+ }
+
if(ReadColorCodeOrColor(&node, materialDef.mColor, convertColorCode) &&
materialDef.mColor.a < 1.0f)
{
auto& extras = nodeDef.mExtras;
extras.reserve(eExtras->Size());
- NodeDefinition::Extra e;
for(auto i0 = eExtras->CBegin(), i1 = eExtras->CEnd(); i0 != i1; ++i0)
{
+ NodeDefinition::Extra e;
+
auto eExtra = *i0;
e.mKey = eExtra.first;
if(e.mKey.empty())
if(tnValue)
{
animProp.mValue.reset(new AnimatedProperty::Value{ReadPropertyValue(*tnValue)});
+ ReadBool(tnProperty.GetChild("relative"), animProp.mValue->mIsRelative);
}
else
{
mOnError(FormatString("Property '%s' fails to define target value.",
animProp.mPropertyName.c_str()));
}
-
- ReadBool(tnProperty.GetChild("relative"), animProp.mValue->mIsRelative);
}
animDef.mProperties.push_back(std::move(animProp));