Make build profile project detection also set build options
This commit is contained in:
@ -2152,6 +2152,30 @@ bool ClassDB::is_class_runtime(const StringName &p_class) {
|
||||
return ti->is_runtime;
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
void ClassDB::add_class_dependency(const StringName &p_class, const StringName &p_dependency) {
|
||||
Locker::Lock lock(Locker::STATE_WRITE);
|
||||
|
||||
ERR_FAIL_COND_MSG(!classes.has(p_class), vformat("Request for nonexistent class '%s'.", p_class));
|
||||
if (classes[p_class].dependency_list.find(p_dependency)) {
|
||||
ERR_FAIL();
|
||||
}
|
||||
|
||||
classes[p_class].dependency_list.push_back(p_dependency);
|
||||
}
|
||||
|
||||
void ClassDB::get_class_dependencies(const StringName &p_class, List<StringName> *r_rependencies) {
|
||||
Locker::Lock lock(Locker::STATE_READ);
|
||||
|
||||
ClassInfo *ti = classes.getptr(p_class);
|
||||
ERR_FAIL_NULL_MSG(ti, vformat("Cannot get class '%s'.", String(p_class)));
|
||||
|
||||
for (const StringName &dep : ti->dependency_list) {
|
||||
r_rependencies->push_back(dep);
|
||||
}
|
||||
}
|
||||
#endif // TOOLS_ENABLED
|
||||
|
||||
void ClassDB::add_resource_base_extension(const StringName &p_extension, const StringName &p_class) {
|
||||
if (resource_base_extensions.has(p_extension)) {
|
||||
return;
|
||||
|
||||
@ -118,6 +118,7 @@ public:
|
||||
HashMap<StringName, MethodInfo> signal_map;
|
||||
List<PropertyInfo> property_list;
|
||||
HashMap<StringName, PropertyInfo> property_map;
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
List<StringName> constant_order;
|
||||
List<StringName> method_order;
|
||||
@ -127,6 +128,11 @@ public:
|
||||
HashMap<StringName, Vector<Error>> method_error_values;
|
||||
HashMap<StringName, List<StringName>> linked_properties;
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
List<StringName> dependency_list;
|
||||
#endif
|
||||
|
||||
HashMap<StringName, PropertySetGet> property_setget;
|
||||
HashMap<StringName, Vector<uint32_t>> virtual_methods_compat;
|
||||
|
||||
@ -499,6 +505,11 @@ public:
|
||||
static bool is_class_reloadable(const StringName &p_class);
|
||||
static bool is_class_runtime(const StringName &p_class);
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
static void add_class_dependency(const StringName &p_class, const StringName &p_dependency);
|
||||
static void get_class_dependencies(const StringName &p_class, List<StringName> *r_rependencies);
|
||||
#endif
|
||||
|
||||
static void add_resource_base_extension(const StringName &p_extension, const StringName &p_class);
|
||||
static void get_resource_base_extensions(List<String> *p_extensions);
|
||||
static void get_extensions_for_type(const StringName &p_class, List<String> *p_extensions);
|
||||
|
||||
@ -147,6 +147,12 @@ enum PropertyUsageFlags {
|
||||
#define ADD_SUBGROUP_INDENT(m_name, m_prefix, m_depth) ::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix, m_depth)
|
||||
#define ADD_LINKED_PROPERTY(m_property, m_linked_property) ::ClassDB::add_linked_property(get_class_static(), m_property, m_linked_property)
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
#define ADD_CLASS_DEPENDENCY(m_class) ::ClassDB::add_class_dependency(get_class_static(), m_class)
|
||||
#else
|
||||
#define ADD_CLASS_DEPENDENCY(m_class)
|
||||
#endif
|
||||
|
||||
#define ADD_ARRAY_COUNT(m_label, m_count_property, m_count_property_setter, m_count_property_getter, m_prefix) ClassDB::add_property_array_count(get_class_static(), m_label, m_count_property, StringName(m_count_property_setter), StringName(m_count_property_getter), m_prefix)
|
||||
#define ADD_ARRAY_COUNT_WITH_USAGE_FLAGS(m_label, m_count_property, m_count_property_setter, m_count_property_getter, m_prefix, m_property_usage_flags) ClassDB::add_property_array_count(get_class_static(), m_label, m_count_property, StringName(m_count_property_setter), StringName(m_count_property_getter), m_prefix, m_property_usage_flags)
|
||||
#define ADD_ARRAY(m_array_path, m_prefix) ClassDB::add_property_array(get_class_static(), m_array_path, m_prefix)
|
||||
@ -979,7 +985,6 @@ public:
|
||||
bool editor_is_section_unfolded(const String &p_section);
|
||||
const HashSet<String> &editor_get_section_folding() const { return editor_section_folding; }
|
||||
void editor_clear_section_folding() { editor_section_folding.clear(); }
|
||||
|
||||
#endif
|
||||
|
||||
// Used by script languages to store binding data.
|
||||
|
||||
Reference in New Issue
Block a user