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

Function _get_enum_location

modules/gdscript/gdscript_editor.cpp:697–710  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

695}
696
697static int _get_enum_location(const StringName &p_class, const StringName &p_enum) {
698 if (!ClassDB::has_enum(p_class, p_enum)) {
699 return ScriptLanguage::LOCATION_OTHER;
700 }
701
702 int depth = 0;
703 StringName class_test = p_class;
704 while (class_test && !ClassDB::has_enum(class_test, p_enum, true)) {
705 class_test = ClassDB::get_parent_class(class_test);
706 depth++;
707 }
708
709 return depth | ScriptLanguage::LOCATION_PARENT_MASK;
710}
711
712// END LOCATION METHODS
713

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected