From 48c447a516e5ad451a5e4173d8834ffaacdbb212 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 11 Jul 2019 20:10:17 +0900 Subject: [PATCH] vector lottie: register node name as it's designed. Caller could find/access a specific node with the name. --- src/static_libs/vg_common/vg_common_json.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c index c24320261a..94df54eb2f 100644 --- a/src/static_libs/vg_common/vg_common_json.c +++ b/src/static_libs/vg_common/vg_common_json.c @@ -356,6 +356,7 @@ _update_vg_tree(Efl_Canvas_Vg_Container *root, const LOTLayerNode *layer, int de { ctree = efl_add(EFL_CANVAS_VG_CONTAINER_CLASS, root); efl_key_data_set(root, key, ctree); + if (clayer->name) efl_key_data_set(ctree, "_lot_node_name", clayer->name); } #if DEBUG for (int i = 0; i < depth; i++) printf(" "); @@ -440,6 +441,7 @@ vg_common_json_create_vg_node(Vg_File_Data *vfd) root = efl_add_ref(EFL_CANVAS_VG_CONTAINER_CLASS, NULL); if (!root) return EINA_FALSE; efl_key_data_set(root, _get_key_val((void *) tree), tree); + if (tree->name) efl_key_data_set(root, "_lot_node_name", tree->name); vfd->root = root; } efl_gfx_color_set(root, tree->mAlpha, tree->mAlpha, tree->mAlpha, tree->mAlpha);