Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Enno S
@enno.s_gitlab

Hey,
I'm looking for a functionality that allows to fix some plugin data after the validation has failed.

for example:
A top maya group node was named char01_grp.
A ValidateNaming plugin fails on that maya node/ instance and suggests to rename the node from char01_grp to char0001_GRP.

Is there a built-in way to have the user manually run an automated "fix fucntion" essentially renaming the group for them ?
(perhaps by clicking a button or a check box. similar to optional plugins ?)

Enno S
@enno.s_gitlab

awesome thanks !
I appreciate the quick response :)

while I'm having a read, may I ask;
Is there a quick way of running the same checks on several instances ?

e.G.
A selection of items that an Artists can try to fix by running their implementation of a "virtual " fix function on their failing plugins ?
(So they do not have to click on every plugin manually. Note: I am keen on having artists run this consciously on a button click instead of "just" running on a on-failed scenario automatically )

also what does the wrench icon on failed plugins in your demos mean ?

Marcus Ottosson
@mottosso
The wrench is pre-Actions, plug-ins could previously only have a single action applied which showed up as a wrench icon.
By the same check, do you mean the same plug-in, or the same action on several instances?
The action is given the entire context, which is just a regular Python list of all instances. So you could for instance in context: and go crazy
You can have actions appear either on failure, or all the time via the on attribute of the Action
Enno S
@enno.s_gitlab

Sorry I meant:
Is there a quick way of running the same actions on several instances ?

Imagine:

  • 3 out of 10 plugins failed.
  • The artist is informed by seeing 3x red on the first validation run.
    Let's assume it's due to wrong naming of nodes.
  • he toggles (somehow ) those 3 failed plugins and with one click is able to run all of those plugin's fix function.
  • Under the hood those fix functions would have totally different implementations for those different plugins respectively.
    ValidateRig.fix(): ... name.replace('rigging', 'rig')...
    ValidateModel.fix(): ... name.replace('model', 'mdl')...

does this make sense ?

Marcus Ottosson
@mottosso
Yes, if you put the action on one or all of those plug-ins, then you can access all instances via the context argument to the Action.process
Alternatively you could make a dedicated plug-in to hold that special action, a a plug-in that only serves as a visual cue to the users of success or failure. It could fail based on other plug-ins success state, for example
If you want a sort of inheritance to your actions, you'll probably have to rethink your strategy; like storing relevant options to a single action in each instance, and trigger the right function based on that.
if instance.data["I'm a model"]:
  self.repair_a_model(instance)
Enno S
@enno.s_gitlab
great thanks Marcus.
that's helpful quick insight. Perhaps I give it a shot :)
Marcus Ottosson
@mottosso
Anytime :)
Aleks Berland
@karmakat
Heya :)
I have a pyblish collector plugin which creates new instances., then deletes the original instance. How do I get those instances to show up in the artist view? They are in the detail view, but not the artist view.
Marcus Ottosson
@mottosso
Hi there, that sounds like a bug! Could you submit an example of how to reproduce this under pyblish-lite?
Aleks Berland
@karmakat
Hey Marcus! I am using pype, and its flavour of pyblish-lite.
I am not sure if it will be the same if you try to reproduce, but all I am doing is collecting a file and during its collection creating new instances, copying over the original instances data to the new instance., and then removing the original instance. I am wondering if there is some metadata that gets copied over that causes this.
I can look into making a reproducible example, but it might be a little tough without running pype's standalone publisher on your side
Aleks Berland
@karmakat

add original instance data except name key

        for key, value in instance.data.items():
            if key not in ["name"]:
                # Make sure value is copy since value may be object which
                # can be shared across all new created objects
                new_instance.data[key] = copy.deepcopy(value)
this is pretty broad, perhaps there is something transferred which is causing the new instance to also be removed from the the context
at the end of the loop, i just run context.remove(instance)
but new_instance is removed from artist view as well
Aleks Berland
@karmakat
Pype team says they think its an issue in the Artistview proxy model
i am running context.remove(instance) and it does get removed completely, but the new instance is also removed from the artist view but remains in the other view
Aleks Berland
@karmakat
ok i now realize the pype pyblish lite is very different codebase... zeroing in on the bug but I thank you for your help :)
Marcus Ottosson
@mottosso
Watch me mispronounce your names in front of everyone, Roy, Toke, Milan and David xD
David Lai
@davidlatwe
yeah yiii~ 🥳🥳🥳
My pride indeed XD (the t-shirt
Also, this might be the first time seeing Marcus’s face in full color 🤔
Marcus Ottosson
@mottosso
Haha, what does the t-shirt say? I actually don't know xD
David Lai
@davidlatwe
It is “My Pride” ! Excellent choice 👍🏼
Marcus Ottosson
@mottosso
Nice, then it was all planned xD
Jasper van Nieuwenhuizen
@jasperges
Congrats Marcus! Well deserved! :tada: :beers:
Erik Johansson
@Eiken
mottosso: congrats!
Marcus Ottosson
@mottosso
Woho!
Ruchit Bhatt
@ruchitinfushion
Congrats to contributors👍🎉
Enno S
@enno.s_gitlab
congrats !
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