Skip to content

Commit

Permalink
only expose transform and visibility to the observer
Browse files Browse the repository at this point in the history
  • Loading branch information
Roberto De Ioris committed Jan 4, 2018
1 parent 38d4814 commit 8e23e76
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions Plugins/MaRLEnE/Source/MaRLEnE/Private/MLObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,60 @@ ECheckBoxState FMLObservedPropertyDetails::GetSelectedPropEnabled() const

bool FMLObservedPropertyDetails::ObservableProp(UProperty *Prop)
{

if (Prop->GetName() == "RelativeLocation")
{

if (UStructProperty *SProp = Cast<UStructProperty>(Prop))
{
if (UScriptStruct *SSProp = Cast<UScriptStruct>(SProp->Struct))
{
if (SSProp == TBaseStructure<FVector>::Get())
return true;
}

}
}

if (Prop->GetName() == "RelativeRotation")
{

if (UStructProperty *SProp = Cast<UStructProperty>(Prop))
{
if (UScriptStruct *SSProp = Cast<UScriptStruct>(SProp->Struct))
{
if (SSProp == TBaseStructure<FRotator>::Get())
return true;
}

}
}

if (Prop->GetName() == "RelativeScale3D")
{

if (UStructProperty *SProp = Cast<UStructProperty>(Prop))
{
if (UScriptStruct *SSProp = Cast<UScriptStruct>(SProp->Struct))
{
if (SSProp == TBaseStructure<FVector>::Get())
return true;
}

}
}

if (Prop->GetName() == "bVisible")
{

if (UBoolProperty *SProp = Cast<UBoolProperty>(Prop))
{
return true;

}
}

/*
if (UArrayProperty *PArray = Cast<UArrayProperty>(Prop))
{
return ObservableProp(PArray->Inner);
Expand Down Expand Up @@ -82,6 +136,7 @@ bool FMLObservedPropertyDetails::ObservableProp(UProperty *Prop)
}
}
*/

return false;
}
Expand Down

0 comments on commit 8e23e76

Please sign in to comment.