Closed tokejepsen closed 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")
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?
What do you guys think about this as opposed to name?
+1
What do you guys think about this as opposed to name?
Short, descriptive and to the point. +1
Is the default label = None
?
Yeah, None
seems sensible. If label isn't implemented, it'll default to the name of the class as normal.
Label sounds great. Exactly what I'd expect.
Implemented in 0.2.10
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