anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: ynput/OpenPype
Issue: Houdini: hbatch errors on start within OpenPype environment on import hdefereval

**Describe the bug**

The [OpenPype Houdini pipeline imports `hdefereval`](https://github.com/pypeclub/OpenPype/blob/develop/openpype/hosts/houdini/api/pipeline.py#L7) which can't be imported outside a graphical Houdini.

**Error**
```python
Error running pythonrc.py:
Traceback (most recent call last):
  File "path/to/openpype/hosts/houdini/startup/python3.7libs/pythonrc.py", line 2, in <module>
    from openpype.hosts.houdini import api
  File "path/to/openpype/hosts/houdini/api/__init__.py", line 1, in <module>
    from .pipeline import (
  File "path/to/openpype/hosts/houdini/api/pipeline.py", line 7, in <module>
    import hdefereval
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.455/houdini/python3.7libs/hdefereval.py", line 242, in <module>
    raise ImportError("%s is only available in a graphical Houdini" % __name__)
ImportError: hdefereval is only available in a graphical Houdini
```

**To Reproduce**
Steps to reproduce the behavior:
1. Run e.g. `hbatch` from within the OpenPype Houdini environment.

E.g. when running houdini from OpenPype, from Houdini launch hbatch:
```python
import subprocess
subprocess.Popen(["hbatch"])
```

**Expected behavior**

Launch without errors.

Changed files:
openpype/hosts/houdini/api/pipeline.py

diff --git a/openpype/hosts/houdini/api/pipeline.py b/openpype/hosts/houdini/api/pipeline.py
index d079c9ea81..31c82b1cfd 100644
--- a/openpype/hosts/houdini/api/pipeline.py
+++ b/openpype/hosts/houdini/api/pipeline.py
@@ -4,7 +4,6 @@ import logging
 import contextlib
 
 import hou
-import hdefereval
 
 import pyblish.api
 import avalon.api
@@ -305,7 +304,13 @@ def on_new():
         start = hou.playbar.playbackRange()[0]
         hou.setFrame(start)
 
-    hdefereval.executeDeferred(_enforce_start_frame)
+    if hou.isUIAvailable():
+        import hdefereval
+        hdefereval.executeDeferred(_enforce_start_frame)
+    else:
+        # Run without execute deferred when no UI is available because
+        # without UI `hdefereval` is not available to import
+        _enforce_start_frame()
 
 
 def _set_context_settings():
Repository: ynput/OpenPype
Issue: Deadline: extract environment subprocess failure

 ## Problem

In some cases running openpype in GlobalJopPreload plugin under Deadline fails without any message. It seems the culprit is `subprocess.check_output()` call, because when preplaced with `subprocess.call()` all works as expected.

### Solution

Proposed solution would be to change `subprocess.check_output()` to Deadline calls like `FranticX.Processes.ManagedProcess` or `Deadline.Scripting.ProcessUtils.SpawnProcess`

[cuID:2zca9kh]

Changed files:
openpype/modules/deadline/repository/custom/plugins/GlobalJobPreLoad.py

diff --git a/openpype/modules/deadline/repository/custom/plugins/GlobalJobPreLoad.py b/openpype/modules/deadline/repository/custom/plugins/GlobalJobPreLoad.py
index 61b95cf06d..9b35c9502d 100644
--- a/openpype/modules/deadline/repository/custom/plugins/GlobalJobPreLoad.py
+++ b/openpype/modules/deadline/repository/custom/plugins/GlobalJobPreLoad.py
@@ -7,7 +7,12 @@ import json
 import platform
 import uuid
 import re
-from Deadline.Scripting import RepositoryUtils, FileUtils, DirectoryUtils
+from Deadline.Scripting import (
+    RepositoryUtils,
+    FileUtils,
+    DirectoryUtils,
+    ProcessUtils,
+)
 
 
 def get_openpype_version_from_path(path, build=True):
@@ -162,9 +167,8 @@ def inject_openpype_environment(deadlinePlugin):
         print(">>> Temporary path: {}".format(export_url))
 
         args = [
-            exe,
             "--headless",
-            'extractenvironments',
+            "extractenvironments",
             export_url
         ]
 
@@ -188,15 +192,18 @@ def inject_openpype_environment(deadlinePlugin):
         if not os.environ.get("OPENPYPE_MONGO"):
             print(">>> Missing OPENPYPE_MONGO env var, process won't work")
 
-        env = os.environ
-        env["OPENPYPE_HEADLESS_MODE"] = "1"
-        env["AVALON_TIMEOUT"] = "5000"
+        os.environ["AVALON_TIMEOUT"] = "5000"
 
-        print(">>> Executing: {}".format(" ".join(args)))
-        std_output = subprocess.check_output(args,
-                                             cwd=os.path.dirname(exe),
-                                             env=env)
-        print(">>> Process result {}".format(std_output))
+        args_str = subprocess.list2cmdline(args)
+        print(">>> Executing: {} {}".format(exe, args_str))
+        process = ProcessUtils.SpawnProcess(
+            exe, args_str, os.path.dirname(exe)
+        )
+        ProcessUtils.WaitForExit(process, -1)
+        if process.ExitCode != 0:
+            raise RuntimeError(
+                "Failed to run OpenPype process to extract environments."
+            )
 
         print(">>> Loading file ...")
         with open(export_url) as fp:
Repository: ynput/OpenPype
Issue: Ftrack login server can't work without stderr

## Description
It seems like `html.parse` is missing on MacOs build or maybe other python library required for Ftrack auto user credentials.

Changed files:
openpype/modules/ftrack/tray/login_tools.py

diff --git a/openpype/modules/ftrack/tray/login_tools.py b/openpype/modules/ftrack/tray/login_tools.py
index c6cf5b5f7b..95a072c352 100644
--- a/openpype/modules/ftrack/tray/login_tools.py
+++ b/openpype/modules/ftrack/tray/login_tools.py
@@ -16,6 +16,18 @@ class LoginServerHandler(BaseHTTPRequestHandler):
         self.login_callback = login_callback
         BaseHTTPRequestHandler.__init__(self, *args, **kw)
 
+    def log_message(self, format_str, *args):
+        """Override method of BaseHTTPRequestHandler.
+
+        Goal is to use `print` instead of `sys.stderr.write`
+        """
+        # Change
+        print("%s - - [%s] %s\\n" % (
+            self.client_address[0],
+            self.log_date_time_string(),
+            format_str % args
+        ))
+
     def do_GET(self):
         '''Override to handle requests ourselves.'''
         parsed_path = parse.urlparse(self.path)
Repository: ynput/OpenPype
Issue: Bad zip can break OpenPype start

## Description
Bad zip (e.g. with wrong semantically version) OpenPype will crash on start without running other zip and user would have to remove the zip from appdata to fix it.

### There 2 issues
1. OpenPype should not crash but use different possible zip
2. zip should be validated on creation

Changed files:
igniter/bootstrap_repos.py

diff --git a/igniter/bootstrap_repos.py b/igniter/bootstrap_repos.py
index 7c4f8b4b69..6eaea27116 100644
--- a/igniter/bootstrap_repos.py
+++ b/igniter/bootstrap_repos.py
@@ -972,8 +972,12 @@ class BootstrapRepos:
                         "openpype/version.py") as version_file:
                     zip_version = {}
                     exec(version_file.read(), zip_version)
-                    version_check = OpenPypeVersion(
-                        version=zip_version["__version__"])
+                    try:
+                        version_check = OpenPypeVersion(
+                            version=zip_version["__version__"])
+                    except ValueError as e:
+                        self._print(str(e), True)
+                        return False
 
                     version_main = version_check.get_main_version()  # noqa: E501
                     detected_main = detected_version.get_main_version()  # noqa: E501
Repository: ynput/OpenPype
Issue: nuke: write render node skipped with crop

# Description
After we had included Crop node in Render write node group The PreCollect Write Node is now taking Crop instead of Write node and adding it into context as write node. This is causing two known problems:
1. using it in label of instance
2. blocking rendering on farm as missing colorspace knob on Crop node. 

Changed files:
openpype/hosts/nuke/api/lib.py

diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py
index d7f3fdc6ba..ee03e04360 100644
--- a/openpype/hosts/nuke/api/lib.py
+++ b/openpype/hosts/nuke/api/lib.py
@@ -391,13 +391,14 @@ def create_write_node(name, data, input=None, prenodes=None,
         if prenodes:
             for node in prenodes:
                 # get attributes
-                name = node["name"]
+                pre_node_name = node["name"]
                 klass = node["class"]
                 knobs = node["knobs"]
                 dependent = node["dependent"]
 
                 # create node
-                now_node = nuke.createNode(klass, "name {}".format(name))
+                now_node = nuke.createNode(
+                    klass, "name {}".format(pre_node_name))
                 now_node.hideControlPanel()
 
                 # add data to knob
@@ -476,27 +477,27 @@ def create_write_node(name, data, input=None, prenodes=None,
 
     linked_knob_names.append("Render")
 
-    for name in linked_knob_names:
-        if "_grp-start_" in name:
+    for _k_name in linked_knob_names:
+        if "_grp-start_" in _k_name:
             knob = nuke.Tab_Knob(
                 "rnd_attr", "Rendering attributes", nuke.TABBEGINCLOSEDGROUP)
             GN.addKnob(knob)
-        elif "_grp-end_" in name:
+        elif "_grp-end_" in _k_name:
             knob = nuke.Tab_Knob(
                 "rnd_attr_end", "Rendering attributes", nuke.TABENDGROUP)
             GN.addKnob(knob)
         else:
-            if "___" in name:
+            if "___" in _k_name:
                 # add devider
                 GN.addKnob(nuke.Text_Knob(""))
             else:
-                # add linked knob by name
+                # add linked knob by _k_name
                 link = nuke.Link_Knob("")
-                link.makeLink(write_node.name(), name)
-                link.setName(name)
+                link.makeLink(write_node.name(), _k_name)
+                link.setName(_k_name)
 
                 # make render
-                if "Render" in name:
+                if "Render" in _k_name:
                     link.setLabel("Render Local")
                 link.setFlag(0x1000)
                 GN.addKnob(link)
Repository: ynput/OpenPype
Issue: Bug: Pipeline colorspace "compatible_python" function does not correctly detect python version

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior:

The [`compatible_python` function](https://github.com/ynput/OpenPype/blob/82f9da2c8ee4cc1a8062737b8ce3bf99afde73f3/openpype/pipeline/colorspace.py#L240-L245) will currently always return false due to it comparing against `sys.version` which is a string like:
```python
3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
```

As such a comparison `sys.version[1] >= 9` does not check whether the minor version is higher or equal to nine.

### Expected Behavior:

Function should likely be:

```python
def compatible_python():
    """Only 3.9 or higher can directly use PyOpenColorIO in ocio_wrapper"""
    compatible = False
    if sys.version_info.major == 3 and sys.version_info.minor >= 9:
        compatible = True
    return compatible
```

### Version

3.15.12-nightly.1

### What platform you are running OpenPype on?

Windows

### Steps To Reproduce:

Run Tray Publisher from code on Windows - you'll briefly see a command prompt show up indicating that it's using the Subprocess route for getting OCIO configs + it's relatively slow.

### Are there any labels you wish to add?

- [X] I have added the relevant labels to the bug report.

### Relevant log output:

_No response_

### Additional context:

So this PR https://github.com/ynput/OpenPype/pull/4901 in Tray Publisher for me introduces quite a slow down on reset with color management enabled in 3.15.11 - Running from code I can visually see a command prompt pop up so it looks like it's still forcing a subprocess (command prompt?) to open to retrieve the colorspaces. My first thought was: shouldn't tray publisher be able to just get it through the OCIO Python API instead? @jakubjezek001 

Running this in the console of OP tray:
```python
import sys
print(sys.version)
import PyOpenColorIO
print(PyOpenColorIO)
```

Gives me:
```
3.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
<module 'PyOpenColorIO' from 'E:\\\\openpype\\\\OpenPype\\\\.venv\\\\lib\\\\site-packages\\\\PyOpenColorIO.pyd'>
```

So I'd expect it to just go through that in standalone publisher.

Then I noticed this 



[cuID:[OP-6281](https://app.clickup.com/t/861n0787v)]

Changed files:
openpype/pipeline/colorspace.py

diff --git a/openpype/pipeline/colorspace.py b/openpype/pipeline/colorspace.py
index 269825f85f..d5f2624155 100644
--- a/openpype/pipeline/colorspace.py
+++ b/openpype/pipeline/colorspace.py
@@ -240,7 +240,7 @@ def get_data_subprocess(config_path, data_type):
 def compatible_python():
     """Only 3.9 or higher can directly use PyOpenColorIO in ocio_wrapper"""
     compatible = False
-    if sys.version[0] == 3 and sys.version[1] >= 9:
+    if sys.version_info.major == 3 and sys.version_info.minor >= 9:
         compatible = True
     return compatible
Repository: ynput/OpenPype
Issue: Bug: 3dsmax : Publisher Instances dont hold its Enabled/Disabled states when Publisher reopened again

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Current Behavior:

When user turn off some instance(s) it doesnt keep its state when Publisher reopened. 



https://github.com/ynput/OpenPype/assets/112623825/31cdda5e-052c-4494-8537-c2a0dd2ca19b


Also doesnt work when workfile saved and reopened too. 

### Expected Behavior:

Publishers instances should keep their states (ON/OFF) if user changed it when reopened again. also valid if workfile saved and reopened later on.





### Version

3.15.11-nightly.4

### What platform you are running OpenPype on?

Windows

### Steps To Reproduce:

1. Create any ```Instance``` in Publisher Create tab
2. Change the state of some Instances from On to Off
3. Close Publisher
4. Open Publisher

### Are there any labels you wish to add?

- [X] I have added the relevant labels to the bug report.

### Relevant log output:

_No response_

### Additional context:

_No response_


[cuID:[OP-6245](https://app.clickup.com/t/863h2jkpp)]

Changed files:
openpype/hosts/max/api/lib.py

diff --git a/openpype/hosts/max/api/lib.py b/openpype/hosts/max/api/lib.py
index 1d53802ecf..879f0abfa4 100644
--- a/openpype/hosts/max/api/lib.py
+++ b/openpype/hosts/max/api/lib.py
@@ -78,6 +78,14 @@ def read(container) -> dict:
                 value.startswith(JSON_PREFIX):
             with contextlib.suppress(json.JSONDecodeError):
                 value = json.loads(value[len(JSON_PREFIX):])
+
+        # default value behavior
+        # convert maxscript boolean values
+        if value == "true":
+            value = True
+        elif value == "false":
+            value = False
+
         data[key.strip()] = value
 
     data["instance_node"] = container.Name
Repository: ynput/OpenPype
Issue: Nuke: callback at start not setting colorspace

Seems to work quite well for me. The only thing I'm not sure about is the callback that should be setting on the launch of nuke, that is not working for me.

@jezscha shall we deal with the startup setting in a different PR?

https://github.com/pypeclub/OpenPype/pull/1386#pullrequestreview-644504524

Changed files:
openpype/hosts/nuke/startup/menu.py, openpype/hosts/nuke/api/lib.py

diff --git a/openpype/hosts/nuke/api/lib.py b/openpype/hosts/nuke/api/lib.py
index e6dde813a7..63cac0fd8b 100644
--- a/openpype/hosts/nuke/api/lib.py
+++ b/openpype/hosts/nuke/api/lib.py
@@ -1059,7 +1059,7 @@ class WorkfileSettings(object):
         # replace reset resolution from avalon core to pype's
         self.reset_frame_range_handles()
         # add colorspace menu item
-        # self.set_colorspace()
+        self.set_colorspace()
 
     def set_favorites(self):
         work_dir = os.getenv("AVALON_WORKDIR")
diff --git a/openpype/hosts/nuke/startup/menu.py b/openpype/hosts/nuke/startup/menu.py
index 9eb656afa9..c452acb709 100644
--- a/openpype/hosts/nuke/startup/menu.py
+++ b/openpype/hosts/nuke/startup/menu.py
@@ -1,6 +1,7 @@
 from openpype.hosts.nuke.api.lib import (
     on_script_load,
-    check_inventory_versions
+    check_inventory_versions,
+    WorkfileSettings
 )
 
 import nuke
@@ -9,8 +10,14 @@ from openpype.api import Logger
 log = Logger().get_logger(__name__)
 
 
-nuke.addOnScriptSave(on_script_load)
+# fix ffmpeg settings on script
+nuke.addOnScriptLoad(on_script_load)
+
+# set checker for last versions on loaded containers
 nuke.addOnScriptLoad(check_inventory_versions)
 nuke.addOnScriptSave(check_inventory_versions)
 
+# # set apply all workfile settings on script load and save
+nuke.addOnScriptLoad(WorkfileSettings().set_context_settings)
+
 log.info('Automatic syncing of write file knob to script version')
Repository: ynput/OpenPype
Issue: Workfiles tool for Nuke

Work files window doesn't show the User notes in Nuke. The window is the same as in Pype 2.

Changed files:
pype/hosts/nuke/api/menu.py, pype/hosts/nuke/api/__init__.py

diff --git a/pype/hosts/nuke/api/__init__.py b/pype/hosts/nuke/api/__init__.py
index 26a8248f01..6bf1ce888a 100644
--- a/pype/hosts/nuke/api/__init__.py
+++ b/pype/hosts/nuke/api/__init__.py
@@ -3,7 +3,7 @@ import sys
 import nuke
 
 from avalon import api as avalon
-from avalon.tools import workfiles
+from pype.tools import workfiles
 from pyblish import api as pyblish
 from pype.api import Logger
 import pype.hosts.nuke
diff --git a/pype/hosts/nuke/api/menu.py b/pype/hosts/nuke/api/menu.py
index 3f97cc228a..d638034809 100644
--- a/pype/hosts/nuke/api/menu.py
+++ b/pype/hosts/nuke/api/menu.py
@@ -3,6 +3,7 @@ from avalon.api import Session
 
 from .lib import WorkfileSettings
 from pype.api import Logger, BuildWorkfile, get_current_project_settings
+from pype.tools import workfiles
 
 log = Logger().get_logger(__name__)
 
@@ -10,6 +11,22 @@ log = Logger().get_logger(__name__)
 def install():
     menubar = nuke.menu("Nuke")
     menu = menubar.findItem(Session["AVALON_LABEL"])
+
+    # replace reset resolution from avalon core to pype's
+    name = "Work Files..."
+    rm_item = [
+        (i, item) for i, item in enumerate(menu.items()) if name in item.name()
+    ][0]
+
+    log.debug("Changing Item: {}".format(rm_item))
+
+    menu.removeItem(rm_item[1].name())
+    menu.addCommand(
+        name,
+        workfiles.show,
+        index=(rm_item[0])
+    )
+
     # replace reset resolution from avalon core to pype's
     name = "Reset Resolution"
     new_name = "Set Resolution"
Repository: ynput/OpenPype
Issue: Maya: renderman displays needs to be filtered

 ## Bug

currently we are trying to process all renderman displays and expects them to create render output. But it not true for all of them, for example using IPR in Maya will create "hidden" display used by "it" (rendermans image tool).

We can explicitely say what display types we handle (d_openexr, ...) probably.

[cuID:2ct6y8d]

Changed files:
openpype/hosts/maya/api/lib_renderproducts.py

diff --git a/openpype/hosts/maya/api/lib_renderproducts.py b/openpype/hosts/maya/api/lib_renderproducts.py
index ff04fa7aa2..2d3bda5245 100644
--- a/openpype/hosts/maya/api/lib_renderproducts.py
+++ b/openpype/hosts/maya/api/lib_renderproducts.py
@@ -1093,6 +1093,11 @@ class RenderProductsRenderman(ARenderProducts):
             if not enabled:
                 continue
 
+            # Skip display types not producing any file output.
+            # Is there a better way to do it?
+            if not display_types.get(display["driverNode"]["type"]):
+                continue
+
             aov_name = name
             if aov_name == "rmanDefaultDisplay":
                 aov_name = "beauty"
Repository: ynput/OpenPype
Issue: Maya: Attach Render to Look

 ## Problem

Attaching render to look instance doesn't work.

[cuID:OP-2673]

Changed files:
openpype/modules/deadline/plugins/publish/submit_publish_job.py

diff --git a/openpype/modules/deadline/plugins/publish/submit_publish_job.py b/openpype/modules/deadline/plugins/publish/submit_publish_job.py
index 306237c78c..782f85c9d2 100644
--- a/openpype/modules/deadline/plugins/publish/submit_publish_job.py
+++ b/openpype/modules/deadline/plugins/publish/submit_publish_job.py
@@ -883,8 +883,10 @@ class ProcessSubmittedJobOnFarm(pyblish.api.InstancePlugin):
                     new_i = copy(i)
                     new_i["version"] = at.get("version")
                     new_i["subset"] = at.get("subset")
+                    new_i["family"] = at.get("family")
                     new_i["append"] = True
-                    new_i["families"].append(at.get("family"))
+                    # don't set subsetGroup if we are attaching
+                    new_i.pop("subsetGroup")
                     new_instances.append(new_i)
                     self.log.info("  - {} / v{}".format(
                         at.get("subset"), at.get("version")))
Repository: ynput/OpenPype
Issue: Maya Render Settings validator prefix confusion

 ## Issue

There is a little issue with Render Settings validator that if `Merge AOV` is selected,  This validator will complain about superfluous `<RenderPass>` token. But If that token is correctly removed, Render Settings validator will issue warning about image prefix being different than the default one.

[cuID:296qnmz]

Changed files:
openpype/hosts/maya/plugins/publish/validate_rendersettings.py

diff --git a/openpype/hosts/maya/plugins/publish/validate_rendersettings.py b/openpype/hosts/maya/plugins/publish/validate_rendersettings.py
index ba6c1397ab..1dab3274a0 100644
--- a/openpype/hosts/maya/plugins/publish/validate_rendersettings.py
+++ b/openpype/hosts/maya/plugins/publish/validate_rendersettings.py
@@ -94,6 +94,7 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
     def get_invalid(cls, instance):
 
         invalid = False
+        multipart = False
 
         renderer = instance.data['renderer']
         layer = instance.data['setMembers']
@@ -113,6 +114,7 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
             "{aov_separator}", instance.data.get("aovSeparator", "_"))
 
         required_prefix = "maya/<scene>"
+        default_prefix = cls.ImagePrefixTokens[renderer]
 
         if not anim_override:
             invalid = True
@@ -213,14 +215,16 @@ class ValidateRenderSettings(pyblish.api.InstancePlugin):
                     cls.log.error("Wrong image prefix [ {} ] - "
                                   "You can't use '<renderpass>' token "
                                   "with merge AOVs turned on".format(prefix))
+                default_prefix = re.sub(
+                    cls.R_AOV_TOKEN, "", default_prefix)
+                # remove aov token from prefix to pass validation
+                default_prefix = default_prefix.split("{aov_separator}")[0]
             elif not re.search(cls.R_AOV_TOKEN, prefix):
                 invalid = True
                 cls.log.error("Wrong image prefix [ {} ] - "
                               "doesn't have: '<renderpass>' or "
                               "token".format(prefix))
 
-        # prefix check
-        default_prefix = cls.ImagePrefixTokens[renderer]
         default_prefix = default_prefix.replace(
             "{aov_separator}", instance.data.get("aovSeparator", "_"))
         if prefix.lower() != default_prefix.lower():
Repository: ynput/OpenPype
Issue: Conversion of sequence by OIIO tools for ffmpeg

**Describe the bug**
Conversion of sequence by OIIO tools for ffmpeg doesn't work, it is overwritting the same file specified in oiio arguments and then fails on integration because other files in sequence doesn't exits/

**To Reproduce**
Steps to reproduce the behavior:

Render and publish sequence type that needs OIIO conversion (like cryptomatte). Integration will fail because of missing files as only one will be available.

```
oiiotool.exe --compression zip -i:ch=CryptoMesh.R,CryptoMesh.G,CryptoMesh.B,CryptoMesh.A /foo/bar_v001/Main/Main_Cryptomatte.1001.exr --ch R=CryptoMesh.R,G=CryptoMesh.G,B=CryptoMesh.B,A=CryptoMesh.A --frames 1001-1002 --sansattrib --eraseattrib /tmp/cryptomatte/manifest -o Main_Cryptomatte_node.1001.exr
```

should be something like

```
oiiotool.exe --compression zip -i:ch=CryptoMesh.R,CryptoMesh.G,CryptoMesh.B,CryptoMesh.A /foo/bar_v001/Main/Main_Cryptomatte.1001.exr --ch R=CryptoMesh.R,G=CryptoMesh.G,B=CryptoMesh.B,A=CryptoMesh.A --frames 1001-1002 --sansattrib --eraseattrib /tmp/cryptomatte/manifest -o Main_Cryptomatte_node.####.exr
```


Changed files:
openpype/lib/transcoding.py

diff --git a/openpype/lib/transcoding.py b/openpype/lib/transcoding.py
index 6bab6a8160..8e79aba0ae 100644
--- a/openpype/lib/transcoding.py
+++ b/openpype/lib/transcoding.py
@@ -478,8 +478,14 @@ def convert_for_ffmpeg(
             oiio_cmd.extend(["--eraseattrib", attr_name])
 
     # Add last argument - path to output
-    base_file_name = os.path.basename(first_input_path)
-    output_path = os.path.join(output_dir, base_file_name)
+    if is_sequence:
+        ext = os.path.splitext(first_input_path)[1]
+        base_filename = "tmp.%{:0>2}d{}".format(
+            len(str(input_frame_end)), ext
+        )
+    else:
+        base_filename = os.path.basename(first_input_path)
+    output_path = os.path.join(output_dir, base_filename)
     oiio_cmd.extend([
         "-o", output_path
     ])
Repository: ynput/OpenPype
Issue: Settings UI: Version input widget is broken on some linux dist

 ## Deccribtion
Some linux distributions will cause that hint view showing available versions will cause infinite loop of changing of focus and it is not possible to modify the value in it. Which distribution cause that is not clear but it happened on centos 7.

## To Reproduce
Prereq:
- be on centos 7 machine
- have some versions in version repository
1. Open Settings UI
2. Go to version input and click in the input

## System
 - OS: linux (Centos 7)

## Suggested solution
Try fix it so the focus changes don't happen. Or change how versions are shown maybe add a button which will show available versions with filter input so it is not visible all the time.

[cuID:]

Changed files:
openpype/tools/settings/settings/widgets.py

diff --git a/openpype/tools/settings/settings/widgets.py b/openpype/tools/settings/settings/widgets.py
index 577c2630ab..6db001f2f6 100644
--- a/openpype/tools/settings/settings/widgets.py
+++ b/openpype/tools/settings/settings/widgets.py
@@ -97,6 +97,9 @@ class CompleterView(QtWidgets.QListView):
             QtCore.Qt.FramelessWindowHint
             | QtCore.Qt.Tool
         )
+
+        # Open the widget unactivated
+        self.setAttribute(QtCore.Qt.WA_ShowWithoutActivating)
         delegate = QtWidgets.QStyledItemDelegate()
         self.setItemDelegate(delegate)
 
@@ -225,10 +228,18 @@ class SettingsLineEdit(PlaceholderLineEdit):
     def __init__(self, *args, **kwargs):
         super(SettingsLineEdit, self).__init__(*args, **kwargs)
 
-        self._completer = None
+        # Timer which will get started on focus in and stopped on focus out
+        # - callback checks if line edit or completer have focus
+        #   and hide completer if not
+        focus_timer = QtCore.QTimer()
+        focus_timer.setInterval(50)
 
+        focus_timer.timeout.connect(self._on_focus_timer)
         self.textChanged.connect(self._on_text_change)
 
+        self._completer = None
+        self._focus_timer = focus_timer
+
     def _on_text_change(self, text):
         if self._completer is not None:
             self._completer.set_text_filter(text)
@@ -240,19 +251,19 @@ class SettingsLineEdit(PlaceholderLineEdit):
         new_point = self.mapToGlobal(point)
         self._completer.move(new_point)
 
+    def _on_focus_timer(self):
+        if not self.hasFocus() and not self._completer.hasFocus():
+            self._completer.hide()
+            self._focus_timer.stop()
+
     def focusInEvent(self, event):
         super(SettingsLineEdit, self).focusInEvent(event)
         self.focused_in.emit()
 
-        if self._completer is None:
-            return
-        self._completer.show()
-        self._update_completer()
-
-    def focusOutEvent(self, event):
-        super(SettingsLineEdit, self).focusOutEvent(event)
         if self._completer is not None:
-            self._completer.hide()
+            self._focus_timer.start()
+            self._completer.show()
+            self._update_completer()
 
     def paintEvent(self, event):
         super(SettingsLineEdit, self).paintEvent(event)
Repository: ynput/OpenPype
Issue: Maya: pointcache loader doesn't support "load as GPU cache"

 ## Bug

Loading **pointcache** family should have similar options a loading alembics from **model** family. Currently it is missing `load as GPU cache` option.

[cuID:2f3jtkb]

Changed files:
openpype/hosts/maya/plugins/load/load_gpucache.py

diff --git a/openpype/hosts/maya/plugins/load/load_gpucache.py b/openpype/hosts/maya/plugins/load/load_gpucache.py
index 6d5e945508..179819f904 100644
--- a/openpype/hosts/maya/plugins/load/load_gpucache.py
+++ b/openpype/hosts/maya/plugins/load/load_gpucache.py
@@ -10,7 +10,7 @@ from openpype.api import get_project_settings
 class GpuCacheLoader(load.LoaderPlugin):
     """Load Alembic as gpuCache"""
 
-    families = ["model"]
+    families = ["model", "animation", "pointcache"]
     representations = ["abc"]
 
     label = "Import Gpu Cache"
Repository: ynput/OpenPype
Issue: Blender: import error from openpype_interfaces

 **Describe the bug**
```
Warning! 'D:\\REPO\\OpenPype\\openpype\\hosts\\blender\\blender_addon\\startup\\init.py' has no register function, this is now a requirement for registerable scripts
Error: Python: Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "D:\\REPO_SW\\DCC\\BLENDER\\3.2.1\\WINDOWS\\3.2\\scripts\\modules\\addon_utils.py", line 480, in disable_all
    addon_modules = [
  File "D:\\REPO_SW\\DCC\\BLENDER\\3.2.1\\WINDOWS\\3.2\\scripts\\modules\\addon_utils.py", line 482, in <listcomp>
    if getattr(item[1], "__addon_enabled__", False)
  File "D:\\REPO\\OpenPype\\openpype\\modules\\base.py", line 124, in __getattr__
    raise ImportError((
ImportError: cannot import name '__addon_enabled__' from 'openpype_interfaces'
Location: D:\\REPO_SW\\DCC\\BLENDER\\3.2.1\\WINDOWS\\3.2\\scripts\\modules\\bpy\\ops.py:115
```

**Desktop:**
 - OS:  windows
 - Host: Blender 3.2.1



[cuID:2mf935z]

Changed files:
openpype/modules/base.py

diff --git a/openpype/modules/base.py b/openpype/modules/base.py
index b9ccec13cc..1bd343fd07 100644
--- a/openpype/modules/base.py
+++ b/openpype/modules/base.py
@@ -49,6 +49,7 @@ class _ModuleClass(object):
     Object of this class can be stored to `sys.modules` and used for storing
     dynamically imported modules.
     """
+
     def __init__(self, name):
         # Call setattr on super class
         super(_ModuleClass, self).__setattr__("name", name)
@@ -116,12 +117,13 @@ class _InterfacesClass(_ModuleClass):
     - this is because interfaces must be available even if are missing
         implementation
     """
+
     def __getattr__(self, attr_name):
         if attr_name not in self.__attributes__:
             if attr_name in ("__path__", "__file__"):
                 return None
 
-            raise ImportError((
+            raise AttributeError((
                 "cannot import name '{}' from 'openpype_interfaces'"
             ).format(attr_name))
Repository: ynput/OpenPype
Issue: Blender 3.1+ don't set frame range and fps on open

 ## Description

With Blender 3.1+ with `register_event_callback` : `on_new` and `on_open` the function `set_start_end_frames` raise an error and donc set the frame range properly.

## To Reproduce

- Just open a shot task with setted `frameStar`,  `frameEnd` and `fps`

## Expected behavior

Blender 3.1+ expected FPS as integer : 
```python
# fps is an int, fps_base is a float
fps = bpy.context.scene.render.fps /  bpy.context.scene.render.fps_base
# so to set fps from data
bpy.context.scene.render.fps = round(fps)
bpy.context.scene.render.fps_base = round(fps) / fps
```

## Traceback
```
Traceback (most recent call last):
  File "/Volumes/D11-TRAVAIL/DEV/OpenPype/openpype/lib/events.py", line 156, in process_event
    callback()
  File "/Volumes/D11-TRAVAIL/DEV/OpenPype/openpype/hosts/blender/api/pipeline.py", line 125, in on_new
    set_start_end_frames()
  File "/Volumes/D11-TRAVAIL/DEV/OpenPype/openpype/hosts/blender/api/pipeline.py", line 119, in set_start_end_frames
    scene.render.fps = fps
TypeError: bpy_struct: item.attr = val: RenderSettings.fps expected an int type, not float`
```

## Desktop:
 - OS: MacOS
 - Host: Blender3.1.2


[cuID:OP-3490]

Changed files:
openpype/hosts/blender/api/pipeline.py

diff --git a/openpype/hosts/blender/api/pipeline.py b/openpype/hosts/blender/api/pipeline.py
index 93d81145bc..ea405b028e 100644
--- a/openpype/hosts/blender/api/pipeline.py
+++ b/openpype/hosts/blender/api/pipeline.py
@@ -93,7 +93,7 @@ def set_start_end_frames():
     # Default scene settings
     frameStart = scene.frame_start
     frameEnd = scene.frame_end
-    fps = scene.render.fps
+    fps = scene.render.fps / scene.render.fps_base
     resolution_x = scene.render.resolution_x
     resolution_y = scene.render.resolution_y
 
@@ -116,7 +116,8 @@ def set_start_end_frames():
 
     scene.frame_start = frameStart
     scene.frame_end = frameEnd
-    scene.render.fps = fps
+    scene.render.fps = round(fps)
+    scene.render.fps_base = round(fps) / fps
     scene.render.resolution_x = resolution_x
     scene.render.resolution_y = resolution_y
Repository: ynput/OpenPype
Issue: Extract otio file plugin must have specific filters

 ## Describtion
Bug is related to hot fix PR https://github.com/pypeclub/OpenPype/pull/3856 . At this moment is plugin `openpype/plugins/publish/extract_otio_file.py` processed on all instances with `workfile` family in `hiero`, `resolve` and `traypublisher`, which cause issues in traypublisher where workfile is related to otio only for editorial publishing.

## Suggested solution
The family filter should be changed from `workfile` to something very specific like `otio.timeline`. All instances that should be processed by this plugin should have the family in `instace.data["families"]`.

[cuID:OP-4053]

Changed files:
openpype/plugins/publish/extract_otio_file.py

diff --git a/openpype/plugins/publish/extract_otio_file.py b/openpype/plugins/publish/extract_otio_file.py
index c692205d81..1a6a82117d 100644
--- a/openpype/plugins/publish/extract_otio_file.py
+++ b/openpype/plugins/publish/extract_otio_file.py
@@ -16,6 +16,8 @@ class ExtractOTIOFile(publish.Extractor):
     hosts = ["resolve", "hiero", "traypublisher"]
 
     def process(self, instance):
+        if not instance.context.data.get("otioTimeline"):
+            return
         # create representation data
         if "representations" not in instance.data:
             instance.data["representations"] = []
Repository: ynput/OpenPype
Issue: Nuke: menu workfile position and publish attr fix

- workfile position was changed for a reason, so lets put this back
- publish callback on instance publish change is not working

Changed files:
openpype/hosts/nuke/api/__init__.py, openpype/hosts/nuke/api/menu.py

diff --git a/openpype/hosts/nuke/api/__init__.py b/openpype/hosts/nuke/api/__init__.py
index c80507e7ea..bd7a95f916 100644
--- a/openpype/hosts/nuke/api/__init__.py
+++ b/openpype/hosts/nuke/api/__init__.py
@@ -106,7 +106,7 @@ def on_pyblish_instance_toggled(instance, old_value, new_value):
     log.info("instance toggle: {}, old_value: {}, new_value:{} ".format(
         instance, old_value, new_value))
 
-    from avalon.api.nuke import (
+    from avalon.nuke import (
         viewer_update_and_undo_stop,
         add_publish_knob
     )
diff --git a/openpype/hosts/nuke/api/menu.py b/openpype/hosts/nuke/api/menu.py
index 2317066528..021ea04159 100644
--- a/openpype/hosts/nuke/api/menu.py
+++ b/openpype/hosts/nuke/api/menu.py
@@ -26,9 +26,9 @@ def install():
     menu.addCommand(
         name,
         workfiles.show,
-        index=(rm_item[0])
+        index=2
     )
-
+    menu.addSeparator(index=3)
     # replace reset resolution from avalon core to pype's
     name = "Reset Resolution"
     new_name = "Set Resolution"
@@ -63,28 +63,28 @@ def install():
     # add colorspace menu item
     name = "Set Colorspace"
     menu.addCommand(
-        name, lambda: WorkfileSettings().set_colorspace(),
-        index=(rm_item[0] + 2)
+        name, lambda: WorkfileSettings().set_colorspace()
     )
     log.debug("Adding menu item: {}".format(name))
 
-    # add workfile builder menu item
-    name = "Build Workfile"
+    # add item that applies all setting above
+    name = "Apply All Settings"
     menu.addCommand(
-        name, lambda: BuildWorkfile().process(),
-        index=(rm_item[0] + 7)
+        name,
+        lambda: WorkfileSettings().set_context_settings()
     )
     log.debug("Adding menu item: {}".format(name))
 
-    # add item that applies all setting above
-    name = "Apply All Settings"
+    menu.addSeparator()
+
+    # add workfile builder menu item
+    name = "Build Workfile"
     menu.addCommand(
-        name,
-        lambda: WorkfileSettings().set_context_settings(),
-        index=(rm_item[0] + 3)
+        name, lambda: BuildWorkfile().process()
     )
     log.debug("Adding menu item: {}".format(name))
 
+
     # adding shortcuts
     add_shortcuts_from_presets()
Repository: ynput/OpenPype
Issue: OpenPype Mongo URL definition

## Description
Currently is OpenPype Mongo URL defined by keyring value but keyring may not be available on workstation. Instead of keyring should use environment variable if possible.

Changed files:
igniter/install_dialog.py, start.py

diff --git a/igniter/install_dialog.py b/igniter/install_dialog.py
index e6439b5129..411fac1e96 100644
--- a/igniter/install_dialog.py
+++ b/igniter/install_dialog.py
@@ -386,7 +386,11 @@ class InstallDialog(QtWidgets.QDialog):
         self._enable_buttons()
 
     def _run_openpype_from_code(self):
-        self._secure_registry.set_item("openPypeMongo", self.mongo_url)
+        os.environ["OPENPYPE_MONGO"] = self.mongo_url
+        try:
+            self._secure_registry.set_item("openPypeMongo", self.mongo_url)
+        except ValueError:
+            print("Couldn't save Mongo URL to keyring")
 
         self.done(2)
 
diff --git a/start.py b/start.py
index 0295d0ca62..c24e20f63f 100644
--- a/start.py
+++ b/start.py
@@ -334,11 +334,13 @@ def _determine_mongodb() -> str:
         if result == 0:
             raise RuntimeError("MongoDB URL was not defined")
 
-        try:
-            openpype_mongo = bootstrap.secure_registry.get_item(
-                "openPypeMongo")
-        except ValueError:
-            raise RuntimeError("Missing MongoDB url")
+        openpype_mongo = os.getenv("OPENPYPE_MONGO")
+        if not openpype_mongo:
+            try:
+                openpype_mongo = bootstrap.secure_registry.get_item(
+                    "openPypeMongo")
+            except ValueError:
+                raise RuntimeError("Missing MongoDB url")
 
     return openpype_mongo
Repository: ynput/OpenPype
Issue: QApplication crash with Igniter dialog and Settings

There is a bug that happens when you run settings and you are missing mongodb credentials in keyring so Igniter dialog will pop-up. After successfully entering mongodb connection string, this will happen just before settings UI is launched:

```
Traceback (most recent call last):
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\start.py", line 1151, in boot
    cli.main(obj={}, prog_name="openpype")
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\openpype\\cli.py", line 40, in settings
    PypeCommands().launch_settings_gui(dev)
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\openpype\\pype_commands.py", line 33, in launch_settings_gui
    settings.main(user_role)
  File "C:\\Users\\annat\\Documents\\Projects\\OpenPype\\sources\\OpenPype\\openpype\\tools\\settings\\__init__.py", line 27, in main
    app = QtWidgets.QApplication(sys.argv)
RuntimeError: Please destroy the QApplication singleton before creating a new QApplication instance.
```


[cuID:[OP-4545](https://app.clickup.com/t/37bv592)]

Changed files:
openpype/tools/settings/__init__.py

diff --git a/openpype/tools/settings/__init__.py b/openpype/tools/settings/__init__.py
index 3e77a8348a..67e509f116 100644
--- a/openpype/tools/settings/__init__.py
+++ b/openpype/tools/settings/__init__.py
@@ -24,7 +24,9 @@ def main(user_role=None):
             user_role, ", ".join(allowed_roles)
         ))
 
-    app = QtWidgets.QApplication(sys.argv)
+    app = QtWidgets.QApplication.instance()
+    if not app:
+        app = QtWidgets.QApplication(sys.argv)
     app.setWindowIcon(QtGui.QIcon(style.app_icon_path()))
 
     widget = MainWidget(user_role)
Repository: ynput/OpenPype
Issue: OpenPype: tools/create_zip.ps1 --path flag fails with TypeError: Path must be str or Path

 
The `OpenPype/tools/create_zip.py` tool fails with the `--path` flag:

Error
```python
Traceback (most recent call last):
  File "S:\\openpype\\OpenPype\\tools\\create_zip.py", line 66, in <module>
    main()
  File "S:\\openpype\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "S:\\openpype\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 782, in main
    rv = self.invoke(ctx)
  File "S:\\openpype\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 1236, in invoke
    return Command.invoke(self, ctx)
  File "S:\\openpype\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "S:\\openpype\\OpenPype\\.venv\\lib\\site-packages\\click\\core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "S:\\openpype\\OpenPype\\tools\\create_zip.py", line 37, in main
    repo_file = bs.create_version_from_live_code()
  File "S:\\openpype\\OpenPype\\igniter\\bootstrap_repos.py", line 387, in create_version_from_live_code
    return OpenPypeVersion(version=version, path=destination)
  File "S:\\openpype\\OpenPype\\igniter\\bootstrap_repos.py", line 104, in __init__
    raise TypeError("Path must be str or Path")
TypeError: Path must be str or Path
```


[cuID:OP-2255]

Changed files:
igniter/bootstrap_repos.py, tools/create_zip.py

diff --git a/igniter/bootstrap_repos.py b/igniter/bootstrap_repos.py
index db62cbbe91..637f821366 100644
--- a/igniter/bootstrap_repos.py
+++ b/igniter/bootstrap_repos.py
@@ -762,7 +762,7 @@ class BootstrapRepos:
 
             destination = self._move_zip_to_data_dir(temp_zip)
 
-        return OpenPypeVersion(version=version, path=destination)
+        return OpenPypeVersion(version=version, path=Path(destination))
 
     def _move_zip_to_data_dir(self, zip_file) -> Union[None, Path]:
         """Move zip with OpenPype version to user data directory.
diff --git a/tools/create_zip.py b/tools/create_zip.py
index 32a4d27e8b..2fc351469a 100644
--- a/tools/create_zip.py
+++ b/tools/create_zip.py
@@ -31,7 +31,9 @@ def main(path):
     bs = bootstrap_repos.BootstrapRepos(progress_callback=progress)
     if path:
         out_path = Path(path)
-        bs.data_dir = out_path.parent
+        bs.data_dir = out_path
+        if out_path.is_file():
+            bs.data_dir = out_path.parent
 
     _print(f"Creating zip in {bs.data_dir} ...")
     repo_file = bs.create_version_from_live_code()
Repository: ynput/OpenPype
Issue: Linux app launcher does not handle removed environments

 ## Description
Script `app_launcher.py` does not remove environments that are not passed with `"env"` key which cause that if prelaunch hook removes a key from environment it will not be propagated to application.

[cuID:OP-2591]

Changed files:
openpype/lib/applications.py, openpype/hosts/hiero/__init__.py

diff --git a/openpype/hosts/hiero/__init__.py b/openpype/hosts/hiero/__init__.py
index 15bd10fdb0..2d674b3fa7 100644
--- a/openpype/hosts/hiero/__init__.py
+++ b/openpype/hosts/hiero/__init__.py
@@ -18,6 +18,7 @@ def add_implementation_envs(env, _app):
             new_hiero_paths.append(norm_path)
 
     env["HIERO_PLUGIN_PATH"] = os.pathsep.join(new_hiero_paths)
+    env.pop("QT_AUTO_SCREEN_SCALE_FACTOR", None)
 
     # Try to add QuickTime to PATH
     quick_time_path = "C:/Program Files (x86)/QuickTime/QTSystem"
diff --git a/openpype/lib/applications.py b/openpype/lib/applications.py
index a704c3ae68..4227195235 100644
--- a/openpype/lib/applications.py
+++ b/openpype/lib/applications.py
@@ -1040,10 +1040,19 @@ class ApplicationLaunchContext:
         # Prepare data that will be passed to midprocess
         # - store arguments to a json and pass path to json as last argument
         # - pass environments to set
+        app_env = self.kwargs.pop("env", {})
         json_data = {
             "args": self.launch_args,
-            "env": self.kwargs.pop("env", {})
+            "env": app_env
         }
+        if app_env:
+            # Filter environments of subprocess
+            self.kwargs["env"] = {
+                key: value
+                for key, value in os.environ.items()
+                if key in app_env
+            }
+
         # Create temp file
         json_temp = tempfile.NamedTemporaryFile(
             mode="w", prefix="op_app_args", suffix=".json", delete=False
Repository: ynput/OpenPype
Issue: Pyblish Pype: Validating message is shown during Extraction and Integration

 **Describe the bug**

PR https://github.com/pypeclub/OpenPype/pull/2646 introduced a bug in how bottom left reports the current state. It will continue to show "Validating.." during Extraction and Integration until it stops/finishes.

**To Reproduce**
Steps to reproduce the behavior:
1. Publish
2. During Extraction/Integration (preferably a long one) see the bottom left message, incorrectly shows "Validating.."

**Expected behavior**

Respectively show the current state.


[cuID:221v4m3]

Changed files:
openpype/tools/pyblish_pype/control.py

diff --git a/openpype/tools/pyblish_pype/control.py b/openpype/tools/pyblish_pype/control.py
index 6f89952c22..f657936b79 100644
--- a/openpype/tools/pyblish_pype/control.py
+++ b/openpype/tools/pyblish_pype/control.py
@@ -389,6 +389,9 @@ class Controller(QtCore.QObject):
                     new_current_group_order
                 )
 
+                # Force update to the current state
+                self._set_state_by_order()
+
                 if self.collect_state == 0:
                     self.collect_state = 1
                     self._current_state = (