diff --git a/pandatool/src/flt/fltInstanceDefinition.h b/pandatool/src/flt/fltInstanceDefinition.h index 92a95529c0..2b6f21370f 100644 --- a/pandatool/src/flt/fltInstanceDefinition.h +++ b/pandatool/src/flt/fltInstanceDefinition.h @@ -14,7 +14,7 @@ // Class : FltInstanceDefinition // Description : This special kind of record marks the top node of an // instance subtree. This subtree lives outside of the -// normal hierarchy, and is MultiGen's way of support +// normal hierarchy, and is MultiGen's way of supporting // instancing--each instance subtree has a unique index, // which may be referenced in a FltInstanceRef object to // make the instance appear in various places in the diff --git a/pandatool/src/flt/fltInstanceRef.cxx b/pandatool/src/flt/fltInstanceRef.cxx index 8d10a7df95..c4855cc9df 100644 --- a/pandatool/src/flt/fltInstanceRef.cxx +++ b/pandatool/src/flt/fltInstanceRef.cxx @@ -21,6 +21,17 @@ FltInstanceRef(FltHeader *header) : FltBead(header) { _instance_index = 0; } +//////////////////////////////////////////////////////////////////// +// Function: FltInstanceRef::get_instance +// Access: Public +// Description: Returns the instance subtree referenced by this node, +// or NULL if the reference is invalid. +//////////////////////////////////////////////////////////////////// +FltInstanceDefinition *FltInstanceRef:: +get_instance() const { + return _header->get_instance(_instance_index); +} + //////////////////////////////////////////////////////////////////// // Function: FltInstanceRef::write // Access: Public diff --git a/pandatool/src/flt/fltInstanceRef.h b/pandatool/src/flt/fltInstanceRef.h index c6c2bdfd65..7dfeccc40d 100644 --- a/pandatool/src/flt/fltInstanceRef.h +++ b/pandatool/src/flt/fltInstanceRef.h @@ -24,6 +24,8 @@ public: int _instance_index; + FltInstanceDefinition *get_instance() const; + virtual void write(ostream &out, int indent_level = 0) const; protected: diff --git a/pandatool/src/fltegg/fltToEggConverter.cxx b/pandatool/src/fltegg/fltToEggConverter.cxx index ba27bfcc9e..24b0d49ec8 100644 --- a/pandatool/src/fltegg/fltToEggConverter.cxx +++ b/pandatool/src/fltegg/fltToEggConverter.cxx @@ -198,6 +198,9 @@ convert_object(const FltObject *flt_object, FltToEggLevelState &state) { //////////////////////////////////////////////////////////////////// void FltToEggConverter:: convert_bead_id(const FltBeadID *flt_bead, FltToEggLevelState &state) { + nout << "Don't know how to convert beads of type " << flt_bead->get_type() + << "\n"; + exit(1); EggGroup *egg_group = new EggGroup(flt_bead->get_id()); state._egg_parent->add_child(egg_group); @@ -217,6 +220,9 @@ convert_bead_id(const FltBeadID *flt_bead, FltToEggLevelState &state) { //////////////////////////////////////////////////////////////////// void FltToEggConverter:: convert_bead(const FltBead *flt_bead, FltToEggLevelState &state) { + nout << "Don't know how to convert beads of type " << flt_bead->get_type() + << "\n"; + exit(1); EggGroup *egg_group = new EggGroup; state._egg_parent->add_child(egg_group);