mirror of
https://github.com/godotengine/godot-demo-projects.git
synced 2026-01-06 07:50:22 +01:00
Refactor the plugin demos to be inside of a project for convenience
This commit is contained in:
23
plugins/addons/material_creator/material_plugin.gd
Normal file
23
plugins/addons/material_creator/material_plugin.gd
Normal 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)
|
||||
Reference in New Issue
Block a user