Added LockTranslationNode.
This commit is contained in:
@@ -35,6 +35,8 @@ json sSocketToJson(const Socket& socket) {
|
||||
if (socket.m_type == SocketType::SocketTypeBool) {
|
||||
result["value"] = socket.m_value.flag;
|
||||
} else if (socket.m_type == SocketType::SocketTypeAnimation) {
|
||||
} else if (socket.m_type == SocketType::SocketTypeInt) {
|
||||
result["value"] = socket.m_value.int_value;
|
||||
} else if (socket.m_type == SocketType::SocketTypeFloat) {
|
||||
result["value"] = socket.m_value.float_value;
|
||||
} else if (socket.m_type == SocketType::SocketTypeVec3) {
|
||||
@@ -72,6 +74,12 @@ Socket sJsonToSocket(const json& json_data) {
|
||||
} else if (type_string == "Animation") {
|
||||
result.m_type = SocketType::SocketTypeAnimation;
|
||||
result.m_type_size = sizeof(AnimData);
|
||||
} else if (type_string == "Int") {
|
||||
result.m_type = SocketType::SocketTypeInt;
|
||||
result.m_type_size = sizeof(int);
|
||||
if (have_value) {
|
||||
result.m_value.int_value = json_data["value"];
|
||||
}
|
||||
} else if (type_string == "Float") {
|
||||
result.m_type = SocketType::SocketTypeFloat;
|
||||
result.m_type_size = sizeof(float);
|
||||
@@ -572,6 +580,11 @@ void AnimGraphResource::setRuntimeNodeProperties(AnimGraph& instance) const {
|
||||
name.c_str(),
|
||||
property.m_value.flag);
|
||||
break;
|
||||
case SocketType::SocketTypeInt:
|
||||
node_instance_accessor->SetProperty(
|
||||
name.c_str(),
|
||||
property.m_value.int_value);
|
||||
break;
|
||||
case SocketType::SocketTypeFloat:
|
||||
node_instance_accessor->SetProperty(
|
||||
name.c_str(),
|
||||
|
||||
Reference in New Issue
Block a user