Path: Improve backwards compatibility capabilities

This commit is contained in:
Russell Johnson
2020-04-14 22:19:06 -05:00
parent ea960770af
commit 2fc634a22a

View File

@@ -270,6 +270,19 @@ class ObjectWaterline(PathOp.ObjectOp):
else:
obj.setEditorMode('ShowTempObjects', 0) # show
# Repopulate enumerations in case of changes
ENUMS = self.propertyEnumerations()
for n in ENUMS:
restore = False
if hasattr(obj, n):
val = obj.getPropertyByName(n)
restore = True
cmdStr = 'obj.{}={}'.format(n, ENUMS[n])
exec(cmdStr)
if restore:
cmdStr = 'obj.{}={}'.format(n, "'" + val + "'")
exec(cmdStr)
self.setEditorProperties(obj)
def opSetDefaultValues(self, obj, job):