diff --git a/Code/Sandbox/Editor/Objects/EntityObject.cpp b/Code/Sandbox/Editor/Objects/EntityObject.cpp index 9e91fee940..82d45f8ae5 100644 --- a/Code/Sandbox/Editor/Objects/EntityObject.cpp +++ b/Code/Sandbox/Editor/Objects/EntityObject.cpp @@ -1969,50 +1969,6 @@ IOpticsElementBasePtr CEntityObject::GetOpticsElement() return pLight->GetLensOpticsElement(); } -////////////////////////////////////////////////////////////////////////// -void CEntityObject::SetOpticsElement(IOpticsElementBase* pOptics) -{ - CDLight* pLight = GetLightProperty(); - if (pLight == NULL) - { - return; - } - pLight->SetLensOpticsElement(pOptics); - SetMaterial(NULL); -} - -////////////////////////////////////////////////////////////////////////// -void CEntityObject::ApplyOptics(const QString& opticsFullName, IOpticsElementBasePtr pOptics) -{ - if (pOptics == NULL) - { - CDLight* pLight = GetLightProperty(); - if (pLight) - { - pLight->SetLensOpticsElement(NULL); - } - SetMaterial(NULL); - } - else - { - int nOpticsIndex(0); - if (!gEnv->pOpticsManager->Load(opticsFullName.toUtf8().data(), nOpticsIndex)) - { - IOpticsElementBasePtr pNewOptics = gEnv->pOpticsManager->Create(eFT_Root); - if (!gEnv->pOpticsManager->AddOptics(pNewOptics, opticsFullName.toUtf8().data(), nOpticsIndex)) - { - CDLight* pLight = GetLightProperty(); - if (pLight) - { - pLight->SetLensOpticsElement(NULL); - SetMaterial(NULL); - } - return; - } - } - } -} - ////////////////////////////////////////////////////////////////////////// void CEntityObject::SetOpticsName(const QString& opticsFullName) { diff --git a/Code/Sandbox/Editor/Objects/EntityObject.h b/Code/Sandbox/Editor/Objects/EntityObject.h index 923e83b4e6..941094c755 100644 --- a/Code/Sandbox/Editor/Objects/EntityObject.h +++ b/Code/Sandbox/Editor/Objects/EntityObject.h @@ -221,8 +221,6 @@ public: IVariable* GetLightVariable(const char* name) const; IOpticsElementBasePtr GetOpticsElement(); - void SetOpticsElement(IOpticsElementBase* pOptics); - void ApplyOptics(const QString& opticsFullName, IOpticsElementBasePtr pOptics); void SetOpticsName(const QString& opticsFullName); void PreInitLightProperty();