Closed derwin12 closed 3 months ago
Sure but you'll never be able to fix all the timing track / model naming conflicts. Timing tracks belong to the sequence so someone can easily create new models that conflict with timing track names that exist in sequences that aren't currently open. We probably should have a better way to deal with this...i.e. timing tracks and models should be able to have the same names.
oh for sure .. cant get them all but trying to close the one door...
But I'm saying why do we want to prevent timing track and models from having the same name? We really should be able to track them using some type of unique identifier. We are doing way too many things using strings in the program.
SequenceElements/AddElement is called with "model" type that then calls ElementExists. We can pass type to ElementExists and check that types also matches, thus allowing same names on different types, timingtracks, groups and models. 2 other functions will need to have the type added since they call ElementExists, but IMHo I don't think those 2 need to check at all - will be okay if we add the type, but maybe reduce a call.
SequenceElements/AddElement is called with "model" type that then calls ElementExists. We can pass type to ElementExists and check that types also matches, thus allowing same names on different types, timingtracks, groups and models. 2 other functions will need to have the type added since they call ElementExists, but IMHo I don't think those 2 need to check at all - will be okay if we add the type, but maybe reduce a call.
I was wrong... as usual.. at least ViewsModelsPanel need to have the check, else all modes will still show up on the left... small change.. but adding type.. seems to work...
I believe there are a more than a few places where it assumes it is getting a sequence or a timing track when it does the lookup. As Gil mentions .. we search by name. Would take going thru with a fine tooth comb.. Allowing both is a no-going-back change. Anybody using older versions could fall victim to duplicate names. I dont think many people actually hit this scenario .. ie naming a timing track the same as a model, so not sure it is worth the efforts.
Yeah I'm not saying we need to fix it to allow both right now. Just pointing out we can still end up with hidden names and it would be nice to fix it later.
Please tell me what else I should look at... new seq, views changes, adding/renaming TT and adding same name models works... I can try groups.. what else should I try? YES... there may be crap out there not using this proper function, but what you found and what I looked at, they all use the ElementExists function, and that has been changed to account for type.
If a timing track is named the same as a model, it is hidden. Checks were in place to catch a rename but were not done on the initial Add Timing track option. #2785