Cabbage Logo
Back to Cabbage Site

Setting specific values in identifiers with cabbageSet


is it possible to filter out which values you want to set in an identifier? I want to only set x-pos and x-width as I am showing here but would also like to avoid having to set y-pos and y-height to a specific value at the same time.

cabbageSet changed2(k1, k2), "xChan10001", sprintfk("bounds(%d, 0, %d, 0)", k1, k2)

Is this possible?

Not currently. You could write a simple UDO that you could call like this:

cabbageSet changed2(k1, k2), "xChan10001", PosWidth(k1, k2))

That would make things a little cleaner. These properties are used by Cabbage internally. It might not be that much work to expose them. Only x and y are referred to as left and top, but they do exist as independent entities.

1 Like