aboutsummaryrefslogtreecommitdiff
path: root/tools/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2014-07-07 17:44:21 -0300
committerJuan Linietsky2014-07-07 17:44:21 -0300
commit9ff6d55822647c87eef392147ea15641d0922d47 (patch)
tree4a132cccc1ecb9f7de27a94475363fcf527986c6 /tools/editor/plugins/canvas_item_editor_plugin.cpp
parent3d68949a1cc41b4865618bddde23122f66764ee1 (diff)
downloadgodot-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.cpp19
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) {