Skip to content

Commit

Permalink
blender: Fix another enum typo
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vkoskiv committed Dec 17, 2023
1 parent a334409 commit ef72d85
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions bindings/nodes/value.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_ = [
Expand Down
2 changes: 1 addition & 1 deletion include/c-ray/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ef72d85

Please sign in to comment.