From ef72d8570a408c963d2790270938e41a06dd23d3 Mon Sep 17 00:00:00 2001 From: Valtteri Koskivuori Date: Sun, 17 Dec 2023 23:03:34 +0200 Subject: [PATCH] blender: Fix another enum typo I dislike python's approach to enums, where they are just integers as members of a normal class. Easy to get it wrong, and just awkward all around. --- bindings/nodes/value.py | 8 ++++---- include/c-ray/node.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bindings/nodes/value.py b/bindings/nodes/value.py index 4fa6324e..ff941c34 100644 --- a/bindings/nodes/value.py +++ b/bindings/nodes/value.py @@ -27,10 +27,10 @@ class _value_arg_alpha(ct.Structure): class _component(IntEnum): X = 0 Y = 1 - Z = 3 - U = 4 - V = 5 - F = 6 + Z = 2 + U = 3 + V = 4 + F = 5 class _value_arg_vec_to_value(ct.Structure): _fields_ = [ diff --git a/include/c-ray/node.h b/include/c-ray/node.h index 8d56c809..0f6ee2d3 100644 --- a/include/c-ray/node.h +++ b/include/c-ray/node.h @@ -89,7 +89,7 @@ struct cr_value_node { struct cr_vec_to_value_params { enum cr_vec_to_value_component { - X, Y, Z, U, V, F + X = 0, Y, Z, U, V, F } comp; struct cr_vector_node *vec; } vec_to_value;