mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-13 23:26:19 +00:00
Various property cleanup, fixing more broken stuff, trialing new features
This commit is contained in:
@@ -125,6 +125,19 @@ SRayIntersection CLightNode::RayNodeIntersectTest(const CRay& rkRay, u32 AssetID
|
||||
return Out;
|
||||
}
|
||||
|
||||
CStructRef CLightNode::GetProperties() const
|
||||
{
|
||||
return CStructRef(mpLight, mpLight->GetProperties());
|
||||
}
|
||||
|
||||
void CLightNode::PropertyModified(IPropertyNew* pProperty)
|
||||
{
|
||||
CSceneNode::PropertyModified(pProperty);
|
||||
|
||||
if (pProperty->Name() == "Position")
|
||||
SetPosition( mpLight->Position() );
|
||||
}
|
||||
|
||||
CLight* CLightNode::Light()
|
||||
{
|
||||
return mpLight;
|
||||
|
||||
@@ -15,6 +15,8 @@ public:
|
||||
void DrawSelection();
|
||||
void RayAABoxIntersectTest(CRayCollisionTester& Tester, const SViewInfo& ViewInfo);
|
||||
SRayIntersection RayNodeIntersectTest(const CRay &Ray, u32 AssetID, const SViewInfo& ViewInfo);
|
||||
CStructRef GetProperties() const;
|
||||
void PropertyModified(IPropertyNew* pProperty);
|
||||
bool AllowsRotate() const { return false; }
|
||||
CLight* Light();
|
||||
CVector2f BillboardScale();
|
||||
|
||||
@@ -69,6 +69,8 @@ public:
|
||||
virtual bool IsVisible() const;
|
||||
virtual CColor TintColor(const SViewInfo& rkViewInfo) const;
|
||||
virtual CColor WireframeColor() const;
|
||||
virtual CStructRef GetProperties() const { return CStructRef(); }
|
||||
virtual void PropertyModified(IPropertyNew* pProperty) {}
|
||||
|
||||
void OnLoadFinished();
|
||||
void Unparent();
|
||||
|
||||
@@ -13,8 +13,8 @@ CScriptAttachNode::CScriptAttachNode(CScene *pScene, const SAttachment& rkAttach
|
||||
CStructPropertyNew* pBaseStruct = pParent->Template()->Properties();
|
||||
|
||||
mpAttachAssetProp = pBaseStruct->ChildByIDString(rkAttachment.AttachProperty);
|
||||
mAttachAssetRef = CAssetRef(pParent->Instance(), mpAttachAssetProp);
|
||||
mAttachAnimSetRef = CAnimationSetRef(pParent->Instance(), mpAttachAssetProp);
|
||||
mAttachAssetRef = CAssetRef(pParent->Instance()->PropertyData(), mpAttachAssetProp);
|
||||
mAttachAnimSetRef = CAnimationSetRef(pParent->Instance()->PropertyData(), mpAttachAssetProp);
|
||||
if (mpAttachAssetProp) AttachPropertyModified();
|
||||
|
||||
ParentDisplayAssetChanged(mpScriptNode->DisplayAsset());
|
||||
|
||||
@@ -454,6 +454,11 @@ void CScriptNode::LinksModified()
|
||||
if (mpExtra) mpExtra->LinksModified();
|
||||
}
|
||||
|
||||
CStructRef CScriptNode::GetProperties() const
|
||||
{
|
||||
return CStructRef(mpInstance->PropertyData(), mpInstance->Template()->Properties());
|
||||
}
|
||||
|
||||
void CScriptNode::PropertyModified(IPropertyNew* pProp)
|
||||
{
|
||||
// Update volume
|
||||
|
||||
@@ -47,9 +47,10 @@ public:
|
||||
bool IsVisible() const;
|
||||
CColor TintColor(const SViewInfo& rkViewInfo) const;
|
||||
CColor WireframeColor() const;
|
||||
CStructRef GetProperties() const;
|
||||
void PropertyModified(IPropertyNew* pProp);
|
||||
|
||||
void LinksModified();
|
||||
void PropertyModified(IPropertyNew* pProp);
|
||||
void UpdatePreviewVolume();
|
||||
void GeneratePosition();
|
||||
void TestGameModeVisibility();
|
||||
|
||||
Reference in New Issue
Block a user