mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-13 15:16:28 +00:00
Property cleanup
This commit is contained in:
@@ -130,7 +130,7 @@ CStructRef CLightNode::GetProperties() const
|
||||
return CStructRef(mpLight, mpLight->GetProperties());
|
||||
}
|
||||
|
||||
void CLightNode::PropertyModified(IPropertyNew* pProperty)
|
||||
void CLightNode::PropertyModified(IProperty* pProperty)
|
||||
{
|
||||
CSceneNode::PropertyModified(pProperty);
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
void RayAABoxIntersectTest(CRayCollisionTester& Tester, const SViewInfo& ViewInfo);
|
||||
SRayIntersection RayNodeIntersectTest(const CRay &Ray, u32 AssetID, const SViewInfo& ViewInfo);
|
||||
CStructRef GetProperties() const;
|
||||
void PropertyModified(IPropertyNew* pProperty);
|
||||
void PropertyModified(IProperty* pProperty);
|
||||
bool AllowsRotate() const { return false; }
|
||||
CLight* Light();
|
||||
CVector2f BillboardScale();
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
virtual CColor TintColor(const SViewInfo& rkViewInfo) const;
|
||||
virtual CColor WireframeColor() const;
|
||||
virtual CStructRef GetProperties() const { return CStructRef(); }
|
||||
virtual void PropertyModified(IPropertyNew* pProperty) {}
|
||||
virtual void PropertyModified(IProperty* pProperty) {}
|
||||
|
||||
void OnLoadFinished();
|
||||
void Unparent();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "CScriptAttachNode.h"
|
||||
#include "CScriptNode.h"
|
||||
#include "Core/Render/CRenderer.h"
|
||||
#include "Core/Resource/Script/IProperty.h"
|
||||
#include "Core/Resource/Script/Property/IProperty.h"
|
||||
#include <Common/AssertMacro.h>
|
||||
|
||||
CScriptAttachNode::CScriptAttachNode(CScene *pScene, const SAttachment& rkAttachment, CScriptNode *pParent)
|
||||
|
||||
@@ -12,7 +12,7 @@ class CScriptAttachNode : public CSceneNode
|
||||
CScriptNode* mpScriptNode;
|
||||
TResPtr<CResource> mpAttachAsset;
|
||||
|
||||
IPropertyNew* mpAttachAssetProp;
|
||||
IProperty* mpAttachAssetProp;
|
||||
CAssetRef mAttachAssetRef;
|
||||
CAnimationSetRef mAttachAnimSetRef;
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
void RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& rkViewInfo);
|
||||
SRayIntersection RayNodeIntersectTest(const CRay& rkRay, u32 AssetID, const SViewInfo& rkViewInfo);
|
||||
|
||||
inline IPropertyNew* AttachProperty() const { return mpAttachAssetProp; }
|
||||
inline IProperty* AttachProperty() const { return mpAttachAssetProp; }
|
||||
inline TString LocatorName() const { return mLocatorName; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -459,26 +459,26 @@ CStructRef CScriptNode::GetProperties() const
|
||||
return CStructRef(mpInstance->PropertyData(), mpInstance->Template()->Properties());
|
||||
}
|
||||
|
||||
void CScriptNode::PropertyModified(IPropertyNew* pProp)
|
||||
void CScriptNode::PropertyModified(IProperty* pProp)
|
||||
{
|
||||
// Update volume
|
||||
EPropertyTypeNew Type = pProp->Type();
|
||||
EPropertyType Type = pProp->Type();
|
||||
|
||||
if ( Type == EPropertyTypeNew::Bool || Type == EPropertyTypeNew::Byte || Type == EPropertyTypeNew::Short ||
|
||||
Type == EPropertyTypeNew::Int || Type == EPropertyTypeNew::Choice || Type == EPropertyTypeNew::Enum )
|
||||
if ( Type == EPropertyType::Bool || Type == EPropertyType::Byte || Type == EPropertyType::Short ||
|
||||
Type == EPropertyType::Int || Type == EPropertyType::Choice || Type == EPropertyType::Enum )
|
||||
{
|
||||
mpInstance->EvaluateVolume();
|
||||
UpdatePreviewVolume();
|
||||
}
|
||||
|
||||
// Update resources
|
||||
else if (Type == EPropertyTypeNew::AnimationSet)
|
||||
else if (Type == EPropertyType::AnimationSet)
|
||||
{
|
||||
mpInstance->EvaluateDisplayAsset();
|
||||
SetDisplayAsset(mpInstance->DisplayAsset());
|
||||
}
|
||||
|
||||
else if (Type == EPropertyTypeNew::Asset)
|
||||
else if (Type == EPropertyType::Asset)
|
||||
{
|
||||
CAssetProperty* pAssetProperty = TPropCast<CAssetProperty>(pProp);
|
||||
const CResTypeFilter& rkFilter = pAssetProperty->GetTypeFilter();
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
CColor TintColor(const SViewInfo& rkViewInfo) const;
|
||||
CColor WireframeColor() const;
|
||||
CStructRef GetProperties() const;
|
||||
void PropertyModified(IPropertyNew* pProp);
|
||||
void PropertyModified(IProperty* pProp);
|
||||
|
||||
void LinksModified();
|
||||
void UpdatePreviewVolume();
|
||||
|
||||
Reference in New Issue
Block a user