all 3d models are made up of limbs. the hierarchy is pre-ordained. I dont know how dbc deals with limbs, but in dbp you set an internal structure by calling PerformChecklistForObjectLimbs(obj id). Once you do, you can use the LimbCount to create a loop and return the limb id's and the limbnames (from naming in 3d modelling app). Dbp also creates a null limb as the last limb so usually you just avoid it by making the loop one less than the limbcount. But again, I don't know if there are equivalents of this in dbc, youll need to check.