diff --git a/panda/src/pgraph/nodePathCollection.cxx b/panda/src/pgraph/nodePathCollection.cxx index 68f7c0e14c..6379bde748 100644 --- a/panda/src/pgraph/nodePathCollection.cxx +++ b/panda/src/pgraph/nodePathCollection.cxx @@ -441,7 +441,32 @@ set_color(float r, float g, float b, float a, int priority) { void NodePathCollection:: set_color(const Colorf &color, int priority) { for (int i = 0; i < get_num_paths(); i++) { - get_path(i).node()->set_attrib(ColorAttrib::make_flat(color), priority); + get_path(i).set_color(color, priority); + //get_path(i).node()->set_attrib(ColorAttrib::make_flat(color), priority); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: NodePathCollection::set_color_scale +// Access: Published +// Description: Applies color scales to all NodePaths in the collection +//////////////////////////////////////////////////////////////////// +void NodePathCollection:: +set_color_scale(float r, float g, float b, float a, int priority) { + for (int i = 0; i < get_num_paths(); i++) { + get_path(i).set_color_scale(Colorf(r, g, b, a), priority); + } +} + +//////////////////////////////////////////////////////////////////// +// Function: NodePathCollection::set_color_scale +// Access: Published +// Description: Applies color scales to all NodePaths in the collection +//////////////////////////////////////////////////////////////////// +void NodePathCollection:: +set_color_scale(const Colorf &color, int priority) { + for (int i = 0; i < get_num_paths(); i++) { + get_path(i).set_color_scale(color, priority); } } diff --git a/panda/src/pgraph/nodePathCollection.h b/panda/src/pgraph/nodePathCollection.h index f025f55597..f70686251d 100644 --- a/panda/src/pgraph/nodePathCollection.h +++ b/panda/src/pgraph/nodePathCollection.h @@ -72,6 +72,10 @@ PUBLISHED: int priority = 0); void set_color(const Colorf &color, int priority = 0); + void set_color_scale(float r, float g, float b, float a = 1.0, + int priority = 0); + void set_color_scale(const Colorf &color, int priority = 0); + void output(ostream &out) const; void write(ostream &out, int indent_level = 0) const; diff --git a/panda/src/pgraph/portalNode.cxx b/panda/src/pgraph/portalNode.cxx index 9d76c02bec..36ffeb908f 100755 --- a/panda/src/pgraph/portalNode.cxx +++ b/panda/src/pgraph/portalNode.cxx @@ -286,7 +286,8 @@ cull_callback(CullTraverser *trav, CullTraverserData &data) { // Get the net trasform of the _cell_out as seen from the camera. CPT(TransformState) cell_transform = - trav->get_camera_transform()->invert_compose(_cell_out.get_net_transform()); + // trav->get_camera_transform()->invert_compose(_cell_out.get_net_transform()); + _cell_out.get_net_transform(); CPT(TransformState) frustum_transform = _cell_out.get_net_transform()->invert_compose(portal_viewer->_scene_setup->get_cull_center().get_net_transform());