I was about to do an RFE to create a method to reinitialize all the extensions in a project but then I thought it would only take a few minutes to write a function (using the new findChildren method) that would do it anyways.
With the new builds sometimes extensions aren’t being reinitialized so I thought I would share this in case it might come in useful. Just copy and paste the following code into a text DAT place it anywhere in the project and run it. It will find all comps with extensions in the project and reinitialize them.
cheers
Keith
[code]def reInitExt(comp):
hasExt = False
par = comp.par
for n in range(1,5):
nStr = str(n)
ext = 'ext' + nStr
extPar = 'extension' + nStr
ext = getattr(par, extPar)
if ext != '':
hasExt = True
if hasExt == True:
par.reinitextensions.pulse()
return 1
else:
return 0
def reInitAllExt():
allComps = root.findChildren(type = COMP)
i = 0
for compPath in allComps:
comp = op(compPath)
i += reInitExt(comp)
print(str(i) + ' COMPs with extensions reinitialized')
reInitAllExt()[/code]