Fix not using hardcoded order for showing Actor main properties in editor
This commit is contained in:
@@ -597,6 +597,11 @@ void Actor::SetDirection(const Vector3& value)
|
||||
SetOrientation(orientation);
|
||||
}
|
||||
|
||||
void Actor::ResetLocalTransform()
|
||||
{
|
||||
SetLocalTransform(Transform::Identity);
|
||||
}
|
||||
|
||||
void Actor::SetLocalTransform(const Transform& value)
|
||||
{
|
||||
CHECK(!value.IsNanOrInfinity());
|
||||
@@ -1258,6 +1263,11 @@ Script* Actor::GetScriptByPrefabObjectId(const Guid& prefabObjectId) const
|
||||
return result;
|
||||
}
|
||||
|
||||
bool Actor::IsPrefabRoot() const
|
||||
{
|
||||
return _isPrefabRoot != 0;
|
||||
}
|
||||
|
||||
Actor* Actor::FindActor(const StringView& name) const
|
||||
{
|
||||
Actor* result = nullptr;
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
/// <summary>
|
||||
/// Gets the object layer (index). Can be used for selective rendering or ignoring raycasts.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="NoAnimate, EditorDisplay(\"General\"), EditorOrder(-69)")
|
||||
API_PROPERTY(Attributes="NoAnimate, EditorDisplay(\"General\"), EditorOrder(-69), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.ActorLayerEditor\")")
|
||||
FORCE_INLINE int32 GetLayer() const
|
||||
{
|
||||
return _layer;
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
/// <summary>
|
||||
/// Gets the name of the tag.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="NoAnimate, EditorDisplay(\"General\"), EditorOrder(-68)")
|
||||
API_PROPERTY(Attributes="NoAnimate, EditorDisplay(\"General\"), EditorOrder(-68), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.ActorTagEditor\")")
|
||||
const String& GetTag() const;
|
||||
|
||||
/// <summary>
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
/// <summary>
|
||||
/// Gets the actor static fags.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="NoAnimate, EditorDisplay(\"General\"), EditorOrder(-80)")
|
||||
API_PROPERTY(Attributes="NoAnimate, EditorDisplay(\"General\"), EditorOrder(-80), CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.ActorStaticFlagsEditor\")")
|
||||
FORCE_INLINE StaticFlags GetStaticFlags() const
|
||||
{
|
||||
return _staticFlags;
|
||||
@@ -500,10 +500,7 @@ public:
|
||||
/// <summary>
|
||||
/// Resets the actor local transform.
|
||||
/// </summary>
|
||||
FORCE_INLINE void ResetLocalTransform()
|
||||
{
|
||||
SetLocalTransform(Transform::Identity);
|
||||
}
|
||||
void ResetLocalTransform();
|
||||
|
||||
/// <summary>
|
||||
/// Gets local transform of the actor in parent actor space.
|
||||
@@ -523,7 +520,7 @@ public:
|
||||
/// <summary>
|
||||
/// Gets local position of the actor in parent actor space.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="EditorDisplay(\"Transform\", \"Position\"), DefaultValue(typeof(Vector3), \"0,0,0\"), EditorOrder(-30), NoSerialize")
|
||||
API_PROPERTY(Attributes="EditorDisplay(\"Transform\", \"Position\"), DefaultValue(typeof(Vector3), \"0,0,0\"), EditorOrder(-30), NoSerialize, CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.ActorTransformEditor+PositionScaleEditor\")")
|
||||
FORCE_INLINE Vector3 GetLocalPosition() const
|
||||
{
|
||||
return _localTransform.Translation;
|
||||
@@ -538,7 +535,7 @@ public:
|
||||
/// <summary>
|
||||
/// Gets local rotation of the actor in parent actor space.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="EditorDisplay(\"Transform\", \"Rotation\"), DefaultValue(typeof(Quaternion), \"0,0,0,1\"), EditorOrder(-20), NoSerialize")
|
||||
API_PROPERTY(Attributes="EditorDisplay(\"Transform\", \"Rotation\"), DefaultValue(typeof(Quaternion), \"0,0,0,1\"), EditorOrder(-20), NoSerialize, CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.ActorTransformEditor+OrientationEditor\")")
|
||||
FORCE_INLINE Quaternion GetLocalOrientation() const
|
||||
{
|
||||
return _localTransform.Orientation;
|
||||
@@ -553,7 +550,7 @@ public:
|
||||
/// <summary>
|
||||
/// Gets local scale vector of the actor in parent actor space.
|
||||
/// </summary>
|
||||
API_PROPERTY(Attributes="EditorDisplay(\"Transform\", \"Scale\"), DefaultValue(typeof(Vector3), \"1,1,1\"), Limit(float.MinValue, float.MaxValue, 0.01f), EditorOrder(-10), NoSerialize")
|
||||
API_PROPERTY(Attributes="EditorDisplay(\"Transform\", \"Scale\"), DefaultValue(typeof(Vector3), \"1,1,1\"), Limit(float.MinValue, float.MaxValue, 0.01f), EditorOrder(-10), NoSerialize, CustomEditorAlias(\"FlaxEditor.CustomEditors.Editors.ActorTransformEditor+PositionScaleEditor\")")
|
||||
FORCE_INLINE Vector3 GetLocalScale() const
|
||||
{
|
||||
return _localTransform.Scale;
|
||||
@@ -708,15 +705,10 @@ public:
|
||||
/// <returns>The script or null.</returns>
|
||||
Script* GetScriptByPrefabObjectId(const Guid& prefabObjectId) const;
|
||||
|
||||
public:
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether this actor is a prefab instance root object.
|
||||
/// </summary>
|
||||
API_PROPERTY() FORCE_INLINE bool IsPrefabRoot() const
|
||||
{
|
||||
return _isPrefabRoot != 0;
|
||||
}
|
||||
API_PROPERTY() bool IsPrefabRoot() const;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user