pyblish / pyblish-qml

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

Nice Name implementation #85

Closed tokejepsen closed 9 years ago

tokejepsen commented 9 years ago

Using the name property of a plugin, display this to the user.

Example of property; https://github.com/pyblish/pyblish-napoleon/blob/master/napoleon/plugins/select_napoleon_instances.py#L19

mottosso commented 9 years ago

How about this for an interface?

Plug-in

class MyPlugin(..):
   name = "My Plugin"

Instance

Instances can already be called anything, and will be displayed in the GUI properly.

instance = context.create_instance(name="My Nicest Name")
instance.set_data("name", "New Nice Name")

Context

To add a custom name for the Context, how about this?

context.set_data("name", "Current file")
mottosso commented 9 years ago

What do you guys think about this as opposed to name?

class MyPlugin(...):
  label = "My Plugin"

It's apparently what FTrack does for their "Actions" and thus may be more familiar (?) and to the point?

tokejepsen commented 9 years ago

What do you guys think about this as opposed to name?

+1

BigRoy commented 9 years ago

What do you guys think about this as opposed to name?

Short, descriptive and to the point. +1

Is the default label = None?

mottosso commented 9 years ago

Yeah, None seems sensible. If label isn't implemented, it'll default to the name of the class as normal.

mkolar commented 9 years ago

Label sounds great. Exactly what I'd expect.

mottosso commented 9 years ago

Implemented in 0.2.10