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

OQ_Toolkit as plugin #40

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added addons/OQ_Toolkit/oqt_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions addons/OQ_Toolkit/oqt_icon.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
[remap]

importer="texture"
type="StreamTexture"
path.s3tc="res://.import/oqt_icon.png-67a8ed03880c9bafe850331cc3a0e3fa.s3tc.stex"
path.etc="res://.import/oqt_icon.png-67a8ed03880c9bafe850331cc3a0e3fa.etc.stex"
metadata={
"imported_formats": [ "s3tc", "etc" ],
"vram_texture": true
}

[deps]

source_file="res://addons/OQ_Toolkit/oqt_icon.png"
dest_files=[ "res://.import/oqt_icon.png-67a8ed03880c9bafe850331cc3a0e3fa.s3tc.stex", "res://.import/oqt_icon.png-67a8ed03880c9bafe850331cc3a0e3fa.etc.stex" ]

[params]

compress/mode=2
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=true
flags/filter=true
flags/mipmaps=true
flags/anisotropic=false
flags/srgb=1
process/fix_alpha_border=false
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
6 changes: 6 additions & 0 deletions addons/OQ_Toolkit/plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ extends EditorPlugin

func _enter_tree():
add_autoload_singleton("vr", "res://addons/OQ_Toolkit/vr_autoload.gd")

add_custom_type("OQ_ARVROrigin", "ARVROrigin", load("res://addons/OQ_Toolkit/OQ_ARVROrigin/scripts/OQ_ARVROrigin.gd"), load("res://addons/OQ_Toolkit/oqt_icon.png"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if making some classes as build in types improves the usability of the toolkit; my main concerns are:

  • If not all classes are a custom type it is inconsistent and not clear to a user when to use what
  • I would assume that in most cases a user will not need to add nodes of the OQ_Toolkit very often but just setup the basic VR requirements and is done (especially for the origin, camera and controller)
  • The folder structure is actually part of the documentation as it makes clear which features should be attached to which node type; making everything a custom class would loose this (and I don't like to add a lot of tool-code to the scripts to check for this at editing time as this will get unreadable and hard to maintain quickly)

add_custom_type("OQ_ARVRCamera", "ARVRCamera", load("res://addons/OQ_Toolkit/OQ_ARVRCamera/scripts/OQ_ARVRCamera.gd"), load("res://addons/OQ_Toolkit/oqt_icon.png"))
add_custom_type("OQ_ARVRController", "ARVRController", load("res://addons/OQ_Toolkit/OQ_ARVRController/scripts/OQ_ARVRController.gd"), load("res://addons/OQ_Toolkit/oqt_icon.png"))


func _exit_tree():
remove_autoload_singleton("vr")

remove_custom_type("OQ_ARVROrigin")