make property not be applied in skeleton if not inside tree. This will eventually e changed. Fixes #5205

This commit is contained in:
Juan Linietsky 2016-06-29 18:38:32 -03:00
parent fe5ee68489
commit 449a28e75a

View File

@ -64,6 +64,7 @@ bool Skeleton::_set(const StringName& p_path, const Variant& p_value) {
else if (what=="bound_childs") { else if (what=="bound_childs") {
Array children=p_value; Array children=p_value;
if (is_inside_tree()) {
bones[which].nodes_bound.clear(); bones[which].nodes_bound.clear();
for (int i=0;i<children.size();i++) { for (int i=0;i<children.size();i++) {
@ -74,6 +75,7 @@ bool Skeleton::_set(const StringName& p_path, const Variant& p_value) {
ERR_CONTINUE(!node); ERR_CONTINUE(!node);
bind_child_node_to_bone(which,node); bind_child_node_to_bone(which,node);
} }
}
} else { } else {
return false; return false;
} }