Let the radial_control modifier control an enum or integer

I just trying to test an idea. To see if the radial control can be used to control an enum or an integer.

This is the default for float numbers, however it does not work with integers, to let it work with with enums is out of the question. I am thinking of a way to bypass this limitation with a few hacks, but I am unsure about the best approach.

UPDATED:

import bpy

def set_value(self, value):
    self.noice = int(value)
    print('value for enum', self.noice)

bpy.types.Scene.noice = bpy.props.FloatProperty(set=set_value)

bpy.ops.wm.radial_control('INVOKE_DEFAULT', data_path_primary='scene.noice')

print(bpy.context.scene.noice)

If you get any ideas for this drop a post.

You can convert int to float, so then your code will work with ints :slight_smile:

f = 1.0 * int

I just updated the first code, it might work nicely for integers.

For enums though I have no visual feedback on the current value, which makes it not useful. I might create a new modal operator for this reason. And is boring…