From 4806078dbdf1c2ffa2d3bdc8dcf879dc80d2a7b6 Mon Sep 17 00:00:00 2001 From: Jesse Yurkovich Date: Thu, 4 Jul 2024 02:03:27 +0200 Subject: [PATCH] Fix: USD: Use correct property names in RNA update callback Use the correct property names in the up and forward axis update callbacks. Otherwise they don't work as intended and the following will be traced to the console: ``` RNA_enum_get: WM_OT_usd_export.forward_axis not found. RNA_enum_get: WM_OT_usd_export.up_axis not found. ``` Pull Request: https://projects.blender.org/blender/blender/pulls/124112 --- source/blender/editors/io/io_usd.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/blender/editors/io/io_usd.cc b/source/blender/editors/io/io_usd.cc index 6332da26fc7..f767c247a05 100644 --- a/source/blender/editors/io/io_usd.cc +++ b/source/blender/editors/io/io_usd.cc @@ -482,19 +482,19 @@ static bool wm_usd_export_check(bContext * /*C*/, wmOperator *op) static void forward_axis_update(Main * /*main*/, Scene * /*scene*/, PointerRNA *ptr) { - int forward = RNA_enum_get(ptr, "forward_axis"); - int up = RNA_enum_get(ptr, "up_axis"); + int forward = RNA_enum_get(ptr, "export_global_forward_selection"); + int up = RNA_enum_get(ptr, "export_global_up_selection"); if ((forward % 3) == (up % 3)) { - RNA_enum_set(ptr, "up_axis", (up + 1) % 6); + RNA_enum_set(ptr, "export_global_up_selection", (up + 1) % 6); } } static void up_axis_update(Main * /*main*/, Scene * /*scene*/, PointerRNA *ptr) { - int forward = RNA_enum_get(ptr, "forward_axis"); - int up = RNA_enum_get(ptr, "up_axis"); + int forward = RNA_enum_get(ptr, "export_global_forward_selection"); + int up = RNA_enum_get(ptr, "export_global_up_selection"); if ((forward % 3) == (up % 3)) { - RNA_enum_set(ptr, "forward_axis", (forward + 1) % 6); + RNA_enum_set(ptr, "export_global_forward_selection", (forward + 1) % 6); } }