-fixed bug importing skeletons
This commit is contained in:
parent
6c27ac58b8
commit
51609ffc04
3 changed files with 566 additions and 564 deletions
|
@ -44,6 +44,7 @@ bool Skeleton::_set(const StringName& p_path, const Variant& p_value) {
|
|||
int which=path.get_slice("/",1).to_int();
|
||||
String what=path.get_slice("/",2);
|
||||
|
||||
|
||||
if (which==bones.size() && what=="name") {
|
||||
|
||||
add_bone(p_value);
|
||||
|
@ -94,7 +95,7 @@ bool Skeleton::_get(const StringName& p_name,Variant &r_ret) const {
|
|||
|
||||
if (what=="name")
|
||||
r_ret=get_bone_name(which);
|
||||
if (what=="parent")
|
||||
else if (what=="parent")
|
||||
r_ret=get_bone_parent(which);
|
||||
else if (what=="rest")
|
||||
r_ret=get_bone_rest(which);
|
||||
|
|
|
@ -108,6 +108,7 @@ Error ColladaImport::_populate_skeleton(Skeleton *p_skeleton,Collada::Node *p_no
|
|||
|
||||
Collada::NodeJoint *joint = static_cast<Collada::NodeJoint*>(p_node);
|
||||
|
||||
|
||||
p_skeleton->add_bone(p_node->name);
|
||||
if (p_parent>=0)
|
||||
p_skeleton->set_bone_parent(r_bone,p_parent);
|
||||
|
|
Loading…
Reference in a new issue