Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when adding RenderState in SM with MediaExtensions plugin active #18

Closed
AltaArts opened this issue Aug 15, 2024 · 9 comments · Fixed by #33
Closed

Error when adding RenderState in SM with MediaExtensions plugin active #18

AltaArts opened this issue Aug 15, 2024 · 9 comments · Fixed by #33
Assignees

Comments

@AltaArts
Copy link
Collaborator

Investigate the below error thrown when adding a Render State to the Fusion StateManager when the Prism Media Extensions plugin is loaded.

15/08/24 18:43:44 ERROR - Prism_MediaExtension_Functions

Core: v2.0.10
App plugin: Fusion v2.0.0
Plugin: MediaExtension v2.0.10

File "C:\Users\Alta Arts\AppData\Roaming\Blackmagic Design\Fusion\Scripts\Prism\CreateHolder.py", line 9, in
createHolder()
File "C:\Users\Alta Arts\AppData\Roaming\Blackmagic Design\Fusion\Scripts\Prism\CreateHolder.py", line 5, in createHolder
holder = HolderClass.PrismHolderClass(fu.UIManager, fusion)
File "C:\Users\Alta Arts\AppData\Roaming\Blackmagic Design\Fusion\Scripts\Prism\HolderClass.py", line 113, in init
self.disp.RunLoop()
File "", line 167, in RunLoop
File "", line 123, in Dispatch
File "C:\Users\Alta Arts\AppData\Roaming\Blackmagic Design\Fusion\Scripts\Prism\HolderClass.py", line 147, in on_btn_statemanager_clicked
opw.openPrismStateManager(global_Prism.pcore)
File "C:\Users\Alta Arts\AppData\Roaming\Blackmagic Design\Fusion\Scripts\Prism\openPrismWindows.py", line 118, in openPrismStateManager
qapp.exec_()
File "C:\Python311\Lib\site-packages\qtpy\QtWidgets.py", line 149, in
QApplication.exec_ = lambda *args, **kwargs: possibly_static_exec(
File "C:\Python311\Lib\site-packages\qtpy_utils.py", line 53, in possibly_static_exec
return args[0].exec()
File "C:\Prism2\Scripts\ProjectScripts\StateManager.py", line 693, in
self.b_createRender.clicked.connect(lambda: self.createPressed("Render"))
File "C:\Prism2\Scripts\PrismUtils\Decorators.py", line 54, in func_wrapper
return func(*args, **kwargs)
File "C:\Prism2\Scripts\ProjectScripts\StateManager.py", line 1356, in createPressed
menu.exec_(QCursor.pos())
File "C:\Python311\Lib\site-packages\qtpy\QtWidgets.py", line 155, in
QMenu.exec_ = lambda *args, **kwargs: possibly_static_exec(
File "C:\Python311\Lib\site-packages\qtpy_utils.py", line 54, in possibly_static_exec
return args[0].exec(*args[1:], **kwargs)
File "C:\Prism2\Scripts\ProjectScripts\StateManager.py", line 1347, in
lambda x=None, st=exportState: self.createState(st["stateType"], parent=parent, setActive=True, **st.get("kwargs", {}))
File "C:\Prism2\Scripts\PrismUtils\Decorators.py", line 54, in func_wrapper
return func(*args, **kwargs)
File "C:\Prism2\Scripts\ProjectScripts\StateManager.py", line 1069, in createState
self.core.callback(
File "C:\Prism2\Scripts\PrismUtils\Decorators.py", line 54, in func_wrapper
return func(*args, **kwargs)
File "C:\Prism2\Scripts\PrismCore.py", line 426, in callback
return self.callbacks.callback(*args, **kwargs)
File "C:\Prism2\Scripts\PrismUtils\Decorators.py", line 54, in func_wrapper
return func(*args, **kwargs)
File "C:\Prism2\Scripts\PrismUtils\Callbacks.py", line 161, in callback
res = cb["function"](*args, **kwargs)
File "C:\Prism2\Scripts\PrismUtils\Decorators.py", line 54, in func_wrapper
return func(*args, **kwargs)
File "C:\Prism2\Scripts\PrismUtils\Decorators.py", line 89, in func_wrapper
"".join(traceback.format_stack()),

Traceback (most recent call last):
File "C:\Prism2\Scripts\PrismUtils\Decorators.py", line 54, in func_wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "Prism_MediaExtension_Functions.py", line 517, in Prism_MediaExtension_Functions.Prism_MediaExtension_Functions.addStateUI
AttributeError: 'PySide6.QtWidgets.QGridLayout' object has no attribute 'insertWidget'

@Animatect
Copy link
Owner

I'll talk to Richard

@Animatect Animatect self-assigned this Aug 16, 2024
@RichardFrangenberg
Copy link
Collaborator

The problem here is that the MediaExtension plugin thinks this is a normal ImageRender state and it tries to add a new widget with a checkbox to enable media conversion after the render is completed.
The normal ImageRender state is using a QVBoxLayout in the gb_imageRender QGroupBox, but the ImageRender state of this plugin is using a QGridLayout instead, which the MediaExtension plugin doesn't expect. I can update the MediaExtension plugin in the next version.
To avoid this error with the current MediaExtension version you could try to change the className variable of the state to something else, so that the MediaExtension plugin will ignore this state.

@Animatect
Copy link
Owner

Thank you Richard, I'll address the problem this week!

@AltaArts
Copy link
Collaborator Author

AltaArts commented Aug 19, 2024 via email

@RichardFrangenberg
Copy link
Collaborator

Changing it to VBox would also solve it, but I guess Esteban made that change for visual reasons.

Now that you mention it, the Project Management plugin is also adding a widget similar to the MediaExtension (the checkbox to publish the render automatically).
This would only happen if your project is connected to ftrack/Shotgrid/Kitsu. I guess your project was not connected and Estebans project was connected.

@AltaArts
Copy link
Collaborator Author

AltaArts commented Aug 19, 2024 via email

@Animatect
Copy link
Owner

Yes, I'm developing the internal workflow to switch the whole studio to plus so probably I'm connected to Kitsu.
I would have no issue in changing it to VBox, i would actually prefer it to changing the name of the states but all solutions seem simple enough so whichever we go with I'm ok implementing it.

@AltaArts
Copy link
Collaborator Author

Yeah, a bit ago I tested just changing it to a VBox to see, and the simple fix worked fine. So the states can load with MediaExtension (and most likely ProjectManagment).

I did show a new issue now, only when trying to use the convert in the state from the MediaExtensions. I am still trying to test in a bit, but need to leave here in a bit.

@AltaArts AltaArts assigned AltaArts and unassigned Animatect Aug 19, 2024
@AltaArts
Copy link
Collaborator Author

Uploaded the fix to a new branch named RenderStates UI fix. It works for me, but test it on your side.

@Animatect Animatect linked a pull request Aug 20, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from To Review to Done in Prism Fusion Plugin Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants