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
This commit is contained in:
Jesse Yurkovich 2024-07-04 02:03:27 +02:00 committed by Jesse Yurkovich
parent 94c184d2a7
commit 4806078dbd

@ -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);
}
}