Allow multiple object types for an extension behavior #3646
Replies: 1 comment
-
Related discussion: #2643 The issue with this is let's say we have 2 objects types that support Scale(), when generating the events code we still need to know which object exactly it is, as even if they have the same expression name they may not have the same internal function name or include files. It would possibly be doable but too fragile and too much work for not much in return. Instead, I think allowing a few select objects types would be cool, but instead of allowing the usage of instructions they have in common, I would make it only affect the objects on which you can attach the behavior, and inside the events access it as a base object that you can cast to the objects you want using the cast to condition i proposed, see discussion linked above. |
Beta Was this translation helpful? Give feedback.
-
Description
Users can select the object type for an extension behavior, but they can only select "Any object" or one specific object type. This means that the extension develop must create and maintain copies of the behavior for every object type that is supported by the extension. The "Any object" selection will only allow functions that work for all objects, so objects that support "Scale()" will not be able to use that function.
Solution suggested
Let extension developers select multiple object types that will work with the behavior.
Beta Was this translation helpful? Give feedback.
All reactions