You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@mnesarco Don't you think it'd good to allow the Discussions tab on Github?
I'd like to ask how to deal with an enumeration property with a dynamic list of potential values.
PropertyOptions allows a one-time dynamic list but
Property.options doesn't take any argument. I think, it should take the FreeCAD object as argument. Other properties may not be initialized but they may not be needed and this can be checked for
there's no way to update the list after the object is created (Property.update treats the self.enum case but not the self.options)
PropertyEnumeration should work with a custom class for enum thanks to duck-typing but a check if isinstance(value, Enum) in Property.update() should be added to allow to update the list of potential values.
I tried both options (with modifications in fpo) but didn't succeed so far. Anyway, how would you do it?
The text was updated successfully, but these errors were encountered:
Repository owner
locked and limited conversation to collaborators
Mar 7, 2025
@mnesarco Don't you think it'd good to allow the
Discussions
tab on Github?I'd like to ask how to deal with an enumeration property with a dynamic list of potential values.
PropertyOptions
allows a one-time dynamic list butProperty.options
doesn't take any argument. I think, it should take the FreeCAD object as argument. Other properties may not be initialized but they may not be needed and this can be checked forProperty.update
treats theself.enum
case but not theself.options
)PropertyEnumeration
should work with a custom class forenum
thanks to duck-typing but a checkif isinstance(value, Enum)
inProperty.update()
should be added to allow to update the list of potential values.I tried both options (with modifications in
fpo
) but didn't succeed so far. Anyway, how would you do it?The text was updated successfully, but these errors were encountered: