mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 13:49:54 +00:00
Unmark Node::is_editable_instance() parameter as required
This commit is contained in:
parent
2ecefada8d
commit
6d60660cd6
2 changed files with 5 additions and 3 deletions
|
|
@ -2689,8 +2689,10 @@ void Node::set_editable_instance(RequiredParam<Node> rp_node, bool p_editable) {
|
|||
p_node->_emit_editor_state_changed();
|
||||
}
|
||||
|
||||
bool Node::is_editable_instance(RequiredParam<const Node> rp_node) const {
|
||||
EXTRACT_PARAM_OR_FAIL_V(p_node, rp_node, false);
|
||||
bool Node::is_editable_instance(const Node *p_node) const {
|
||||
if (!p_node) {
|
||||
return false; // Easier, null is never editable. :)
|
||||
}
|
||||
ERR_FAIL_COND_V(!is_ancestor_of(p_node), false);
|
||||
return p_node->data.editable_instance;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -622,7 +622,7 @@ public:
|
|||
String get_editor_description() const;
|
||||
|
||||
void set_editable_instance(RequiredParam<Node> rp_node, bool p_editable);
|
||||
bool is_editable_instance(RequiredParam<const Node> rp_node) const;
|
||||
bool is_editable_instance(const Node *p_node) const;
|
||||
Node *get_deepest_editable_node(Node *p_start_node) const;
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue