good day. I want to change the props into operators dialog. something like this:
if I select the option A....then show for example some buttons
but if I select option B then show for example some slider or text entry
some code that Im test is:
class PUPA_OT_FitArmature(bpy.types.Operator):
bl_idname = "view3d.test"
bl_label = "test"
bl_category = "test"
bl_space_type = "VIEW_3D"
bl_region_type = "UI"
bl_options = {'REGISTER', 'UNDO'}
options = [
("Select option","Select option","Select option"),
("Option A", "Option A", "Option A"),
("Option B", "Option B", "Option B")
]
CollectionName: EnumProperty(
items =options,
name="Collections"
)
test_checkbox : bpy.props.BoolProperty(
name="test_checkbox ",
description="test_checkbox",
default= False
)
slider : bpy.props.FloatProperty(
name="slider",
description="allow change some size",
default= 0.1,
min =0.01,
max = 2
)
def testM(self, context):
print("test")
@classmethod
def poll(self, context):
return context
def invoke(self, context, event):
return context.window_manager.invoke_props_dialog(self)
def execute(self, context):
D = bpy.data
C = bpy.context
self.testM(C)
return {'FINISHED'}
but I can not use if else
within the property definition because the register is in process... then something like this don't work
some ideas please?