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

Make into plugin #38

Open
Wavesonics opened this issue Jun 29, 2020 · 6 comments
Open

Make into plugin #38

Wavesonics opened this issue Jun 29, 2020 · 6 comments
Labels
enhancement New feature or request

Comments

@Wavesonics
Copy link
Contributor

I was just setting up a new project with OQT and thought it might be nice for new users to make things a little more automatic with a plugin. It could automatically add the vr singleton for them and remove one more step.

@Wavesonics Wavesonics changed the title Make into addon Make into plugin Jun 29, 2020
@NeoSpark314
Copy link
Owner

Can you detail a bit what this Plugin would mean (or point me to some documentation)? I am not familiar with this. Making the toolkit easier to use would be great.

@NeoSpark314 NeoSpark314 added the enhancement New feature or request label Jun 30, 2020
@Wavesonics
Copy link
Contributor Author

Wavesonics commented Jul 1, 2020

Ok, I made a branch showing how it could work. This only look like 10 minutes so no pressure to merge the PR :P

I added 2 new files:
plugin.cfg and plugin.gd

It'll show up in the plugins tab of project settings now, and when enabled, it will automatically add the vr autoload singleton.
When disabled it'll remove it.

Since plugins generally live in the addons sub dir, I moved the OQ_Toolkit dir into there, but that's optional of course. It could stay in the project root if you want.

Personally I always move OQ_Toolkit to the addons dir as it cleans up the root for my project code, but that's just personal preference.

One last point for moving it into addons/ is when someone adds this via the asset library, they know they can just click the addons/ dir when installing, and leave the rest out if they don't want demo code, since that seems to be the standard convention.

@Wavesonics
Copy link
Contributor Author

One more idea, if we have this plugin, we could add certain things as Nodes to the editor.

Some parts of the toolkit make sense as scenes to be instanced, but other parts I think should be named nodes that could instead be added by users via the normal "Add child node" interface.

These seem like good candidates to me:

  • OQ_ARVROrigin
  • OQ_ARVRCamera
  • OQ_RightController
  • OQ_LeftController

@Wavesonics
Copy link
Contributor Author

Wavesonics commented Jul 1, 2020

image

Example of adding the core scripts as nodes in the editor.

(Maybe someone can make a better icon than me ;P)

@Wavesonics
Copy link
Contributor Author

The last thing that would be sorta nice, is to automate the adding of vr.initialize() but it'd have to be done in a way that was still configurable for more advanced users... Maybe a check box on OQ_ARVROrigin that is checked by default, and when checked will call vr.initialize() in _enter_tree() or something? idk...

If that particular solution was chosen, we'd need a guard to prevent multiple calls to initialize I think. But that might be a nice safety feature anyway.

@Wavesonics
Copy link
Contributor Author

I added that (auto initialize of vr singleton) to the branch so you can see if you like it. We can cherry pick bits and pieces from this branch if you like any of it.

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

No branches or pull requests

2 participants