Fix: brush.asset_edit_metadata truncates author and description

Both fields have the RNA value defined with a max size of `MAX_NAME`,
despite the underlying DNA value being a dynamic length string.

To fix this, remove the length restriction for the operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/138377
This commit is contained in:
Sean Kim
2025-05-05 21:19:31 +02:00
committed by Sean Kim
parent 7aeadd397d
commit b47332c40d

View File

@@ -454,8 +454,8 @@ void BRUSH_OT_asset_edit_metadata(wmOperatorType *ot)
ot->srna, "catalog_path", nullptr, MAX_NAME, "Catalog", "The asset's catalog path");
RNA_def_property_string_search_func_runtime(
prop, visit_active_library_catalogs_catalog_for_search_fn, PROP_STRING_SEARCH_SUGGESTION);
RNA_def_string(ot->srna, "author", nullptr, MAX_NAME, "Author", "");
RNA_def_string(ot->srna, "description", nullptr, MAX_NAME, "Description", "");
RNA_def_string(ot->srna, "author", nullptr, 0, "Author", "");
RNA_def_string(ot->srna, "description", nullptr, 0, "Description", "");
}
static wmOperatorStatus brush_asset_load_preview_exec(bContext *C, wmOperator *op)