|
@@ -79,7 +79,8 @@ void Node::RegisterObject(Context* context)
|
|
|
|
|
|
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Is Enabled", IsEnabled, SetEnabled, bool, true, AM_DEFAULT);
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Is Enabled", IsEnabled, SetEnabled, bool, true, AM_DEFAULT);
|
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Name", GetName, SetName, String, String::EMPTY, AM_DEFAULT);
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Name", GetName, SetName, String, String::EMPTY, AM_DEFAULT);
|
|
|
- URHO3D_ACCESSOR_ATTRIBUTE("Tag", GetTag, SetTag, StringHash, StringHash::ZERO, AM_DEFAULT);
|
|
|
|
|
|
|
+ URHO3D_ACCESSOR_ATTRIBUTE("Tag", GetTag, SetTag, StringHash, StringHash::ZERO, AM_DEFAULT | AM_NOEDIT);
|
|
|
|
|
+ URHO3D_ACCESSOR_ATTRIBUTE("TagString", GetTagString, SetTagString, String, String::EMPTY, AM_FILE | AM_EDIT);
|
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Position", GetPosition, SetPosition, Vector3, Vector3::ZERO, AM_FILE);
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Position", GetPosition, SetPosition, Vector3, Vector3::ZERO, AM_FILE);
|
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Rotation", GetRotation, SetRotation, Quaternion, Quaternion::IDENTITY, AM_FILE);
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Rotation", GetRotation, SetRotation, Quaternion, Quaternion::IDENTITY, AM_FILE);
|
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Scale", GetScale, SetScale, Vector3, Vector3::ONE, AM_DEFAULT);
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Scale", GetScale, SetScale, Vector3, Vector3::ONE, AM_DEFAULT);
|
|
@@ -368,6 +369,13 @@ void Node::SetTag(const StringHash& tag)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void Node::SetTagString(const String & tag)
|
|
|
|
|
+{
|
|
|
|
|
+ StringHash id(tag);
|
|
|
|
|
+ tagString_ = tag;
|
|
|
|
|
+ SetTag(id);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void Node::SetPosition(const Vector3& position)
|
|
void Node::SetPosition(const Vector3& position)
|
|
|
{
|
|
{
|
|
|
position_ = position;
|
|
position_ = position;
|
|
@@ -1237,6 +1245,13 @@ const StringHash& Node::GetTag() const
|
|
|
return tag_;
|
|
return tag_;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const String & Node::GetTagString() const
|
|
|
|
|
+{
|
|
|
|
|
+ if (tagString_.Empty() && scene_)
|
|
|
|
|
+ return scene_->GetTagName(tag_);
|
|
|
|
|
+ return tagString_;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const Variant& Node::GetVar(StringHash key) const
|
|
const Variant& Node::GetVar(StringHash key) const
|
|
|
{
|
|
{
|
|
|
VariantMap::ConstIterator i = vars_.Find(key);
|
|
VariantMap::ConstIterator i = vars_.Find(key);
|