The script is comfortable for it’s easy migration between versions of the software. It’s not as disease, like for example the compiled plugin. In Mobu set of features and functionality as a whole remains for the past 4 versions of the same but there are those little changes and the lack of backward compatibility.
For example, an elementary function to create the window, FBCreateUniqueTool in new versions and CreateUniqueTool in older versions . Or search for an object name FBFindModelByLabelName in new versions and FBFindModelByName old ones. For many situations, I made up as follows : I create a copy of the script , add a suffix to the name with the MoBu version number and I’am submitting changes to the script for this version of the program to run it. This set of scripts complicates further work on improving the script , because the changes you need to make in every script , with nothing overlooked.
And in this case, I would like to have a one working script for all versions and functions that differ somehow I would like to wrap in some structure to support both the old names and new.
Here is a sample how to deal with different function names:
t = None
t = FBCreateUniqueTool("Renamer tool (by Neill3d)")
t = CreateUniqueTool("Renamer tool (by Neill3d)")
print "supporting MoBu 2010"
t.StartSizeX = 292
t.StartSizeY = 514