Merge branch 'blender-v2.92-release'

This commit is contained in:
Campbell Barton 2021-01-17 18:30:14 +11:00
commit 14bb9f09ab
3 changed files with 5 additions and 2 deletions

View File

@ -566,7 +566,6 @@ static void rna_def_attribute(BlenderRNA *brna)
RNA_def_struct_path_func(srna, "rna_Attribute_path");
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_struct_name_property(srna, prop);
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Attribute_name_set");
RNA_def_property_editable_func(prop, "rna_Attribute_name_editable");
RNA_def_property_ui_text(prop, "Name", "Name of the Attribute");

View File

@ -1125,6 +1125,11 @@ void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *pr
CLOG_ERROR(&LOG, "\"%s.%s\", must be a string property.", srna->identifier, prop->identifier);
DefRNA.error = true;
}
else if (srna->nameproperty != NULL) {
CLOG_ERROR(
&LOG, "\"%s.%s\", name property is already set.", srna->identifier, prop->identifier);
DefRNA.error = true;
}
else {
srna->nameproperty = prop;
}

View File

@ -1081,7 +1081,6 @@ static void rna_def_render_pass(BlenderRNA *brna)
prop = RNA_def_property(srna, "fullname", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "fullname");
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_struct_name_property(srna, prop);
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "name");