MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _validate_parent

Method _validate_parent

editor/script/script_create_dialog.cpp:226–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226bool ScriptCreateDialog::_validate_parent(const String &p_string) {
227 if (p_string.length() == 0) {
228 return false;
229 }
230
231 if (can_inherit_from_file && p_string.is_quoted()) {
232 String p = p_string.substr(1, p_string.length() - 2);
233 if (_validate_path(p, true).is_empty()) {
234 return true;
235 }
236 }
237
238 return EditorNode::get_editor_data().is_type_recognized(p_string);
239}
240
241String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must_exist, bool *r_path_valid) {
242 String p = p_path.strip_edges();

Callers

nothing calls this directly

Calls 5

is_quotedMethod · 0.80
substrMethod · 0.80
is_type_recognizedMethod · 0.80
lengthMethod · 0.45
is_emptyMethod · 0.45

Tested by

no test coverage detected