pyblish / pyblish-qml

Pyblish QML frontend for Maya 2013+, Houdini 11+, Nuke 8+ and more
GNU Lesser General Public License v3.0
114 stars 44 forks source link

Section collapsing indicator color not working properly with action `Category` #285

Closed davidlatwe closed 6 years ago

davidlatwe commented 6 years ago

Problem

If I add pyblish.api.Category object in to plugin.actions list, the color of section collapsing indicator will not working as expected (Seems like plugin status got override to default).

Test Code

Please try comment out pyblish.api.Category("Fix"), in each plugin's actions and see the change of section indicator +

import pyblish.api

class DoSomeFix(pyblish.api.Action):
    label = "Make Some"
    on = "failed"

    def process(self, context, plugin):
        pass

class CollectSome(pyblish.api.ContextPlugin):

    order = pyblish.api.CollectorOrder - 0.2
    label = "Collect Some"
    actions = [
        #pyblish.api.Category("Fix"),
        DoSomeFix,
    ]

    def process(self, context):
        context.create_instance("something")

class CollectFailed(pyblish.api.ContextPlugin):

    order = pyblish.api.CollectorOrder - 0.2
    label = "Collect Failed"
    actions = [
        pyblish.api.Category("Fix"),
        DoSomeFix,
    ]

    def process(self, context):
        raise RuntimeError("Failed.")

class ValidateSome(pyblish.api.InstancePlugin):

    order = pyblish.api.ValidatorOrder - 0.2
    label = "Validate Some"
    actions = [
        pyblish.api.Category("Fix"),
        DoSomeFix,
    ]

    def process(self, instance):
        raise RuntimeError("Failed.")
mottosso commented 6 years ago

Thanks @davidlatwe, would you like to have a look at resolving this?

davidlatwe commented 6 years ago

Sure, will send a PR if I solved this.

davidlatwe commented 6 years ago

Solved with #286 Closing this one now:) Thanks!