Refactor the plugin demos to be inside of a project for convenience

This commit is contained in:
Aaron Franke
2020-03-24 03:46:15 -04:00
parent 8464543a23
commit 51c0f3abb8
29 changed files with 158 additions and 22 deletions

View File

@@ -0,0 +1,23 @@
# A simple (and silly) material resource plugin. Allows you to make a really simple material
# from a custom dock, that you can save and load, and apply to selected MeshInstances.
#
# SPECIAL NOTE: This technically should be using EditorImportPlugin and EditorExportPlugin
# to handle the input and output of the silly material. However, currently you cannot export
# custom resources in Godot, so instead we're using JSON files instead.
#
# This example should be replaced when EditorImportPlugin and EditorExportPlugin are both
# fully working and you can save custom resources.
tool
extends EditorPlugin
var io_material_dialog
func _enter_tree():
io_material_dialog = preload("res://addons/material_creator/material_dock.tscn").instance()
io_material_dialog.editor_interface = get_editor_interface()
add_control_to_dock(DOCK_SLOT_LEFT_UL, io_material_dialog)
func _exit_tree():
remove_control_from_docks(io_material_dialog)