Merge pull request #30354 from LikeLakers2/multinodeedit-same-type-properties

MultiNodeEdit now only shows properties with the exact same PropertyInfo data
This commit is contained in:
Rémi Verschelde 2019-07-19 17:58:17 +02:00 committed by GitHub
commit c317a3ce16
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -179,6 +179,15 @@ struct PropertyInfo {
usage(PROPERTY_USAGE_DEFAULT) {
}
bool operator==(const PropertyInfo &p_info) const {
return ((type == p_info.type) &&
(name == p_info.name) &&
(class_name == p_info.class_name) &&
(hint == p_info.hint) &&
(hint_string == p_info.hint_string) &&
(usage == p_info.usage));
}
bool operator<(const PropertyInfo &p_info) const {
return name < p_info.name;
}

View file

@ -152,7 +152,9 @@ void MultiNodeEdit::_get_property_list(List<PropertyInfo> *p_list) const {
datas.push_back(usage.getptr(F->get().name));
}
usage[F->get().name].uses++;
// Make sure only properties with the same exact PropertyInfo data will appear
if (usage[F->get().name].info == F->get())
usage[F->get().name].uses++;
}
nc++;