diff --git a/panda/src/egg/eggGroup.I b/panda/src/egg/eggGroup.I index 75e94f6071..194bb3fb86 100644 --- a/panda/src/egg/eggGroup.I +++ b/panda/src/egg/eggGroup.I @@ -490,6 +490,30 @@ get_portal_flag() const { return ((_flags2 & F2_portal_flag) != 0); } +//////////////////////////////////////////////////////////////////// +// Function: EggGroup::set_polylight_flag +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE void EggGroup:: +set_polylight_flag(bool flag) { + if (flag) { + _flags2 |= F2_polylight_flag; + } else { + _flags2 &= ~F2_polylight_flag; + } +} + +//////////////////////////////////////////////////////////////////// +// Function: EggGroup::get_polylight_flag +// Access: Public +// Description: +//////////////////////////////////////////////////////////////////// +INLINE bool EggGroup:: +get_polylight_flag() const { + return ((_flags2 & F2_polylight_flag) != 0); +} + //////////////////////////////////////////////////////////////////// // Function: EggGroup::set_collide_mask // Access: Public diff --git a/panda/src/egg/eggGroup.cxx b/panda/src/egg/eggGroup.cxx index 8bb3f7f031..3ff008e478 100644 --- a/panda/src/egg/eggGroup.cxx +++ b/panda/src/egg/eggGroup.cxx @@ -213,6 +213,10 @@ write(ostream &out, int indent_level) const { indent(out, indent_level) << " { 1 }\n"; } + if (get_polylight_flag()) { + indent(out, indent_level) << " { 1 }\n"; + } + // We have to write the children nodes before we write the vertex // references, since we might be referencing a vertex that's defined // in one of those children nodes! diff --git a/panda/src/egg/eggGroup.h b/panda/src/egg/eggGroup.h index 2380ff1b28..a353fa8dd5 100644 --- a/panda/src/egg/eggGroup.h +++ b/panda/src/egg/eggGroup.h @@ -177,6 +177,9 @@ PUBLISHED: INLINE void set_portal_flag(bool flag); INLINE bool get_portal_flag() const; + INLINE void set_polylight_flag(bool flag); + INLINE bool get_polylight_flag() const; + INLINE void set_collide_mask(CollideMask mask); INLINE void clear_collide_mask(); INLINE bool has_collide_mask() const; @@ -268,6 +271,7 @@ private: F2_dcs_type = 0x00000030, F2_portal_flag = 0x00000040, + F2_polylight_flag = 0x00000080, }; int _flags; diff --git a/panda/src/egg/parser.yxx b/panda/src/egg/parser.yxx index f1e1473413..b379a1d95d 100644 --- a/panda/src/egg/parser.yxx +++ b/panda/src/egg/parser.yxx @@ -970,6 +970,8 @@ group_body: group->set_into_collide_mask(group->get_into_collide_mask() | ulong_value); } else if (cmp_nocase_uh(name, "portal") == 0) { group->set_portal_flag(value != 0); + } else if (cmp_nocase_uh(name, "polylight") == 0) { + group->set_polylight_flag(value != 0); } else { eggyywarning("Unknown group scalar " + name); }