David Rose 25 лет назад
Родитель
Сommit
3638b0110c

+ 1 - 1
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

+ 11 - 0
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

+ 2 - 0
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:

+ 6 - 0
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);