Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Studio wide events #3

Open
mkolar opened this issue Jul 7, 2015 · 5 comments
Open

Studio wide events #3

mkolar opened this issue Jul 7, 2015 · 5 comments

Comments

@mkolar
Copy link
Contributor

mkolar commented Jul 7, 2015

It is sometimes useful to have event that runs on any project and rather that having this one plugin in all project folders, it would make sense to give easy option to have plugins not filtered by project code and place them in a common directory.

Issue is more about putting this option to readme because it's already very easily doable by replacing main function in the plugin that should not be project specific

def main(event):
    success = plugins_api.check_project(event, __file__)
    if success:
        callback(event)

with

def main(event):
    callback(event)
@tokejepsen
Copy link
Owner

Or your callback method can just be called main, as that is what the server is looking for in the plugins.

@mkolar
Copy link
Contributor Author

mkolar commented Jul 7, 2015

ha. nice an easy. works like a charm

@tokejepsen
Copy link
Owner

Maybe there should be a better mechanism for seeing if its the root plugins folder, and have all plugins at the root work on all projects. Unless that is already happening?

@mkolar
Copy link
Contributor Author

mkolar commented Jul 7, 2015

Can't test now, bit I think it works already if you place it in the plugin root, however you still need to tweak the plugin as mentioned above.

@mkolar
Copy link
Contributor Author

mkolar commented Jul 8, 2015

I've implemented #1 and while doing it tested if importing plugins from the root folder works, and currently is doesn't. Should be fairly simple to implement though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants