![]() |
[MAXScript] Get Event by index or key - Printable Version +- tyFlow Forum (https://forum.tyflow.com) +-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html) +--- Forum: Feature Requests (https://forum.tyflow.com/forum-4.html) +--- Thread: [MAXScript] Get Event by index or key (/thread-2445.html) |
[MAXScript] Get Event by index or key - obeyfx27 - 06-11-2021 Hi there, I'm trying to get some attributes from a tyFlow event with maxscript. Before reaching these attributes, I have to get the event itself, and the only way I found is to use the event's name in tyFlow object's attributes. For instance, to get an Export Particles tyCache Filename : Code: myEvent = $tyFlow001.Event_006 This method supposes that I know the event's name, which is not always the case. Is there any way to get an array of all the events and use an index or key to get the wanted event ? It would be useful for iterating over the events without having to know there names. For example with the array's usage, to get the Bend modifier from Box001 object : Code: boxModifiers = $Box001.modifiers The equivalent of this feature in tyFlow would be : Code: myEvents = $tyFlow001.events The feature could help a lot for iterating over events proceduraly. Cheers. RE: [MAXScript] Get Event by index or key - tyFlow - 06-14-2021 Iterating through events can be done with subanim methods: Code: obj = $tyFlow001.baseobject RE: [MAXScript] Get Event by index or key - obeyfx27 - 06-15-2021 Nice to know, thanks ! |