Skip to content
Snippets Groups Projects
Commit 8e9bad91 authored by Shon Ferguson's avatar Shon Ferguson
Browse files

Realized that it's NiAVObject that has a parent, not NiObjectNET.

parent 57ae8045
No related branches found
No related tags found
No related merge requests found
......@@ -242,7 +242,7 @@ template <class T> const Ref<T> DynamicCast( const NiObject * object ) {
const Type NiObject::TYPE("NiObject", NULL );
/*
* NiObjectNET - An object that has a name and can be parented to other objects. Can have extra data and controllers attatched.
* NiObjectNET - An object that has a name. Can have extra data and controllers attatched.
*/
class NiObjectNET;
......@@ -257,14 +257,7 @@ public:
static const Type TYPE;
string name;
void SetParent( NiObjectNETRef new_parent ) {
parent = new_parent;
}
NiObjectNETRef GetParent() { return parent; }
private:
NiObjectNET * parent;
//TODO: pointer to extra data type... find out what that is. AExtraData right now. Need functions to add/remove.
//TODO: pointer to first NiTimeController type. Need functions to add/remove.
};
......@@ -328,7 +321,13 @@ public:
*/
void SetWorldBindPos( Matrix44 const & m );
void SetParent( NiAVObjectRef new_parent ) {
parent = new_parent;
}
NiAVObjectRef GetParent() { return parent; }
protected:
NiAVObject * parent;
void ResetSkinnedFlag();
Matrix44 bindPosition;
......
......@@ -101,9 +101,9 @@ NiObjectRef FindRoot( vector<NiObjectRef> const & blocks ) {
//--Look for a NiNode that has no parents--//
//Find the first NiObjectNET derived object
NiObjectNETRef root;
NiAVObjectRef root;
for (uint i = 0; i < blocks.size(); ++i) {
root = DynamicCast<NiObjectNET>(blocks[i]);
root = DynamicCast<NiAVObject>(blocks[i]);
if ( root != NULL ) {
break;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment