Skip to content

Do not wrap properties with SET_IDX flag

  • Properties of these types were wrapped as write-only, and even then, it was a strange syntax to set the values.
  • This commit turns off wrapping for properties of type SET_IDX until we figure out a better approach

For example:

# Instead of using
lut.SetTableValue(0, 0.4, 0.5, 0.6, 1.0)
# In the past, one could do
lut.table_value = (0, 0.4, 0.5, 0.6, 1.0)
# above, 0 is the index in the table, whose r,g,b,a values were initialized to 0.4, 0.5, 0.6 and 1.0

There are many readability issues with that. It didn't convey that table_value has a concept of containing multiple values and that the first argument is an index. It worked because the setter method automatically unpacked values from a tuple and passed them onto the real setter.

Cc: @berkgeveci

Edited by Jaswant Panchumarti (Kitware)

Merge request reports