You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
Canvas item hierarchical culling
Adds optional hierarchical culling to the 2D rendering (within VisualServer). Each canvas item maintains a bound in local space of the item itself and all child / grandchild items. This allows branches to be culled at once when they don't intersect a viewport.
This commit is contained in:
@@ -1051,8 +1051,16 @@ StringName Node::get_name() const {
|
||||
|
||||
void Node::_set_name_nocheck(const StringName &p_name) {
|
||||
data.name = p_name;
|
||||
#ifdef DEV_ENABLED
|
||||
_name_changed_notify();
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef DEV_ENABLED
|
||||
void Node::_name_changed_notify() {
|
||||
}
|
||||
#endif
|
||||
|
||||
void Node::set_name(const String &p_name) {
|
||||
String name = p_name.validate_node_name();
|
||||
|
||||
@@ -1078,6 +1086,10 @@ void Node::set_name(const String &p_name) {
|
||||
get_tree()->node_renamed(this);
|
||||
get_tree()->tree_changed();
|
||||
}
|
||||
|
||||
#ifdef DEV_ENABLED
|
||||
_name_changed_notify();
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool node_hrcr = false;
|
||||
@@ -1262,7 +1274,7 @@ void Node::_generate_serial_child_name(const Node *p_child, StringName &name) co
|
||||
void Node::_add_child_nocheck(Node *p_child, const StringName &p_name) {
|
||||
//add a child node quickly, without name validation
|
||||
|
||||
p_child->data.name = p_name;
|
||||
p_child->_set_name_nocheck(p_name);
|
||||
p_child->data.pos = data.children.size();
|
||||
data.children.push_back(p_child);
|
||||
p_child->data.parent = this;
|
||||
|
||||
Reference in New Issue
Block a user