diff options
| author | Juan Linietsky | 2014-07-07 17:44:21 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-07-07 17:44:21 -0300 |
| commit | 9ff6d55822647c87eef392147ea15641d0922d47 (patch) | |
| tree | 4a132cccc1ecb9f7de27a94475363fcf527986c6 /tools/editor/plugins/canvas_item_editor_plugin.cpp | |
| parent | 3d68949a1cc41b4865618bddde23122f66764ee1 (diff) | |
| download | godot-9ff6d55822647c87eef392147ea15641d0922d47.tar.gz godot-9ff6d55822647c87eef392147ea15641d0922d47.tar.zst godot-9ff6d55822647c87eef392147ea15641d0922d47.zip | |
Polygon2D
-=-=-=-=-
Another gift for those who make 2D games:
-Edit polygons, concave or convex, color them, texture them and uv-map them
-Corresponding editor
-Can have a custom pivot, so they are compatible with bones and IK
Diffstat (limited to 'tools/editor/plugins/canvas_item_editor_plugin.cpp')
| -rw-r--r-- | tools/editor/plugins/canvas_item_editor_plugin.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 10028a2f2..e2944af42 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -1770,6 +1770,25 @@ void CanvasItemEditor::_notification(int p_what) { } + for(List<BoneList>::Element *E=bone_list.front();E;E=E->next()) { + + Object *b = ObjectDB::get_instance(E->get().bone); + if (!b) { + viewport->update(); + break; + } + + Node2D *b2 = b->cast_to<Node2D>(); + if (!b2) { + continue; + } + + if (b2->get_global_transform()!=E->get().xform) { + + E->get().xform=b2->get_global_transform(); + viewport->update(); + } + } } if (p_what==NOTIFICATION_ENTER_SCENE) { |
