1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

Visual Shader Editing for 2D

Editing 2D shaders with visual editor seems to work now.
This commit is contained in:
Juan Linietsky
2015-01-20 20:25:19 -03:00
parent 79af805710
commit 11c1756257
12 changed files with 137 additions and 29 deletions

View File

@@ -191,6 +191,7 @@ class ShaderGraphEditor : public VBoxContainer {
ShaderGraphView *graph_edits[ShaderGraph::SHADER_TYPE_MAX];
static const char* node_names[ShaderGraph::NODE_TYPE_MAX];
bool _2d;
void _add_node(int p_type);
protected:
void _notification(int p_what);
@@ -198,13 +199,14 @@ protected:
public:
void edit(Ref<ShaderGraph> p_shader);
ShaderGraphEditor();
ShaderGraphEditor(bool p_2d);
};
class ShaderGraphEditorPlugin : public EditorPlugin {
OBJ_TYPE( ShaderGraphEditorPlugin, EditorPlugin );
bool _2d;
ShaderGraphEditor *shader_editor;
EditorNode *editor;
@@ -216,7 +218,7 @@ public:
virtual bool handles(Object *p_node) const;
virtual void make_visible(bool p_visible);
ShaderGraphEditorPlugin(EditorNode *p_node);
ShaderGraphEditorPlugin(EditorNode *p_node,bool p_2d);
~ShaderGraphEditorPlugin();
};