Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Marcus Ottosson
@mottosso
Looks like we're getting some Photoshop support soon! pyblish/pyblish-photoshop#1
Jakub Trllo
@iLLiCiTiT
It's using photoshop-python-api. I think is also used in toke's implementation. Which is only for Windows as access to photoshop app in the module is via windows registers...
Marcus Ottosson
@mottosso
Good start at least! Where is Toke's implementation?
Jakub Trllo
@iLLiCiTiT
Joe Weidenbach
@scdrumz
huzzah!
Alex Fuller
@boberfly
I was playing around a bit with running a Qt app in Blender today (Gaffer)
trying out bpy.app.timers.register method as it is easy to implement in Gaffer's existing EventLoop, however I think it is interfering with Blender's opengl context somehow (debugger says it is crashing in some opengl code of Blender) :(
Marcus Ottosson
@mottosso
Can it be reproduced without gaffer? :O
Pyblish QML would also be using GL, albeit from another Python process rather than from within Blender
Alex Fuller
@boberfly
hmm probably difficult to try that to prove something meaningful, as it uses gaffer's EventLoop code & GafferUI hides the qt.py/GLWidget stuff, I'm wondering if blender does GL not on the main thread or something...
Jasper van Nieuwenhuizen
@jasperges

trying out bpy.app.timers.register method as it is easy to implement in Gaffer's existing EventLoop, however I think it is interfering with Blender's opengl context somehow (debugger says it is crashing in some opengl code of Blender) :(

Are you using Blender operators in the Qt app? That could also cause crashes if the context is incorrect. I haven't checked it recently, but that's why I am still using a modal operator to run the Avalon Qt apps inside of Blender.

Alex Fuller
@boberfly
@jasperges hey, nah this would just be as if launching gaffer from the command line but pumping the Qt events via the bpy.app.timers.register
I found this function DRW_opengl_context_enable(); and followed what other DCC apps do (Maya/Houdini) to get the OpenGL context, so I tried wrapping it in python and call it in GLWidget, but that kinda deadlocks things, I am pretty sure it is Gaffer nuking the existing GL context on that thread rather than just sharing the one with Blender
the other thing to try might be to run Qt on a different thread so it gets its own GL context
Alex Fuller
@boberfly
heh when Gaffer fails to make a GL context, the Qt window that it manages to create is stable with blender! so I must be onto something here :)
Jasper van Nieuwenhuizen
@jasperges
@boberfly cool! I hope hope you will get there. It would be really nice if we can run Qt apps inside of Blender in a non-blocking way, cross platform, without issues.
Alex Fuller
@boberfly
@jasperges your 4 variants script is what I've been trying here, that's been a huge help cheers!
the timers solution was the easy way, just needed to make a custom Blender one here: https://github.com/GafferHQ/gaffer/blob/master/python/GafferUI/EventLoop.py#L55
Jasper van Nieuwenhuizen
@jasperges
@boberfly nice! I wish I would have some time to fiddle around with Gaffer, but unfortunately I don't.
Chad Vernon
@chadmv
Hi all, new to Pyblish here. Looking at the example templates, should I be looking at pyblish-starter? pyblish-mindbender? They seem really similar.
Marcus Ottosson
@mottosso
Hey @chadmv, welcome aboard. :) pyblish-starter is a generalised pyblish-mindbender which was made for a specific company (called Mindbender), so starter is your best bet. Plus, it's got an associated website.
I'd like to improve the onboarding experience for the next beginner, can I ask how you discovered starter and mindbender? Could you take me through the steps? And did you already discover the pyblish-starter website?
Chad Vernon
@chadmv
I found starter through the official docs. I forgot how I found mindbender. It was probably a forum post link I think
Marcus Ottosson
@mottosso
Great, sounds about right. Thanks :)
Roy Nieterau
@BigRoy
Hi Chad, thanks for your C++ tutorials. :) Good to have you here! Looking forward to seeing what you'll be doing with Pyblish. :D

@chadmv Regarding Pyblish examples maybe this link could be worthwhile. They are not focused on Pyblish per se but on Avalon, but they all run publishing with Pyblish... so they might have some extra "pipeline things" but the publishing all runs through Pyblish.

I believe most of those avalon configs have the code laid out so that the Pyblish plug-ins are somewhere in {config}/plugins/{host}/publish - for example like this (maya). or this (maya) or this (houdini).

Roy Nieterau
@BigRoy
So they won't be "drag and drop" example plug-ins for your first time in Pyblish, but a lot of host-specific validations you can probably pick and customize for your own use.
Roy Nieterau
@BigRoy
Noticed Pyblish being mentioned here: https://www.gfx.dev/python-for-feature-film :)
Marcus Ottosson
@mottosso
Neat, this post was trending on Hacker News a few days ago too :) We're famous!
Andre Anjos
@andre.anjos_gitlab
Hi all!
Is there anyone that successfully ran Pyblish QML with 3D Studio Max? Would it be possible with the current version, please?
I understand that Max uses Pyside2 instead of PyQt5, so not sure how to redirect the Qt modules, if possible?
Thanks in advance! :)
Marcus Ottosson
@mottosso
Should work just fine, Pyblsh QML doesn't use Qt from within 3ds, it uses its own exernal version
The only thing you might run into is issues with QML calling 3ds from a thread, have a look at how the other integration dealt with this.
Typically it's a function provided by Maya/Houdini/etc to move another function to the main thread, I bet 3ds has something like it
Or, it's happy being called from a thread in which case you don't need it
Andre Anjos
@andre.anjos_gitlab
Hi @mottosso ! Thanks for that :)
I'm probably overthinking the process and will look into the setup more attentively :)
That makes sense I will have another look into it
Thanks again!
Marcus Ottosson
@mottosso
Yep, just run it like you would from Maya and it should be fine :)
Pyblish QML would run from any host so long as it can run Python, the host doesn't need Qt or bindings
Andre Anjos
@andre.anjos_gitlab
Thank you Marcus! That totally makes sense :)
Andre Anjos
@andre.anjos_gitlab
image.png
Morning all! @mottosso I've managed to run Pyblish inside 3ds Max, but it hangs on the Pyblish startup screen as above.
I'm using Python 3.7, PyQt5.15.1 and latest Pyblish QML 1.11.4.
Thank you in advance! :)
Marcus Ottosson
@mottosso
Morning! That's interesting
Are you able to see why?
What are you calling to get to there?
I would try and break down the show function, call each line yourself until you hit the point whereby it hangs
It likely doesn't crash, it likely is just waiting for input from somewhere
Andre Anjos
@andre.anjos_gitlab
It hasn't shown any problems at the minute but will use the show function to see if something weird happens
Marcus Ottosson
@mottosso
Actually, the fact that you are seeing a splash screen is telling me something. It means Pyblish is calling on the Qt bindings from 3ds max
See if you can remove the call to the splash screen from within show
Andre Anjos
@andre.anjos_gitlab
It was interesting that when using my previous version of Pyblish QML 1.10.2, by just switching the order of the binding in the QT.py file it works without problems
def _install():
    # Default order (customise order and content via QT_PREFERRED_BINDING)
    default_order = ("PyQt5", "PySide2", "PySide", "PyQt4")
    preferred_order = list(
        b for b in QT_PREFERRED_BINDING.split(os.pathsep) if b