Commit bb8f0155 authored by ShyRed's avatar ShyRed Committed by Hein-Pieter van Braam-Stewart

Add converters / generators to Sprite

Adds the following menu options to the Sprite editor: "Convert to Mesh2D", "Convert to Polygon2D", "Create CollisionPolygon2D Sibling" and "Create LightOccluder2D Sibling"

(cherry picked from commit c218c631f62b154af41238782280dbb9b2e914f8)
parent 94f6c3a8
This diff is collapsed.
......@@ -41,9 +41,14 @@ class SpriteEditor : public Control {
GDCLASS(SpriteEditor, Control);
enum Menu {
Menu selected_menu_item;
Sprite *node;
MenuButton *options;
......@@ -55,7 +60,8 @@ class SpriteEditor : public Control {
ConfirmationDialog *debug_uv_dialog;
Control *debug_uv;
Vector<Vector2> uv_lines;
Vector<Vector<Vector2> > outline_lines;
Vector<Vector<Vector2> > computed_outline_lines;
Vector<Vector2> computed_vertices;
Vector<Vector2> computed_uv;
Vector<int> computed_indices;
......@@ -71,7 +77,14 @@ class SpriteEditor : public Control {
void _debug_uv_draw();
void _update_mesh_data();
void _create_mesh_node();
void _create_node();
void _convert_to_mesh_2d_node();
void _convert_to_polygon_2d_node();
void _create_collision_polygon_2d_node();
void _create_light_occluder_2d_node();
void _add_as_sibling_or_child(Node2D *p_own_node, Node2D *p_new_node);
void _node_removed(Node *p_node);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment