mirror of
https://github.com/Relintai/godot_data_editor.git
synced 2025-04-17 14:26:33 +02:00
Renamed the plugin to godot_data_editor
This commit is contained in:
parent
1815a12b7a
commit
3931f324de
@ -18,10 +18,10 @@ This repository hosts a plugin for the [Godot Engine]. It allows users to enter
|
||||
# Installation
|
||||
* Open your project folder, e.g. "../MyGame/"
|
||||
* Create a folder named "addons" (if not already present)
|
||||
* In addons, create a folder named "DataEditor"
|
||||
* In addons, create a folder named "godot_data_editor"
|
||||
* Copy the content of this repository into it. You may remove the "sceenshots" ;)
|
||||
* Open your project in the editor and navigate to the plugin (Scene -> Project Settings -> Plugins)
|
||||
* The plugin "DataEditor" should now appear, change the status from "Inactive" to "Active"
|
||||
* The plugin "godot_data_editor" should now appear, change the status from "Inactive" to "Active"
|
||||
* Restart the editor to make sure that the _data_ singleton is loaded properly
|
||||
|
||||
I intend to upload the plugin to the AssetLib, once I feel it is stable enough.
|
||||
|
@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/class_overview.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/style/light_gray_panel.tres" type="StyleBox" id=2]
|
||||
[ext_resource path="res://addons/DataEditor/fonts/droid_serif_bold.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://addons/godot_data_editor/class_overview.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/style/light_gray_panel.tres" type="StyleBox" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/droid_serif_bold.tres" type="DynamicFont" id=3]
|
||||
|
||||
[node name="ClassOverview" type="PanelContainer"]
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/style/light_gray_panel.tres" type="StyleBox" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/class_properties.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/DataEditor/fonts/droid_serif_bold.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://addons/godot_data_editor/style/light_gray_panel.tres" type="StyleBox" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/class_properties.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/droid_serif_bold.tres" type="DynamicFont" id=3]
|
||||
|
||||
[node name="ClassProperties" type="Panel"]
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/style/light_gray_panel.tres" type="StyleBox" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/custom_properties.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/DataEditor/fonts/droid_serif_bold.tres" type="DynamicFont" id=3]
|
||||
[ext_resource path="res://addons/godot_data_editor/style/light_gray_panel.tres" type="StyleBox" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/custom_properties.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/droid_serif_bold.tres" type="DynamicFont" id=3]
|
||||
|
||||
[node name="Panel" type="Panel"]
|
||||
|
||||
|
@ -49,7 +49,7 @@ func check_for_data_singleton():
|
||||
|
||||
if status == OK:
|
||||
if not config.has_section_key("autoload", "data"):
|
||||
config.set_value("autoload", "data", "*res://addons/DataEditor/data.gd")
|
||||
config.set_value("autoload", "data", "*res://addons/godot_data_editor/data.gd")
|
||||
config.save("res://engine.cfg")
|
||||
#var directory = Directory.new()
|
||||
#directory.copy("res://engine.cfg", "res://engine.cfg_BACKUP")
|
||||
@ -58,7 +58,7 @@ func check_for_data_singleton():
|
||||
# TODO: Obtain defaults from dialog
|
||||
func check_plugin_settings():
|
||||
var config = ConfigFile.new()
|
||||
var status = config.load("res://addons/DataEditor/plugin.cfg")
|
||||
var status = config.load("res://addons/godot_data_editor/plugin.cfg")
|
||||
if status == OK:
|
||||
if not config.has_section_key("custom", "class_directory"):
|
||||
config.set_value("custom", "class_directory", "res://classes")
|
||||
@ -74,7 +74,7 @@ func check_plugin_settings():
|
||||
config.set_value("custom", "sanitize_ids", true)
|
||||
if not config.has_section_key("custom", "serializer"):
|
||||
config.set_value("custom", "serializer", "json")
|
||||
config.save("res://addons/DataEditor/plugin.cfg")
|
||||
config.save("res://addons/godot_data_editor/plugin.cfg")
|
||||
|
||||
|
||||
# Virtual: Name of the tool button on top
|
||||
|
@ -1,28 +1,28 @@
|
||||
[gd_scene load_steps=22 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/data_editor_gui.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_add.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_save.png" type="Texture" id=3]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_rename.png" type="Texture" id=4]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_duplicate.png" type="Texture" id=5]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_remove.png" type="Texture" id=6]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_reload_small.png" type="Texture" id=7]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_script.png" type="Texture" id=8]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_options.png" type="Texture" id=9]
|
||||
[ext_resource path="res://addons/DataEditor/item_tree.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_display-name.png" type="Texture" id=11]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_copy.png" type="Texture" id=12]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_edit.png" type="Texture" id=13]
|
||||
[ext_resource path="res://addons/DataEditor/fonts/droid_sans_title.tres" type="DynamicFont" id=14]
|
||||
[ext_resource path="res://addons/DataEditor/class_properties.tscn" type="PackedScene" id=15]
|
||||
[ext_resource path="res://addons/DataEditor/custom_properties.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://addons/DataEditor/class_overview.tscn" type="PackedScene" id=17]
|
||||
[ext_resource path="res://addons/DataEditor/no_classes.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://addons/DataEditor/warn.gd" type="Script" id=19]
|
||||
[ext_resource path="res://addons/DataEditor/options.tscn" type="PackedScene" id=20]
|
||||
[ext_resource path="res://addons/DataEditor/input_dialog.tscn" type="PackedScene" id=21]
|
||||
[ext_resource path="res://addons/godot_data_editor/data_editor_gui.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_add.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_save.png" type="Texture" id=3]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_rename.png" type="Texture" id=4]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_duplicate.png" type="Texture" id=5]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_remove.png" type="Texture" id=6]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_reload_small.png" type="Texture" id=7]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_script.png" type="Texture" id=8]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_options.png" type="Texture" id=9]
|
||||
[ext_resource path="res://addons/godot_data_editor/item_tree.tscn" type="PackedScene" id=10]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_display-name.png" type="Texture" id=11]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_copy.png" type="Texture" id=12]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_edit.png" type="Texture" id=13]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/droid_sans_title.tres" type="DynamicFont" id=14]
|
||||
[ext_resource path="res://addons/godot_data_editor/class_properties.tscn" type="PackedScene" id=15]
|
||||
[ext_resource path="res://addons/godot_data_editor/custom_properties.tscn" type="PackedScene" id=16]
|
||||
[ext_resource path="res://addons/godot_data_editor/class_overview.tscn" type="PackedScene" id=17]
|
||||
[ext_resource path="res://addons/godot_data_editor/no_classes.tscn" type="PackedScene" id=18]
|
||||
[ext_resource path="res://addons/godot_data_editor/warn.gd" type="Script" id=19]
|
||||
[ext_resource path="res://addons/godot_data_editor/options.tscn" type="PackedScene" id=20]
|
||||
[ext_resource path="res://addons/godot_data_editor/input_dialog.tscn" type="PackedScene" id=21]
|
||||
|
||||
[node name="DataEditor" type="Control"]
|
||||
[node name="godot_data_editor" type="Control"]
|
||||
|
||||
anchor/right = 1
|
||||
anchor/bottom = 1
|
||||
|
@ -1,6 +1,6 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/fonts/DroidSans.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/DroidSans.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/fonts/DroidSerif-Bold.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/DroidSerif-Bold.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/fonts/DroidSerif-Italic.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/DroidSerif-Italic.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[gd_resource type="DynamicFont" load_steps=2 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/fonts/DroidSerif-Italic.ttf" type="DynamicFontData" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/DroidSerif-Italic.ttf" type="DynamicFontData" id=1]
|
||||
|
||||
[resource]
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=2 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/input_dialog.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/input_dialog.gd" type="Script" id=1]
|
||||
|
||||
[node name="ConfirmationDialog" type="ConfirmationDialog"]
|
||||
|
||||
|
@ -69,7 +69,7 @@ func initialize_variables():
|
||||
|
||||
func load_config():
|
||||
var config = ConfigFile.new()
|
||||
config.load("res://addons/DataEditor/plugin.cfg")
|
||||
config.load("res://addons/godot_data_editor/plugin.cfg")
|
||||
self.config_class_directory = config.get_value("custom", "class_directory")
|
||||
self.config_output_directory = config.get_value("custom", "output_directory")
|
||||
self.config_sanitize_ids = config.get_value("custom", "sanitize_ids")
|
||||
@ -448,7 +448,7 @@ func create_class(name, icon_path):
|
||||
# Handle icons
|
||||
var icon_file = File.new()
|
||||
if icon_path == "" or not icon_file.file_exists(icon_path):
|
||||
icon_path = "res://addons/DataEditor/icons/icon_empty.png"
|
||||
icon_path = "res://addons/godot_data_editor/icons/icon_empty.png"
|
||||
|
||||
var icon_resource = load(icon_path)
|
||||
var icon_data = icon_resource.get_data()
|
||||
@ -464,7 +464,7 @@ func create_class(name, icon_path):
|
||||
|
||||
# Create class
|
||||
var class_source = ""
|
||||
class_source += "extends \"res://addons/DataEditor/data_item.gd\"\n\n"
|
||||
class_source += "extends \"res://addons/godot_data_editor/data_item.gd\"\n\n"
|
||||
class_source += "export(String) var your_string_property = \"\"\n"
|
||||
class_source += "export(bool) var your_boolean_property = true\n"
|
||||
class_source += "export(Color) var your_color_property = Color(1,0,1)\n"
|
||||
|
@ -41,7 +41,7 @@ func _ready():
|
||||
|
||||
func load_tree(is_reload = false):
|
||||
plugin_config = ConfigFile.new()
|
||||
plugin_config.load("res://addons/DataEditor/plugin.cfg")
|
||||
plugin_config.load("res://addons/godot_data_editor/plugin.cfg")
|
||||
|
||||
|
||||
self.item_manager = Globals.get("item_manager")
|
||||
|
@ -1,11 +1,11 @@
|
||||
[gd_scene load_steps=8 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/item_tree.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_add.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_remove.png" type="Texture" id=3]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_rename.png" type="Texture" id=4]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_duplicate.png" type="Texture" id=5]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_load.png" type="Texture" id=6]
|
||||
[ext_resource path="res://addons/godot_data_editor/item_tree.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_add.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_remove.png" type="Texture" id=3]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_rename.png" type="Texture" id=4]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_duplicate.png" type="Texture" id=5]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_load.png" type="Texture" id=6]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id=1]
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/style/light_gray_panel.tres" type="StyleBox" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/fonts/droid_serif_bold.tres" type="DynamicFont" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/style/light_gray_panel.tres" type="StyleBox" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/fonts/droid_serif_bold.tres" type="DynamicFont" id=2]
|
||||
|
||||
[node name="Control" type="Panel"]
|
||||
|
||||
|
@ -42,7 +42,7 @@ func _ready():
|
||||
sanitize_ids_label.set_text(tr("Sanitize IDs"))
|
||||
|
||||
config = ConfigFile.new()
|
||||
config.load("res://addons/DataEditor/plugin.cfg")
|
||||
config.load("res://addons/godot_data_editor/plugin.cfg")
|
||||
serializer = config.get_value("custom", "serializer")
|
||||
extension = config.get_value("custom", "extension")
|
||||
|
||||
@ -133,7 +133,7 @@ func _on_Options_confirmed():
|
||||
config.set_value("custom", "class_directory", output_directory)
|
||||
config.set_value("custom", "output_directory", output_directory)
|
||||
config.set_value("custom", "sanitize_ids", sanitize_ids)
|
||||
config.save("res://addons/DataEditor/plugin.cfg")
|
||||
config.save("res://addons/godot_data_editor/plugin.cfg")
|
||||
hide()
|
||||
else:
|
||||
warn_dialog.set_text(error_message)
|
||||
|
@ -1,8 +1,8 @@
|
||||
[gd_scene load_steps=4 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/options.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/style/light_gray_panel.tres" type="StyleBox" id=2]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_load.png" type="Texture" id=3]
|
||||
[ext_resource path="res://addons/godot_data_editor/options.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/style/light_gray_panel.tres" type="StyleBox" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_load.png" type="Texture" id=3]
|
||||
|
||||
[node name="Options" type="AcceptDialog"]
|
||||
|
||||
|
@ -12,6 +12,6 @@ serializer="json"
|
||||
|
||||
author="Matthias Stoeckli"
|
||||
description="An editor to write and use a data from Godot"
|
||||
name="DataEditor"
|
||||
name="godot_data_editor"
|
||||
script="data_editor.gd"
|
||||
version="0.1"
|
||||
|
@ -95,7 +95,7 @@ func _ready():
|
||||
|
||||
if has_delete_button:
|
||||
var delete_button = ToolButton.new()
|
||||
delete_button.set_button_icon(preload("res://addons/DataEditor/icons/icon_remove.png"))
|
||||
delete_button.set_button_icon(preload("res://addons/godot_data_editor/icons/icon_remove.png"))
|
||||
delete_button.set_h_size_flags(Control.SIZE_EXPAND)
|
||||
delete_button.set_margin(MARGIN_LEFT, get_parent().get_parent().get_parent().get_size().x - 34 )
|
||||
delete_button.set_custom_minimum_size(Vector2(28, 24))
|
||||
|
@ -1,7 +1,7 @@
|
||||
[gd_scene load_steps=3 format=1]
|
||||
|
||||
[ext_resource path="res://addons/DataEditor/property_item.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/DataEditor/icons/icon_remove.png" type="Texture" id=2]
|
||||
[ext_resource path="res://addons/godot_data_editor/property_item.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/godot_data_editor/icons/icon_remove.png" type="Texture" id=2]
|
||||
|
||||
[node name="Panel" type="Panel"]
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 140 KiB |
Binary file not shown.
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 134 KiB |
Loading…
Reference in New Issue
Block a user