Commit 47f2ef60 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Kitware Robot
Browse files

Merge topic '21225-catalyst-script-fixes' into release

38aa6832

 coprocessing.py add checks

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: Cory Quammen's avatarCory Quammen <cory.quammen@kitware.com>
Merge-request: !5536
parents bfe67ff4 38aa6832
...@@ -142,18 +142,24 @@ class CoProcessor(object): ...@@ -142,18 +142,24 @@ class CoProcessor(object):
if self.__RequestedArrays: if self.__RequestedArrays:
for key in self.__RequestedArrays: for key in self.__RequestedArrays:
for v in self.__RequestedArrays[key]: for v in self.__RequestedArrays[key]:
datadescription.GetInputDescriptionByName(key).AddField(v[0], v[1]) inputDescription = datadescription.GetInputDescriptionByName(key)
if inputDescription:
inputDescription.AddField(v[0], v[1])
elif self.__InitialFrequencies: elif self.__InitialFrequencies:
# __ProducersMap will not be filled up until after the first call to # __ProducersMap will not be filled up until after the first call to
# DoCoProcessing so we rely on __InitialFrequencies initially but then # DoCoProcessing so we rely on __InitialFrequencies initially but then
# __ProducersMap after that as __InitialFrequencies will be cleared out. # __ProducersMap after that as __InitialFrequencies will be cleared out.
for key in self.__InitialFrequencies: for key in self.__InitialFrequencies:
datadescription.GetInputDescriptionByName(key).AllFieldsOn() inputDescription = datadescription.GetInputDescriptionByName(key)
datadescription.GetInputDescriptionByName(key).GenerateMeshOn() if inputDescription:
inputDescription.AllFieldsOn()
inputDescription.GenerateMeshOn()
else: else:
for key in self.__ProducersMap: for key in self.__ProducersMap:
datadescription.GetInputDescriptionByName(key).AllFieldsOn() inputDescription = datadescription.GetInputDescriptionByName(key)
datadescription.GetInputDescriptionByName(key).GenerateMeshOn() if inputDescription:
inputDescription.AllFieldsOn()
inputDescription.GenerateMeshOn()
return return
# if we haven't processed the pipeline yet in DoCoProcessing() we # if we haven't processed the pipeline yet in DoCoProcessing() we
...@@ -165,13 +171,17 @@ class CoProcessor(object): ...@@ -165,13 +171,17 @@ class CoProcessor(object):
if self.__RequestedArrays: if self.__RequestedArrays:
for key in self.__RequestedArrays: for key in self.__RequestedArrays:
for v in self.__RequestedArrays[key]: for v in self.__RequestedArrays[key]:
datadescription.GetInputDescriptionByName(key).AddField(v[0], v[1]) inputDescription = datadescription.GetInputDescriptionByName(key)
if inputDescription:
inputDescription.AddField(v[0], v[1])
elif self.__InitialFrequencies: elif self.__InitialFrequencies:
for key in self.__InitialFrequencies: for key in self.__InitialFrequencies:
freqs = self.__InitialFrequencies.get(key, []) freqs = self.__InitialFrequencies.get(key, [])
if self.__EnableLiveVisualization or self.IsInModulo(datadescription, freqs): if self.__EnableLiveVisualization or self.IsInModulo(datadescription, freqs):
datadescription.GetInputDescriptionByName(key).AllFieldsOn() inputDescription = datadescription.GetInputDescriptionByName(key)
datadescription.GetInputDescriptionByName(key).GenerateMeshOn() if inputDescription:
inputDescription.AllFieldsOn()
inputDescription.GenerateMeshOn()
else: else:
# the catalyst pipeline may have been changed by a Live connection # the catalyst pipeline may have been changed by a Live connection
# so we need to regenerate the frequencies # so we need to regenerate the frequencies
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment