Skip to content

Commit 23cdf54

Browse files
[cuegui] Fix handling of "Layer on Simulation Frame" dependency in Depend Wizard (#1747)
- Restores functionality for the LOS (Layer on Simulation Frame) dependency type. - Ensures the "Depend on Layer" list is correctly populated with simulation-related layers only. - Adds proper validation for simulation services (e.g., "simulation", "houdini"). - Resolves issue where Next button on LOS (Layer on Simulation Frame) flow did not work as expected. **Link the Issue(s) this Pull Request is related to.** [cuegui] Fix "Layer on Simulation Frame" dependency type in DependWizard #1746
1 parent 4960255 commit 23cdf54

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

cuegui/cuegui/DependWizard.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -611,11 +611,8 @@ def initializePage(self):
611611
self.wizard().onLayerOptions = opencue.api.findJob(self.wizard().onJob[0]).getLayers()
612612

613613
if self.wizard().dependType in (LOS,):
614-
self.wizard().onLayerOptions = [
615-
layer for layer in self.wizard().onLayerOptions
616-
if 'simulation' in layer.data.services or
617-
'simulationhi' in layer.data.services or
618-
'houdini' in layer.data.services]
614+
self.wizard().onLayerOptions = [layer for layer in self.wizard().onLayerOptions
615+
if self.__isSimulationLayer(layer)]
619616

620617
if self.wizard().dependType in (JOL, LOL, FOL, FBF, JOF, LOF, FOF):
621618
self.__onLayerList.setSelectionMode(QtWidgets.QAbstractItemView.MultiSelection)
@@ -630,6 +627,15 @@ def initializePage(self):
630627
str(self.__onLayerList.item(num).text()) in self._getNames(self.wizard().onLayer))
631628

632629
# pylint: disable=missing-function-docstring
630+
631+
def __isSimulationLayer(self, layer):
632+
sim_service_patterns = ['^simulation.*$', '^houdini$']
633+
for service in layer.data.services:
634+
for pattern in sim_service_patterns:
635+
if re.search(pattern, service) is not None:
636+
return True
637+
return False
638+
633639
def validatePage(self):
634640
self.wizard().onLayer = []
635641
for num in range(self.__onLayerList.count()):

0 commit comments

Comments
 (0)