Animatect / Prism2_PluginFusion

Fusion plugin for the Prism Pipeline Framework
1 stars 1 forks source link

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

Closed AltaArts closed 3 weeks ago

AltaArts commented 4 weeks ago

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(globalPrism.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 funcwrapper 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 commented 3 weeks ago

I'll talk to Richard

RichardFrangenberg commented 3 weeks ago

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 commented 3 weeks ago

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

AltaArts commented 3 weeks ago

Morning all.

That makes complete sense, but is odd.

I was getting the error with the MediaExtentions active (and would work correctly with it inactive). But Esteban still got the error with MediaExtensions inactive, and his traceback was citing ProjectManagement. And my ProjectManagement was loading fine. That is why we were confused.

Would it be best to change the custom state to use a VBox instead of the QGrid?

From: Animatect @.> Sent: Sunday, August 18, 2024 23:47 To: Animatect/Prism2_PluginFusion @.> Cc: Joshua Breckeen @.>; Author @.> Subject: Re: [Animatect/Prism2_PluginFusion] Error when adding RenderState in SM with MediaExtensions plugin active (Issue #18)

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

— Reply to this email directly, view it on GitHub https://github.com/Animatect/Prism2_PluginFusion/issues/18#issuecomment-2295611145 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUHXIZTYBRLUI74CIBHEFDZSFTB7AVCNFSM6AAAAABMTA2S46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGYYTCMJUGU . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AUUHXI4JN74B7OE26UNOX4LZSFTB7A5CNFSM6AAAAABMTA2S46WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUI2Q7QS.gif Message ID: @. @.> >

RichardFrangenberg commented 3 weeks ago

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 commented 3 weeks ago

Ah, that would explain it. Thanks for that info!

From: RichardFrangenberg @.> Sent: Monday, August 19, 2024 8:16 To: Animatect/Prism2_PluginFusion @.> Cc: Joshua Breckeen @.>; Author @.> Subject: Re: [Animatect/Prism2_PluginFusion] Error when adding RenderState in SM with MediaExtensions plugin active (Issue #18)

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.

— Reply to this email directly, view it on GitHub https://github.com/Animatect/Prism2_PluginFusion/issues/18#issuecomment-2296433599 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AUUHXI45DU5GEDMRF77GS43ZSHOZFAVCNFSM6AAAAABMTA2S46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGQZTGNJZHE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AUUHXI7T7SEIFUV7VOW5373ZSHOZFA5CNFSM6AAAAABMTA2S46WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUI4DF36.gif Message ID: @. @.> >

Animatect commented 3 weeks ago

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 commented 3 weeks ago

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 commented 3 weeks ago

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