diff --git a/panda/src/egg/eggData.cxx b/panda/src/egg/eggData.cxx index cedc199160..1792fb46dd 100644 --- a/panda/src/egg/eggData.cxx +++ b/panda/src/egg/eggData.cxx @@ -157,6 +157,18 @@ read(istream &in) { return (egg_error_count() == 0); } +//////////////////////////////////////////////////////////////////// +// Function: EggData::merge +// Access: Public +// Description: Appends the other egg structure to the end of this +// one. The other egg structure is invalidated. +//////////////////////////////////////////////////////////////////// +void EggData:: +merge(EggData &other) { + other.set_coordinate_system(get_coordinate_system()); + steal_children(other); +} + //////////////////////////////////////////////////////////////////// // Function: EggData::load_externals diff --git a/panda/src/egg/eggData.h b/panda/src/egg/eggData.h index 94077f831a..af72b873a9 100644 --- a/panda/src/egg/eggData.h +++ b/panda/src/egg/eggData.h @@ -54,6 +54,7 @@ public: bool read(Filename filename); bool read(istream &in); + void merge(EggData &other); bool load_externals(const DSearchPath &searchpath = DSearchPath()); int collapse_equivalent_textures();