void LandscapePropertyControl::AddFilepathProperty(const String &key, const String &filter, LandscapeNode::eTextureLevel level) { LandscapeNode *landscape = dynamic_cast<LandscapeNode*> (currentSceneNode); Texture * t = landscape->GetTexture(level); propertyList->AddFilepathProperty(key, filter, true, PropertyList::PROPERTY_IS_EDITABLE); if(t && !t->isRenderTarget) { propertyList->SetFilepathPropertyValue(key, landscape->GetTextureName(level)); } else { propertyList->SetFilepathPropertyValue(key, String("")); } }
void LandscapePropertyControl::SetLandscapeTexture(LandscapeNode::eTextureLevel level, const String &texturePathname) { LandscapeNode *landscape = GetLandscape(); if (!landscape) return; landscape->SetTexture(level, texturePathname); SceneValidator::Instance()->ValidateTextureAndShowErrors(landscape->GetTexture(level), landscape->GetTextureName(level), Format("Landscape. TextureLevel %d", level)); if(LandscapeNode::TEXTURE_TILE_FULL != level) { landscape->UpdateFullTiledTexture(); } }