mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 19:08:55 -04:00
fix adjust_all_priorities
This commit is contained in:
parent
3559ab5380
commit
be67f3475e
@ -2856,6 +2856,15 @@ r_find_matches(qpNodePathCollection &result,
|
|||||||
void qpNodePath::
|
void qpNodePath::
|
||||||
r_adjust_all_priorities(PandaNode *node, int adjustment) {
|
r_adjust_all_priorities(PandaNode *node, int adjustment) {
|
||||||
node->set_state(node->get_state()->adjust_all_priorities(adjustment));
|
node->set_state(node->get_state()->adjust_all_priorities(adjustment));
|
||||||
|
if (node->is_geom_node()) {
|
||||||
|
qpGeomNode *gnode;
|
||||||
|
DCAST_INTO_V(gnode, node);
|
||||||
|
|
||||||
|
int num_geoms = gnode->get_num_geoms();
|
||||||
|
for (int i = 0; i < num_geoms; i++) {
|
||||||
|
gnode->set_geom_state(i, gnode->get_geom_state(i)->adjust_all_priorities(adjustment));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
PandaNode::Children cr = node->get_children();
|
PandaNode::Children cr = node->get_children();
|
||||||
int num_children = cr.get_num_children();
|
int num_children = cr.get_num_children();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user