mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-06 16:16:06 +01:00
Full cleanup of MatMakerGDEditor.
This commit is contained in:
parent
0f7a6fb070
commit
15ce82c23b
@ -1,36 +1,43 @@
|
||||
|
||||
#include "mat_maker_gd_editor.h"
|
||||
|
||||
NodePath MatMakerGDEditor::get_graph_edit_path() {
|
||||
return graph_edit_path;
|
||||
}
|
||||
#include "../algos/mm_algos.h"
|
||||
|
||||
void MatMakerGDEditor::set_graph_edit_path(const NodePath &val) {
|
||||
graph_edit_path = val;
|
||||
}
|
||||
#include "core/io/resource_loader.h"
|
||||
#include "core/undo_redo.h"
|
||||
#include "modules/material_maker/editor/mm_create_name_popup.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/button.h"
|
||||
#include "scene/gui/control.h"
|
||||
#include "scene/gui/graph_edit.h"
|
||||
#include "scene/gui/panel_container.h"
|
||||
|
||||
NodePath MatMakerGDEditor::get_add_popup_path() {
|
||||
return add_popup_path;
|
||||
}
|
||||
#include "../nodes/mm_material.h"
|
||||
#include "../nodes/mm_node.h"
|
||||
#include "../nodes/mm_node_universal_property.h"
|
||||
#include "mm_graph_node.h"
|
||||
|
||||
void MatMakerGDEditor::set_add_popup_path(const NodePath &val) {
|
||||
add_popup_path = val;
|
||||
}
|
||||
#include "editor/editor_plugin.h"
|
||||
|
||||
GraphEdit *MatMakerGDEditor::get_graph_edit() {
|
||||
return _graph_edit;
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::set_graph_edit(GraphEdit *val) {
|
||||
_graph_edit = val;
|
||||
}
|
||||
|
||||
Ref<MMMaterial> MatMakerGDEditor::get_mm_material() {
|
||||
return _material;
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::set_mm_material(const Ref<MMMaterial> &val) {
|
||||
_material = val;
|
||||
void MatMakerGDEditor::set_mm_material(const Ref<MMMaterial> &object) {
|
||||
if (_material.is_valid()) {
|
||||
_material->disconnect("changed", this, "on_material_changed");
|
||||
}
|
||||
|
||||
_material = object;
|
||||
recreate();
|
||||
|
||||
if (_material.is_valid()) {
|
||||
_material->connect("changed", this, "on_material_changed");
|
||||
}
|
||||
}
|
||||
|
||||
int MatMakerGDEditor::get_ignore_material_change_event() const {
|
||||
@ -41,6 +48,16 @@ void MatMakerGDEditor::set_ignore_material_change_event(const int val) {
|
||||
_ignore_material_change_event = val;
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::ignore_changes(const bool val) {
|
||||
if (val) {
|
||||
_ignore_material_change_event += 1;
|
||||
}
|
||||
|
||||
else {
|
||||
_ignore_material_change_event -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
bool MatMakerGDEditor::get_recreation_in_progress() const {
|
||||
return _recreation_in_progress;
|
||||
}
|
||||
@ -49,31 +66,20 @@ void MatMakerGDEditor::set_recreation_in_progress(const bool val) {
|
||||
_recreation_in_progress = val;
|
||||
}
|
||||
|
||||
EditorPlugin *MatMakerGDEditor::get_plugin() {
|
||||
return _plugin;
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::set_plugin(EditorPlugin *plugin) {
|
||||
_plugin = plugin;
|
||||
_undo_redo = plugin->get_undo_redo();
|
||||
}
|
||||
|
||||
UndoRedo *MatMakerGDEditor::get_undo_redo() {
|
||||
if (!_undo_redo) {
|
||||
_undo_redo = memnew(UndoRedo);
|
||||
}
|
||||
|
||||
return _undo_redo;
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::set_undo_redo(UndoRedo *val) {
|
||||
_undo_redo = val;
|
||||
void MatMakerGDEditor::set_undo_redo(UndoRedo *ur) {
|
||||
_undo_redo = ur;
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::_enter_tree() {
|
||||
ensure_objs();
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::ensure_objs() {
|
||||
if (!_graph_edit) {
|
||||
_graph_edit = get_node(graph_edit_path);
|
||||
|
||||
void MatMakerGDEditor::_notification(int p_what) {
|
||||
if (p_what == NOTIFICATION_POSTINITIALIZE) {
|
||||
_graph_edit->add_valid_connection_type(MMNodeUniversalProperty::SLOT_TYPE_IMAGE, MMNodeUniversalProperty::SLOT_TYPE_UNIVERSAL);
|
||||
_graph_edit->add_valid_connection_type(MMNodeUniversalProperty::SLOT_TYPE_INT, MMNodeUniversalProperty::SLOT_TYPE_UNIVERSAL);
|
||||
_graph_edit->add_valid_connection_type(MMNodeUniversalProperty::SLOT_TYPE_FLOAT, MMNodeUniversalProperty::SLOT_TYPE_UNIVERSAL);
|
||||
@ -107,19 +113,18 @@ void MatMakerGDEditor::recreate() {
|
||||
}
|
||||
|
||||
_recreation_in_progress = true;
|
||||
ensure_objs();
|
||||
_graph_edit.clear_connections();
|
||||
_graph_edit->clear_connections();
|
||||
|
||||
for (int i = 0; i < _graph_edit->get_child_count(); ++i) {
|
||||
GraphNode *c = Object::cast_to<GraphNode>(_graph_edit->get_child(i));
|
||||
MMGraphNode *c = Object::cast_to<MMGraphNode>(_graph_edit->get_child(i));
|
||||
|
||||
if (c) {
|
||||
_graph_edit->remove_child(c);
|
||||
c->queue_free();
|
||||
c->queue_delete();
|
||||
}
|
||||
}
|
||||
|
||||
if (!_material) {
|
||||
if (!_material.is_valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -129,7 +134,7 @@ void MatMakerGDEditor::recreate() {
|
||||
Ref<MMNode> n = _material->nodes[i];
|
||||
|
||||
MMGraphNode *gn = memnew(MMGraphNode);
|
||||
gn->set_editor(this);
|
||||
gn->set_editor_node(this);
|
||||
gn->set_node(_material, n);
|
||||
_graph_edit->add_child(gn);
|
||||
}
|
||||
@ -140,32 +145,32 @@ void MatMakerGDEditor::recreate() {
|
||||
Ref<MMNode> n = _material->nodes[i];
|
||||
|
||||
if (n.is_valid()) {
|
||||
for (int j = 0; j < n->input_property.size(); ++j) {
|
||||
for (int j = 0; j < n->input_properties.size(); ++j) {
|
||||
Ref<MMNodeUniversalProperty> ip = n->input_properties[j];
|
||||
|
||||
if (ip.is_valid()) {
|
||||
Node *input_node = find_graph_node_for(n);
|
||||
Node *output_node = find_graph_node_for(ip.input_property.owner);
|
||||
int to_slot = input_node.get_input_property_graph_node_slot_index(ip);
|
||||
int from_slot = output_node.get_output_property_graph_node_slot_index(ip.input_property);
|
||||
_graph_edit.connect_node(output_node.name, from_slot, input_node.name, to_slot);
|
||||
MMGraphNode *input_node = find_graph_node_for(n);
|
||||
MMGraphNode *output_node = find_graph_node_for(ip->get_input_property()->get_owner());
|
||||
int to_slot = input_node->get_input_property_graph_node_slot_index(ip);
|
||||
int from_slot = output_node->get_output_property_graph_node_slot_index(ip->get_input_property());
|
||||
_graph_edit->connect_node(output_node->get_name(), from_slot, input_node->get_name(), to_slot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_material.render();
|
||||
_material->render();
|
||||
_recreation_in_progress = false;
|
||||
ignore_changes(false);
|
||||
}
|
||||
|
||||
MMGraphNode *MatMakerGDEditor::find_graph_node_for(const Ref<MMnode> &nnode) {
|
||||
MMGraphNode *MatMakerGDEditor::find_graph_node_for(const Ref<MMNode> &nnode) {
|
||||
for (int i = 0; i < _graph_edit->get_child_count(); ++i) {
|
||||
GraphNode *c = Object::cast_to<GraphNode>(_graph_edit->get_child(i));
|
||||
MMGraphNode *c = Object::cast_to<MMGraphNode>(_graph_edit->get_child(i));
|
||||
|
||||
if (c) {
|
||||
if (c->has_method("get_material_node")) {
|
||||
Ref<MMnode> n = c->get_material_node();
|
||||
Ref<MMNode> n = c->get_material_node();
|
||||
|
||||
if (n == nnode) {
|
||||
return c;
|
||||
@ -177,19 +182,6 @@ MMGraphNode *MatMakerGDEditor::find_graph_node_for(const Ref<MMnode> &nnode) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::set_mmmaterial(const Ref<MMMaterial> &object) {
|
||||
if (_material) {
|
||||
_material->disconnect("changed", this, "on_material_changed");
|
||||
}
|
||||
|
||||
_material = object;
|
||||
recreate();
|
||||
|
||||
if (_material) {
|
||||
_material->connect("changed", this, "on_material_changed");
|
||||
}
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::on_material_changed() {
|
||||
if (_ignore_material_change_event > 0) {
|
||||
return;
|
||||
@ -202,19 +194,10 @@ void MatMakerGDEditor::on_material_changed() {
|
||||
call_deferred("recreate");
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::ignore_changes(const bool val) {
|
||||
if (val) {
|
||||
_ignore_material_change_event += 1;
|
||||
}
|
||||
|
||||
else {
|
||||
_ignore_material_change_event -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::on_graph_edit_connection_request(const String &from, const int from_slot, const String &to, const int to_slot) {
|
||||
GraphNode *from_node = _graph_edit.get_node(from);
|
||||
GraphNode *to_node = _graph_edit.get_node(to);
|
||||
MMGraphNode *from_node = Object::cast_to<MMGraphNode>(_graph_edit->get_node(from));
|
||||
MMGraphNode *to_node = Object::cast_to<MMGraphNode>(_graph_edit->get_node(to));
|
||||
|
||||
ignore_changes(true);
|
||||
_material->cancel_render_and_wait();
|
||||
|
||||
@ -226,8 +209,9 @@ void MatMakerGDEditor::on_graph_edit_connection_request(const String &from, cons
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::on_graph_edit_disconnection_request(const String &from, const int from_slot, const String &to, const int to_slot) {
|
||||
GraphNode *from_node = _graph_edit.get_node(from);
|
||||
GraphNode *to_node = _graph_edit.get_node(to);
|
||||
MMGraphNode *from_node = Object::cast_to<MMGraphNode>(_graph_edit->get_node(from));
|
||||
MMGraphNode *to_node = Object::cast_to<MMGraphNode>(_graph_edit->get_node(to));
|
||||
|
||||
ignore_changes(true);
|
||||
_material->cancel_render_and_wait();
|
||||
|
||||
@ -238,362 +222,120 @@ void MatMakerGDEditor::on_graph_edit_disconnection_request(const String &from, c
|
||||
ignore_changes(false);
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::on_graph_node_close_request(const GraphNode &node) {
|
||||
if (_material) {
|
||||
void MatMakerGDEditor::on_graph_node_close_request(Node *p_node) {
|
||||
MMGraphNode *node = Object::cast_to<MMGraphNode>(p_node);
|
||||
|
||||
if (_material.is_valid()) {
|
||||
ignore_changes(true);
|
||||
|
||||
_material->cancel_render_and_wait();
|
||||
//_material.remove_node(node._node);
|
||||
_undo_redo->create_action("MMGD: Remove Node");
|
||||
_undo_redo->add_do_method(_material, "remove_node", node._node);
|
||||
_undo_redo->add_undo_method(_material, "add_node", node._node);
|
||||
_undo_redo->commit_action();
|
||||
get_undo_redo()->create_action("MMGD: Remove Node");
|
||||
get_undo_redo()->add_do_method(*_material, "remove_node", node->get_node());
|
||||
get_undo_redo()->add_undo_method(*_material, "add_node", node->get_node());
|
||||
get_undo_redo()->commit_action();
|
||||
|
||||
recreate();
|
||||
ignore_changes(false);
|
||||
}
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::_on_AddButton_pressed() {
|
||||
get_node(add_popup_path)->opup_centered();
|
||||
_create_popup->popup_centered();
|
||||
}
|
||||
|
||||
void MatMakerGDEditor::_on_AddPopup_ok_pressed(const String &script_path) {
|
||||
if (!_material) {
|
||||
void MatMakerGDEditor::_on_AddPopup_ok_pressed(const int type, const String &data) {
|
||||
if (!_material.is_valid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
ensure_objs();
|
||||
_material->cancel_render_and_wait();
|
||||
//Variant = load(script_path);
|
||||
MMGraphNode *nnode = memnew(MMGraphNode);
|
||||
Ref<MMNode> nnode;
|
||||
|
||||
if (!nnode) {
|
||||
print_error("_on_AddPopup_ok_pressed: Error !nnode! script: " + script_path);
|
||||
if (type == MMAlgos::MMNODE_REGISTRY_TYPE_CLASS) {
|
||||
nnode = Ref<MMNode>(ClassDB::instance(data));
|
||||
} else if (type == MMAlgos::MMNODE_REGISTRY_TYPE_SCRIPT) {
|
||||
Ref<Script> script = ResourceLoader::load(data);
|
||||
|
||||
if (script.is_valid() && script->can_instance()) {
|
||||
nnode.instance();
|
||||
nnode->set_script(script.get_ref_ptr());
|
||||
}
|
||||
}
|
||||
|
||||
if (!nnode.is_valid()) {
|
||||
print_error("_on_AddPopup_ok_pressed: Error !nnode! script/class: " + data);
|
||||
return;
|
||||
}
|
||||
|
||||
ignore_changes(true);
|
||||
//_material.add_node(nnode);
|
||||
_undo_redo->create_action("MMGD: Add Node");
|
||||
_undo_redo->add_do_method(_material, "add_node", nnode);
|
||||
_undo_redo->add_undo_method(_material, "remove_node", nnode);
|
||||
_undo_redo->commit_action();
|
||||
|
||||
get_undo_redo()->create_action("MMGD: Add Node");
|
||||
get_undo_redo()->add_do_method(*_material, "add_node", nnode);
|
||||
get_undo_redo()->add_undo_method(*_material, "remove_node", nnode);
|
||||
get_undo_redo()->commit_action();
|
||||
|
||||
MMGraphNode *gn = memnew(MMGraphNode);
|
||||
gn->set_editor(this);
|
||||
gn->set_editor_node(this);
|
||||
gn->set_node(_material, nnode);
|
||||
_graph_edit->add_child(gn);
|
||||
ignore_changes(false);
|
||||
}
|
||||
|
||||
MatMakerGDEditor::MatMakerGDEditor() {
|
||||
//var MMGraphNode = preload("res://addons/mat_maker_gd/editor/mm_graph_node.gd");
|
||||
graph_edit_path = "VBoxContainer/GraphEdit";
|
||||
add_popup_path = "Popups/AddPopup";
|
||||
_graph_edit = nullptr;
|
||||
_material;
|
||||
_graph_edit = memnew(GraphEdit);
|
||||
_ignore_material_change_event = 0;
|
||||
_recreation_in_progress = false;
|
||||
_plugin = nullptr;
|
||||
_undo_redo = nullptr;
|
||||
|
||||
//Script: res://addons/mat_maker_gd/editor/MatMakerGDEditor.gd
|
||||
MarginContainer *matmakergdeditor = memnew(MarginContainer);
|
||||
matmakergdeditor->set_name("MatMakerGDEditor");
|
||||
matmakergdeditor->set_filename("res://addons/mat_maker_gd/editor/MatMakerGDEditor.tscn");
|
||||
matmakergdeditor->set_anchor_right(1);
|
||||
matmakergdeditor->set_anchor_bottom(1);
|
||||
matmakergdeditor->set_rect_min_size(Vector2(0, 200));
|
||||
matmakergdeditor->set_size_flags_horizontal(3);
|
||||
matmakergdeditor->set_size_flags_vertical(3);
|
||||
set_name("MatMakerGDEditor");
|
||||
set_anchors_and_margins_preset(LayoutPreset::PRESET_WIDE);
|
||||
set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
|
||||
VBoxContainer *vboxcontainer_matmakergdeditor = memnew(VBoxContainer);
|
||||
vboxcontainer_matmakergdeditor->set_name("VBoxContainer");
|
||||
matmakergdeditor->add_child(vboxcontainer_matmakergdeditor);
|
||||
vboxcontainer_matmakergdeditor->set_name("VBoxContainer");
|
||||
//vboxcontainer_matmakergdeditor property owner TYPE_OBJECT value: MatMakerGDEditor:[MarginContainer:280327]
|
||||
vboxcontainer_matmakergdeditor->set_margin_right(1024);
|
||||
vboxcontainer_matmakergdeditor->set_margin_bottom(600);
|
||||
vboxcontainer_matmakergdeditor->set_rect_size(Vector2(1024, 600));
|
||||
VBoxContainer *vboxcontainer = memnew(VBoxContainer);
|
||||
vboxcontainer->set_name("VBoxContainer");
|
||||
add_child(vboxcontainer);
|
||||
|
||||
PanelContainer *panelcontainer_vboxcontainer_matmakergdeditor = memnew(PanelContainer);
|
||||
panelcontainer_vboxcontainer_matmakergdeditor->set_name("PanelContainer");
|
||||
vboxcontainer_matmakergdeditor->add_child(panelcontainer_vboxcontainer_matmakergdeditor);
|
||||
panelcontainer_vboxcontainer_matmakergdeditor->set_name("PanelContainer");
|
||||
//panelcontainer_vboxcontainer_matmakergdeditor property owner TYPE_OBJECT value: MatMakerGDEditor:[MarginContainer:280327]
|
||||
panelcontainer_vboxcontainer_matmakergdeditor->set_margin_right(1024);
|
||||
panelcontainer_vboxcontainer_matmakergdeditor->set_margin_bottom(34);
|
||||
panelcontainer_vboxcontainer_matmakergdeditor->set_rect_size(Vector2(1024, 34));
|
||||
PanelContainer *panelcontainer_vboxcontainer = memnew(PanelContainer);
|
||||
panelcontainer_vboxcontainer->set_name("PanelContainer");
|
||||
vboxcontainer->add_child(panelcontainer_vboxcontainer);
|
||||
|
||||
HBoxContainer *hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor = memnew(HBoxContainer);
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_name("HBoxContainer");
|
||||
panelcontainer_vboxcontainer_matmakergdeditor->add_child(hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor);
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_name("HBoxContainer");
|
||||
//hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor property owner TYPE_OBJECT value: MatMakerGDEditor:[MarginContainer:280327]
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_margin_left(7);
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_margin_top(7);
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_margin_right(1017);
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_margin_bottom(27);
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_rect_position(Vector2(7, 7));
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_rect_global_position(Vector2(7, 7));
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_rect_size(Vector2(1010, 20));
|
||||
HBoxContainer *hboxcontainer_panelcontainer_vboxcontainer = memnew(HBoxContainer);
|
||||
hboxcontainer_panelcontainer_vboxcontainer->set_name("HBoxContainer");
|
||||
panelcontainer_vboxcontainer->add_child(hboxcontainer_panelcontainer_vboxcontainer);
|
||||
|
||||
Button *addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor = memnew(Button);
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_name("AddButton");
|
||||
hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->add_child(addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor);
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_name("AddButton");
|
||||
//addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor property owner TYPE_OBJECT value: MatMakerGDEditor:[MarginContainer:280327]
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_margin_right(37);
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_margin_bottom(20);
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_rect_size(Vector2(37, 20));
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer_matmakergdeditor->set_text("Add");
|
||||
Button *addbutton_hboxcontainer_panelcontainer_vboxcontainer = memnew(Button);
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer->set_name("AddButton");
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer->set_text("Add");
|
||||
addbutton_hboxcontainer_panelcontainer_vboxcontainer->connect("pressed", this, "_on_AddButton_pressed");
|
||||
hboxcontainer_panelcontainer_vboxcontainer->add_child(addbutton_hboxcontainer_panelcontainer_vboxcontainer);
|
||||
|
||||
GraphEdit *graphedit_vboxcontainer_matmakergdeditor = memnew(GraphEdit);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_name("GraphEdit");
|
||||
vboxcontainer_matmakergdeditor->add_child(graphedit_vboxcontainer_matmakergdeditor);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_name("GraphEdit");
|
||||
//graphedit_vboxcontainer_matmakergdeditor property owner TYPE_OBJECT value: MatMakerGDEditor:[MarginContainer:280327]
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_margin_top(38);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_margin_right(1024);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_margin_bottom(600);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_rect_position(Vector2(0, 38));
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_rect_global_position(Vector2(0, 38));
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_rect_size(Vector2(1024, 562));
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_size_flags_vertical(3);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_right_disconnects(True);
|
||||
graphedit_vboxcontainer_matmakergdeditor->set_scroll_offset(Vector2(0, -20));
|
||||
_graph_edit = memnew(GraphEdit);
|
||||
_graph_edit->set_name("GraphEdit");
|
||||
_graph_edit->set_right_disconnects(true);
|
||||
_graph_edit->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||
_graph_edit->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||
vboxcontainer->add_child(_graph_edit);
|
||||
|
||||
GraphEditFilter *grapheditfilter_graphedit_vboxcontainer_matmakergdeditor = memnew(GraphEditFilter);
|
||||
grapheditfilter_graphedit_vboxcontainer_matmakergdeditor->set_name("GraphEditFilter");
|
||||
graphedit_vboxcontainer_matmakergdeditor->add_child(grapheditfilter_graphedit_vboxcontainer_matmakergdeditor);
|
||||
Control *clayer_graphedit_vboxcontainer_matmakergdeditor = memnew(Control);
|
||||
clayer_graphedit_vboxcontainer_matmakergdeditor->set_name("CLAYER");
|
||||
graphedit_vboxcontainer_matmakergdeditor->add_child(clayer_graphedit_vboxcontainer_matmakergdeditor);
|
||||
clayer_graphedit_vboxcontainer_matmakergdeditor->set_name("CLAYER");
|
||||
clayer_graphedit_vboxcontainer_matmakergdeditor->set_mouse_filter(2);
|
||||
Control *popups = memnew(Control);
|
||||
popups->set_name("Popups");
|
||||
popups->set_mouse_filter(MOUSE_FILTER_IGNORE);
|
||||
add_child(popups);
|
||||
|
||||
Control *popups_matmakergdeditor = memnew(Control);
|
||||
popups_matmakergdeditor->set_name("Popups");
|
||||
matmakergdeditor->add_child(popups_matmakergdeditor);
|
||||
popups_matmakergdeditor->set_name("Popups");
|
||||
//popups_matmakergdeditor property owner TYPE_OBJECT value: MatMakerGDEditor:[MarginContainer:280327]
|
||||
popups_matmakergdeditor->set_margin_right(1024);
|
||||
popups_matmakergdeditor->set_margin_bottom(600);
|
||||
popups_matmakergdeditor->set_rect_size(Vector2(1024, 600));
|
||||
popups_matmakergdeditor->set_mouse_filter(2);
|
||||
|
||||
//Script: res://addons/mat_maker_gd/editor/CreateNamePopup.gd
|
||||
ConfirmationDialog *addpopup_popups_matmakergdeditor = memnew(ConfirmationDialog);
|
||||
addpopup_popups_matmakergdeditor->set_name("AddPopup");
|
||||
popups_matmakergdeditor->add_child(addpopup_popups_matmakergdeditor);
|
||||
addpopup_popups_matmakergdeditor->set_name("AddPopup");
|
||||
addpopup_popups_matmakergdeditor->set_filename("res://addons/mat_maker_gd/editor/CreateNamePopup.tscn");
|
||||
//addpopup_popups_matmakergdeditor property owner TYPE_OBJECT value: MatMakerGDEditor:[MarginContainer:280327]
|
||||
addpopup_popups_matmakergdeditor->set_anchor_left(0.5);
|
||||
addpopup_popups_matmakergdeditor->set_anchor_top(0.5);
|
||||
addpopup_popups_matmakergdeditor->set_anchor_right(0.5);
|
||||
addpopup_popups_matmakergdeditor->set_anchor_bottom(0.5);
|
||||
addpopup_popups_matmakergdeditor->set_margin_left(-245.5);
|
||||
addpopup_popups_matmakergdeditor->set_margin_top(-220);
|
||||
addpopup_popups_matmakergdeditor->set_margin_right(245.5);
|
||||
addpopup_popups_matmakergdeditor->set_margin_bottom(220);
|
||||
addpopup_popups_matmakergdeditor->set_rect_position(Vector2(-245.5, -220));
|
||||
addpopup_popups_matmakergdeditor->set_rect_global_position(Vector2(-245.5, -220));
|
||||
addpopup_popups_matmakergdeditor->set_rect_size(Vector2(491, 440));
|
||||
addpopup_popups_matmakergdeditor->set_window_title("Create New Resource");
|
||||
//addpopup_popups_matmakergdeditor property _meta_ TYPE_DICTIONARY value: {_edit_use_anchors_:False}
|
||||
//addpopup_popups_matmakergdeditor property line_edit_path TYPE_NODE_PATH value: VBoxContainer/LineEdit
|
||||
//addpopup_popups_matmakergdeditor property tree_path TYPE_NODE_PATH value: VBoxContainer/Tree
|
||||
//addpopup_popups_matmakergdeditor property type_folders TYPE_STRING_ARRAY value: [res://addons/mat_maker_gd/nodes/uniform, res://addons/mat_maker_gd/nodes/noise, res://addons/mat_maker_gd/nodes/filter, res://addons/mat_maker_gd/nodes/gradient, res://addons/mat_maker_gd/nodes/pattern, res://addons/mat_maker_gd/nodes/sdf2d, res://addons/mat_maker_gd/nodes/sdf3d, res://addons/mat_maker_gd/nodes/transform, res://addons/mat_maker_gd/nodes/simple, res://addons/mat_maker_gd/nodes/other]
|
||||
|
||||
TextureButton *texturebutton_addpopup_popups_matmakergdeditor = memnew(TextureButton);
|
||||
texturebutton_addpopup_popups_matmakergdeditor->set_name("TextureButton");
|
||||
addpopup_popups_matmakergdeditor->add_child(texturebutton_addpopup_popups_matmakergdeditor);
|
||||
texturebutton_addpopup_popups_matmakergdeditor->set_name("TextureButton");
|
||||
|
||||
Label *label_addpopup_popups_matmakergdeditor = memnew(Label);
|
||||
label_addpopup_popups_matmakergdeditor->set_name("Label");
|
||||
addpopup_popups_matmakergdeditor->add_child(label_addpopup_popups_matmakergdeditor);
|
||||
label_addpopup_popups_matmakergdeditor->set_name("Label");
|
||||
label_addpopup_popups_matmakergdeditor->set_anchor_right(1);
|
||||
label_addpopup_popups_matmakergdeditor->set_anchor_bottom(1);
|
||||
label_addpopup_popups_matmakergdeditor->set_margin_left(8);
|
||||
label_addpopup_popups_matmakergdeditor->set_margin_top(8);
|
||||
label_addpopup_popups_matmakergdeditor->set_margin_right(-8);
|
||||
label_addpopup_popups_matmakergdeditor->set_margin_bottom(-42);
|
||||
label_addpopup_popups_matmakergdeditor->set_rect_position(Vector2(8, 8));
|
||||
label_addpopup_popups_matmakergdeditor->set_rect_global_position(Vector2(8, 8));
|
||||
label_addpopup_popups_matmakergdeditor->set_rect_size(Vector2(0, 14));
|
||||
|
||||
HBoxContainer *hboxcontainer_addpopup_popups_matmakergdeditor = memnew(HBoxContainer);
|
||||
hboxcontainer_addpopup_popups_matmakergdeditor->set_name("HBoxContainer");
|
||||
addpopup_popups_matmakergdeditor->add_child(hboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
hboxcontainer_addpopup_popups_matmakergdeditor->set_name("HBoxContainer");
|
||||
|
||||
Control *control3_hboxcontainer_addpopup_popups_matmakergdeditor = memnew(Control);
|
||||
control3_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Control3");
|
||||
hboxcontainer_addpopup_popups_matmakergdeditor->add_child(control3_hboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
control3_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Control3");
|
||||
control3_hboxcontainer_addpopup_popups_matmakergdeditor->set_mouse_filter(1);
|
||||
control3_hboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
|
||||
Button *button2_hboxcontainer_addpopup_popups_matmakergdeditor = memnew(Button);
|
||||
button2_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Button2");
|
||||
hboxcontainer_addpopup_popups_matmakergdeditor->add_child(button2_hboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
button2_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Button2");
|
||||
button2_hboxcontainer_addpopup_popups_matmakergdeditor->set_text("Cancel");
|
||||
|
||||
Control *control_hboxcontainer_addpopup_popups_matmakergdeditor = memnew(Control);
|
||||
control_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Control");
|
||||
hboxcontainer_addpopup_popups_matmakergdeditor->add_child(control_hboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
control_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Control");
|
||||
control_hboxcontainer_addpopup_popups_matmakergdeditor->set_mouse_filter(1);
|
||||
control_hboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
|
||||
Button *button_hboxcontainer_addpopup_popups_matmakergdeditor = memnew(Button);
|
||||
button_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Button");
|
||||
hboxcontainer_addpopup_popups_matmakergdeditor->add_child(button_hboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
button_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Button");
|
||||
button_hboxcontainer_addpopup_popups_matmakergdeditor->set_text("OK");
|
||||
|
||||
Control *control2_hboxcontainer_addpopup_popups_matmakergdeditor = memnew(Control);
|
||||
control2_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Control2");
|
||||
hboxcontainer_addpopup_popups_matmakergdeditor->add_child(control2_hboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
control2_hboxcontainer_addpopup_popups_matmakergdeditor->set_name("Control2");
|
||||
control2_hboxcontainer_addpopup_popups_matmakergdeditor->set_mouse_filter(1);
|
||||
control2_hboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
|
||||
VBoxContainer *vboxcontainer_addpopup_popups_matmakergdeditor = memnew(VBoxContainer);
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_name("VBoxContainer");
|
||||
addpopup_popups_matmakergdeditor->add_child(vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_name("VBoxContainer");
|
||||
//vboxcontainer_addpopup_popups_matmakergdeditor property owner TYPE_OBJECT value: AddPopup:[ConfirmationDialog:280352]
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_left(8);
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_top(8);
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_right(483);
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_bottom(404);
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_position(Vector2(8, 8));
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_global_position(Vector2(8, 8));
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_size(Vector2(475, 396));
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_vertical(3);
|
||||
//vboxcontainer_addpopup_popups_matmakergdeditor property _meta_ TYPE_DICTIONARY value: {_edit_use_anchors_:False}
|
||||
|
||||
Label *label2_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(Label);
|
||||
label2_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("Label2");
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->add_child(label2_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
label2_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("Label2");
|
||||
//label2_vboxcontainer_addpopup_popups_matmakergdeditor property owner TYPE_OBJECT value: AddPopup:[ConfirmationDialog:280352]
|
||||
label2_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_right(475);
|
||||
label2_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_bottom(14);
|
||||
label2_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_size(Vector2(475, 14));
|
||||
label2_vboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
label2_vboxcontainer_addpopup_popups_matmakergdeditor->set_text("Type");
|
||||
|
||||
Tree *tree_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(Tree);
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("Tree");
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->add_child(tree_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("Tree");
|
||||
//tree_vboxcontainer_addpopup_popups_matmakergdeditor property owner TYPE_OBJECT value: AddPopup:[ConfirmationDialog:280352]
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_top(18);
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_right(475);
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_bottom(350);
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_position(Vector2(0, 18));
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_global_position(Vector2(0, 18));
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_size(Vector2(475, 332));
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_vertical(3);
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_hide_root(True);
|
||||
|
||||
PopupMenu *popupmenu_tree_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(PopupMenu);
|
||||
popupmenu_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("PopupMenu");
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->add_child(popupmenu_tree_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
popupmenu_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("PopupMenu");
|
||||
|
||||
LineEdit *lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(LineEdit);
|
||||
lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("LineEdit");
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->add_child(lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("LineEdit");
|
||||
lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_visible(False);
|
||||
|
||||
PopupMenu *popupmenu_lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(PopupMenu);
|
||||
popupmenu_lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("PopupMenu");
|
||||
lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor->add_child(popupmenu_lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
popupmenu_lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("PopupMenu");
|
||||
//popupmenu_lineedit_tree_vboxcontainer_addpopup_popups_matmakergdeditor property items TYPE_ARRAY value: [Cut, [Object:null], 0, False, False, 0, 268435544, Null, , False, Copy, [Object:null], 0, False, False, 1, 268435523, Null, , False, Paste, [Object:null], 0, False, False, 2, 268435542, Null, , False, , [Object:null], 0, False, False, -1, 0, Null, , True, Select All, [Object:null], 0, False, False, 4, 268435521, Null, , False, Clear, [Object:null], 0, False, False, 3, 0, Null, , False, , [Object:null], 0, False, False, -1, 0, Null, , True, Undo, [Object:null], 0, False, False, 5, 268435546, Null, , False, Redo, [Object:null], 0, False, False, 6, 301989978, Null, , False]
|
||||
|
||||
HSlider *hslider_tree_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(HSlider);
|
||||
hslider_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("HSlider");
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->add_child(hslider_tree_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
hslider_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("HSlider");
|
||||
hslider_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_visible(False);
|
||||
|
||||
HScrollBar *hscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(HScrollBar);
|
||||
hscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("HScrollBar");
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->add_child(hscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
hscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("HScrollBar");
|
||||
|
||||
VScrollBar *vscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(VScrollBar);
|
||||
vscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("VScrollBar");
|
||||
tree_vboxcontainer_addpopup_popups_matmakergdeditor->add_child(vscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
vscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("VScrollBar");
|
||||
vscrollbar_tree_vboxcontainer_addpopup_popups_matmakergdeditor->set_custom_step(14);
|
||||
|
||||
Label *label_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(Label);
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("Label");
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->add_child(label_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("Label");
|
||||
//label_vboxcontainer_addpopup_popups_matmakergdeditor property owner TYPE_OBJECT value: AddPopup:[ConfirmationDialog:280352]
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_visible(False);
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_top(354);
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_right(475);
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_bottom(368);
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_position(Vector2(0, 354));
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_global_position(Vector2(0, 354));
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_size(Vector2(475, 14));
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
label_vboxcontainer_addpopup_popups_matmakergdeditor->set_text("Name");
|
||||
|
||||
LineEdit *lineedit_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(LineEdit);
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("LineEdit");
|
||||
vboxcontainer_addpopup_popups_matmakergdeditor->add_child(lineedit_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("LineEdit");
|
||||
//lineedit_vboxcontainer_addpopup_popups_matmakergdeditor property owner TYPE_OBJECT value: AddPopup:[ConfirmationDialog:280352]
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_visible(False);
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_top(372);
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_right(475);
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_margin_bottom(396);
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_position(Vector2(0, 372));
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_global_position(Vector2(0, 372));
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_rect_size(Vector2(475, 24));
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_size_flags_horizontal(3);
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_caret_blink(True);
|
||||
|
||||
PopupMenu *popupmenu_lineedit_vboxcontainer_addpopup_popups_matmakergdeditor = memnew(PopupMenu);
|
||||
popupmenu_lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("PopupMenu");
|
||||
lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->add_child(popupmenu_lineedit_vboxcontainer_addpopup_popups_matmakergdeditor);
|
||||
popupmenu_lineedit_vboxcontainer_addpopup_popups_matmakergdeditor->set_name("PopupMenu");
|
||||
//popupmenu_lineedit_vboxcontainer_addpopup_popups_matmakergdeditor property items TYPE_ARRAY value: [Cut, [Object:null], 0, False, False, 0, 268435544, Null, , False, Copy, [Object:null], 0, False, False, 1, 268435523, Null, , False, Paste, [Object:null], 0, False, False, 2, 268435542, Null, , False, , [Object:null], 0, False, False, -1, 0, Null, , True, Select All, [Object:null], 0, False, False, 4, 268435521, Null, , False, Clear, [Object:null], 0, False, False, 3, 0, Null, , False, , [Object:null], 0, False, False, -1, 0, Null, , True, Undo, [Object:null], 0, False, False, 5, 268435546, Null, , False, Redo, [Object:null], 0, False, False, 6, 301989978, Null, , False]
|
||||
_create_popup = memnew(MMCreateNamePopup);
|
||||
_create_popup->set_name("AddPopup");
|
||||
_create_popup->set_title("Create New Resource");
|
||||
popups->add_child(_create_popup);
|
||||
}
|
||||
|
||||
MatMakerGDEditor::~MatMakerGDEditor() {
|
||||
}
|
||||
|
||||
static void MatMakerGDEditor::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_Variant"), &MatMakerGDEditor::get_Variant);
|
||||
ClassDB::bind_method(D_METHOD("set_Variant", "value"), &MatMakerGDEditor::set_Variant);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "Variant", PROPERTY_HINT_RESOURCE_TYPE, "Variant"), "set_Variant", "get_Variant");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_graph_edit_path"), &MatMakerGDEditor::get_graph_edit_path);
|
||||
ClassDB::bind_method(D_METHOD("set_graph_edit_path", "value"), &MatMakerGDEditor::set_graph_edit_path);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "graph_edit_path"), "set_graph_edit_path", "get_graph_edit_path");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_add_popup_path"), &MatMakerGDEditor::get_add_popup_path);
|
||||
ClassDB::bind_method(D_METHOD("set_add_popup_path", "value"), &MatMakerGDEditor::set_add_popup_path);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "add_popup_path"), "set_add_popup_path", "get_add_popup_path");
|
||||
|
||||
void MatMakerGDEditor::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_graph_edit"), &MatMakerGDEditor::get_graph_edit);
|
||||
ClassDB::bind_method(D_METHOD("set_graph_edit", "value"), &MatMakerGDEditor::set_graph_edit);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "*_graph_edit", PROPERTY_HINT_RESOURCE_TYPE, "GraphEdit"), "set_graph_edit", "get_graph_edit");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_material"), &MatMakerGDEditor::get_material);
|
||||
ClassDB::bind_method(D_METHOD("set_material", "value"), &MatMakerGDEditor::set_material);
|
||||
@ -601,28 +343,17 @@ static void MatMakerGDEditor::_bind_methods() {
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_ignore_material_change_event"), &MatMakerGDEditor::get_ignore_material_change_event);
|
||||
ClassDB::bind_method(D_METHOD("set_ignore_material_change_event", "value"), &MatMakerGDEditor::set_ignore_material_change_event);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "_ignore_material_change_event"), "set_ignore_material_change_event", "get_ignore_material_change_event");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_recreation_in_progress"), &MatMakerGDEditor::get_recreation_in_progress);
|
||||
ClassDB::bind_method(D_METHOD("set_recreation_in_progress", "value"), &MatMakerGDEditor::set_recreation_in_progress);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "_recreation_in_progress"), "set_recreation_in_progress", "get_recreation_in_progress");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_plugin"), &MatMakerGDEditor::get_plugin);
|
||||
ClassDB::bind_method(D_METHOD("set_plugin", "value"), &MatMakerGDEditor::set_plugin);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "*_plugin", PROPERTY_HINT_RESOURCE_TYPE, "EditorPlugin"), "set_plugin", "get_plugin");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "recreation_in_progress"), "set_recreation_in_progress", "get_recreation_in_progress");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_undo_redo"), &MatMakerGDEditor::get_undo_redo);
|
||||
ClassDB::bind_method(D_METHOD("set_undo_redo", "value"), &MatMakerGDEditor::set_undo_redo);
|
||||
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "*_undo_redo", PROPERTY_HINT_RESOURCE_TYPE, "UndoRedo"), "set_undo_redo", "get_undo_redo");
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_enter_tree"), &MatMakerGDEditor::_enter_tree);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_plugin", "plugin"), &MatMakerGDEditor::set_plugin);
|
||||
ClassDB::bind_method(D_METHOD("get_undo_redo"), &MatMakerGDEditor::get_undo_redo);
|
||||
ClassDB::bind_method(D_METHOD("ensure_objs"), &MatMakerGDEditor::ensure_objs);
|
||||
ClassDB::bind_method(D_METHOD("recreate"), &MatMakerGDEditor::recreate);
|
||||
ClassDB::bind_method(D_METHOD("find_graph_node_for", "nnode"), &MatMakerGDEditor::find_graph_node_for);
|
||||
ClassDB::bind_method(D_METHOD("set_mmmaterial", "object"), &MatMakerGDEditor::set_mmmaterial);
|
||||
//ClassDB::bind_method(D_METHOD("find_graph_node_for", "nnode"), &MatMakerGDEditor::find_graph_node_for);
|
||||
ClassDB::bind_method(D_METHOD("set_mm_material", "object"), &MatMakerGDEditor::set_mm_material);
|
||||
ClassDB::bind_method(D_METHOD("on_material_changed"), &MatMakerGDEditor::on_material_changed);
|
||||
ClassDB::bind_method(D_METHOD("ignore_changes", "val"), &MatMakerGDEditor::ignore_changes);
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "core/ustring.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include "modules/material_maker/editor/mm_create_name_popup.h"
|
||||
#include "scene/gui/margin_container.h"
|
||||
|
||||
class GraphEdit;
|
||||
@ -16,22 +17,13 @@ class UndoRedo;
|
||||
class MMMaterial;
|
||||
class GraphNode;
|
||||
class MMGraphNode;
|
||||
class MMNode;
|
||||
|
||||
class MatMakerGDEditor : public MarginContainer {
|
||||
GDCLASS(MatMakerGDEditor, MarginContainer);
|
||||
|
||||
public:
|
||||
Variant get_Variant();
|
||||
void set_Variant(const Variant &val);
|
||||
|
||||
NodePath get_graph_edit_path();
|
||||
void set_graph_edit_path(const NodePath &val);
|
||||
|
||||
NodePath get_add_popup_path();
|
||||
void set_add_popup_path(const NodePath &val);
|
||||
|
||||
GraphEdit *get_graph_edit();
|
||||
void set_graph_edit(const GraphEdit *val);
|
||||
|
||||
Ref<MMMaterial> get_mm_material();
|
||||
void set_mm_material(const Ref<MMMaterial> &val);
|
||||
@ -39,43 +31,40 @@ public:
|
||||
int get_ignore_material_change_event() const;
|
||||
void set_ignore_material_change_event(const int val);
|
||||
|
||||
void ignore_changes(const bool val);
|
||||
|
||||
bool get_recreation_in_progress() const;
|
||||
void set_recreation_in_progress(const bool val);
|
||||
|
||||
EditorPlugin *get_plugin();
|
||||
void set_plugin(const EditorPlugin *val);
|
||||
|
||||
UndoRedo *get_undo_redo();
|
||||
void set_undo_redo(const UndoRedo *val);
|
||||
void set_undo_redo(UndoRedo *ur);
|
||||
|
||||
void _enter_tree();
|
||||
|
||||
void ensure_objs();
|
||||
void recreate();
|
||||
MMGraphNode *find_graph_node_for(const Ref<MMnode> &nnode);
|
||||
void set_mmmaterial(const Ref<MMMaterial> &object);
|
||||
MMGraphNode *find_graph_node_for(const Ref<MMNode> &nnode);
|
||||
|
||||
void on_material_changed();
|
||||
void ignore_changes(const bool val);
|
||||
|
||||
void on_graph_edit_connection_request(const String &from, const int from_slot, const String &to, const int to_slot);
|
||||
void on_graph_edit_disconnection_request(const String &from, const int from_slot, const String &to, const int to_slot);
|
||||
void on_graph_node_close_request(GraphNode *node);
|
||||
void on_graph_node_close_request(Node *node);
|
||||
void _on_AddButton_pressed();
|
||||
void _on_AddPopup_ok_pressed(const String &script_path);
|
||||
void _on_AddPopup_ok_pressed(const int type, const String &data);
|
||||
|
||||
MatMakerGDEditor();
|
||||
~MatMakerGDEditor();
|
||||
|
||||
protected:
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
|
||||
NodePath graph_edit_path;
|
||||
NodePath add_popup_path;
|
||||
GraphEdit *_graph_edit;
|
||||
Ref<MMMaterial> *_material;
|
||||
MMCreateNamePopup *_create_popup;
|
||||
Ref<MMMaterial> _material;
|
||||
int _ignore_material_change_event;
|
||||
bool _recreation_in_progress;
|
||||
EditorPlugin *_plugin;
|
||||
|
||||
private:
|
||||
UndoRedo *_undo_redo;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user