diff options
author | Aras Pranckevicius <aras@nesnausk.org> | 2022-09-07 11:47:29 +0300 |
---|---|---|
committer | Aras Pranckevicius <aras@nesnausk.org> | 2022-09-07 12:57:34 +0300 |
commit | 97bd04d665cb8c964e9159da94a3c7941cd4841c (patch) | |
tree | fc6bdebcbe095f461c56b1b6375cc43c220d6195 /source/blender/editors/io/io_collada.c | |
parent | 788952705c623d3748c6e46fa244b63bd9209717 (diff) |
Fix T100797: C++ exporters do not remember the path on subsequent exports
Most/all C++ based IO code had a pattern of doing using
RNA_struct_property_is_set to check whether a default path needs to
be set. However, it returns false for properties restored from
"previous operator settings" (property restoration code sets
IDP_FLAG_GHOST flag on them, which "is set" sees and goes
"nope, not set").
The fix here is to apply similar logic as 10 years ago in the
T32855 fix (rBdb250a4): use RNA_struct_property_is_set_ex instead.
Reviewed By: Campbell Barton
Differential Revision: https://developer.blender.org/D15904
Diffstat (limited to 'source/blender/editors/io/io_collada.c')
-rw-r--r-- | source/blender/editors/io/io_collada.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/io/io_collada.c b/source/blender/editors/io/io_collada.c index 6a5547021e4..7397138d8c5 100644 --- a/source/blender/editors/io/io_collada.c +++ b/source/blender/editors/io/io_collada.c @@ -38,7 +38,7 @@ static int wm_collada_export_invoke(bContext *C, wmOperator *op, const wmEvent * { Main *bmain = CTX_data_main(C); - if (!RNA_struct_property_is_set(op->ptr, "filepath")) { + if (!RNA_struct_property_is_set_ex(op->ptr, "filepath", false)) { char filepath[FILE_MAX]; const char *blendfile_path = BKE_main_blendfile_path(bmain); @@ -98,7 +98,7 @@ static int wm_collada_export_exec(bContext *C, wmOperator *op) int export_count; int sample_animations; - if (!RNA_struct_property_is_set(op->ptr, "filepath")) { + if (!RNA_struct_property_is_set_ex(op->ptr, "filepath", false)) { BKE_report(op->reports, RPT_ERROR, "No filename given"); return OPERATOR_CANCELLED; } @@ -709,7 +709,7 @@ static int wm_collada_import_exec(bContext *C, wmOperator *op) int keep_bind_info; ImportSettings import_settings; - if (!RNA_struct_property_is_set(op->ptr, "filepath")) { + if (!RNA_struct_property_is_set_ex(op->ptr, "filepath", false)) { BKE_report(op->reports, RPT_ERROR, "No filename given"); return OPERATOR_CANCELLED; } |