diff options
author | Hermet Park <chuneon.park@samsung.com> | 2020-03-19 18:47:36 +0900 |
---|---|---|
committer | Hermet Park <chuneon.park@samsung.com> | 2020-03-19 18:49:17 +0900 |
commit | 0583b143078c5b46fc887d40687e50d2640f82d3 (patch) | |
tree | 335256326d7c1cd5f1625d6c0a4e0014dd7be678 /src | |
parent | c4fad77ae3d1e2acbc8d0876edb614d861051dc8 (diff) | |
download | efl-0583b143078c5b46fc887d40687e50d2640f82d3.tar.gz |
canvas 3d: remove canvas3d edje
Summary: Remove functional stuff, leave as deprecated for compatibility.
Subscribers: cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D11541
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/edje/edje_player.c | 56 | ||||
-rw-r--r-- | src/lib/edje/Edje_Common.h | 18 | ||||
-rw-r--r-- | src/lib/edje/edje_cache.c | 9 | ||||
-rw-r--r-- | src/lib/edje/edje_calc.c | 332 | ||||
-rw-r--r-- | src/lib/edje/edje_data.c | 135 | ||||
-rw-r--r-- | src/lib/edje/edje_edit.c | 9 | ||||
-rw-r--r-- | src/lib/edje/edje_load.c | 139 | ||||
-rw-r--r-- | src/lib/edje/edje_part.c | 3 |
8 files changed, 8 insertions, 693 deletions
diff --git a/src/bin/edje/edje_player.c b/src/bin/edje/edje_player.c index d54dea9ed5..7d79ec0d7a 100644 --- a/src/bin/edje/edje_player.c +++ b/src/bin/edje/edje_player.c @@ -831,32 +831,14 @@ _edje_load_or_show_error(Evas_Object *edje, const char *file, const char *group) Eina_File *f = NULL; const char *errmsg; int err; - Evas_Canvas3D_Scene *scene = NULL; - Evas_Canvas3D_Node *root_node = NULL; f = eina_file_open(file, EINA_FALSE); - if (!(edje_mmap_3d_has(f, group))) + if (edje_object_file_set(edje, file, group)) { - if (edje_object_file_set(edje, file, group)) - { - edje_object_signal_callback_add(edje, "edje,change,file", "edje", _edje_reload, NULL); - evas_object_focus_set(edje, EINA_TRUE); - eina_file_close(f); - return EINA_TRUE; - } - } - else - { - if (edje_object_file_set(edje, file, group)) - { - if (edje_3d_object_add(edje, &root_node, scene)) - { - edje_object_signal_callback_add(edje, "edje,change,file", "edje", _edje_reload, NULL); - evas_object_focus_set(edje, EINA_TRUE); - eina_file_close(f); - return EINA_TRUE; - } - } + edje_object_signal_callback_add(edje, "edje,change,file", "edje", _edje_reload, NULL); + evas_object_focus_set(edje, EINA_TRUE); + eina_file_close(f); + return EINA_TRUE; } err = edje_object_load_error_get(edje); @@ -1026,7 +1008,6 @@ main(int argc, char **argv) Eina_Bool quit_option = EINA_FALSE; int args; Eina_List *groups; - Eina_File *f = NULL; const char *group; Ecore_Getopt_Value values[] = { ECORE_GETOPT_VALUE_STR(opts.group), @@ -1100,33 +1081,6 @@ main(int argc, char **argv) goto end; } - group = eina_list_data_get(eina_list_last(groups)); - - f = eina_file_open(opts.file, EINA_FALSE); - if (edje_mmap_3d_has(f, group)) - { - Eina_List *engine_list, *n; - Eina_Bool opengl_x11_has = EINA_FALSE, wayland_egl_has = EINA_FALSE; - const char *engine; - engine_list = ecore_evas_engines_get(); - EINA_LIST_FOREACH(engine_list, n, engine) - { - if (!strcmp(engine, "wayland_egl")) - { - wayland_egl_has = EINA_TRUE; - break; - } - else if (!strcmp(engine, "opengl_x11")) - opengl_x11_has = EINA_TRUE; - } - if (wayland_egl_has) - opts.engine = "wayland_egl"; - else if (opengl_x11_has) - opts.engine = "opengl_x11"; - } - eina_file_close(f); - edje_file_collection_list_free(groups); - if (opts.size.w <= 0) opts.size.w = 320; if (opts.size.h <= 0) opts.size.h = 240; win = ecore_evas_new(opts.engine, 0, 0, opts.size.w, opts.size.h, NULL); diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h index cdbc84b151..7a02281810 100644 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@ -1207,22 +1207,6 @@ typedef enum _Edje_Aspect_Control */ EAPI const char *edje_object_part_object_name_get(const Evas_Object *obj); -#ifdef EFL_BETA_API_SUPPORT - -/** - * @brief Creates scene and root node which contains all 3D parts of edje object. - * @param obj An edje part object - * @param root node to collect all 3D parts - * @param scene - * @return scene and root node which contains all 3D parts of edje object - * @note If this function returns @c EINA_FALSE, @p the scene or the root - * node wasn't made - * @since 1.18 - */ -EAPI Eina_Bool edje_3d_object_add(Evas_Object *obj, Eo **root_node, Eo *scene); - -#endif - /** * @} */ @@ -1837,7 +1821,7 @@ EAPI Eina_Bool edje_mmap_group_exists(Eina_File *f, const char *glob); * * @since 1.18 */ -EAPI Eina_Bool edje_mmap_3d_has(Eina_File *f, const char *group); +EINA_DEPRECATED EAPI Eina_Bool edje_mmap_3d_has(Eina_File *f, const char *group); /** * @brief Iterates over all the opened Edje files. diff --git a/src/lib/edje/edje_cache.c b/src/lib/edje/edje_cache.c index e58584cba4..8afe284e7a 100644 --- a/src/lib/edje/edje_cache.c +++ b/src/lib/edje/edje_cache.c @@ -40,9 +40,6 @@ edje_cache_emp_alloc(Edje_Part_Collection_Directory_Entry *ce) INIT_EMP_BOTH(EXTERNAL, Edje_Part_Description_External, ce); INIT_EMP_BOTH(SPACER, Edje_Part_Description_Common, ce); INIT_EMP_BOTH(SNAPSHOT, Edje_Part_Description_Snapshot, ce); - INIT_EMP_BOTH(MESH_NODE, Edje_Part_Description_Mesh_Node, ce); - INIT_EMP_BOTH(LIGHT, Edje_Part_Description_Light, ce); - INIT_EMP_BOTH(CAMERA, Edje_Part_Description_Camera, ce); INIT_EMP_BOTH(VECTOR, Edje_Part_Description_Vector, ce); INIT_EMP(part, Edje_Part, ce); } @@ -66,9 +63,6 @@ edje_cache_emp_free(Edje_Part_Collection_Directory_Entry *ce) eina_mempool_del(ce->mp->mp.EXTERNAL); eina_mempool_del(ce->mp->mp.SPACER); eina_mempool_del(ce->mp->mp.SNAPSHOT); - eina_mempool_del(ce->mp->mp.MESH_NODE); - eina_mempool_del(ce->mp->mp.LIGHT); - eina_mempool_del(ce->mp->mp.CAMERA); eina_mempool_del(ce->mp->mp.VECTOR); eina_mempool_del(ce->mp->mp.part); memset(&ce->mp->mp, 0, sizeof(ce->mp->mp)); @@ -85,9 +79,6 @@ edje_cache_emp_free(Edje_Part_Collection_Directory_Entry *ce) eina_mempool_del(ce->mp->mp_rtl.EXTERNAL); eina_mempool_del(ce->mp->mp_rtl.SPACER); eina_mempool_del(ce->mp->mp_rtl.SNAPSHOT); - eina_mempool_del(ce->mp->mp_rtl.MESH_NODE); - eina_mempool_del(ce->mp->mp_rtl.LIGHT); - eina_mempool_del(ce->mp->mp_rtl.CAMERA); eina_mempool_del(ce->mp->mp_rtl.VECTOR); memset(&ce->mp->mp_rtl, 0, sizeof(ce->mp->mp_rtl)); diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c index f3dd13be85..1a88b23d0e 100644 --- a/src/lib/edje/edje_calc.c +++ b/src/lib/edje/edje_calc.c @@ -45,55 +45,6 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Rea #endif - -#define SET_QUATERNION(type) \ - double norm; \ - Eina_Quaternion quaternion; \ - \ - eina_quaternion_set(&quaternion, pd_##type->type.orientation.data[0], \ - pd_##type->type.orientation.data[1], \ - pd_##type->type.orientation.data[2], \ - pd_##type->type.orientation.data[3]); \ - \ - norm = eina_quaternion_norm(&quaternion); \ - \ - if ((norm - 0.0) <= TYPE_EPSILON) \ - ERR("%s %s", \ - "{0, 0, 0, 0} quaternion gives rotation on non-zero angle", \ - "around axis without orientation"); \ - \ - eina_quaternion_scale(&quaternion, &quaternion, 1/norm); \ - \ - evas_canvas3d_node_orientation_set(ep->node, quaternion.x, quaternion.y, \ - quaternion.z, quaternion.w); - -#define SET_LOOK_AT(type) \ - evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, \ - pd_##type->type.orientation.data[0], \ - pd_##type->type.orientation.data[1], \ - pd_##type->type.orientation.data[2], \ - pd_##type->type.position.space, \ - pd_##type->type.orientation.data[3], \ - pd_##type->type.orientation.data[4], \ - pd_##type->type.orientation.data[5]); - -#define SET_LOOK_TO(type) \ - Edje_Real_Part *look_to; \ - Evas_Real x, y ,z; \ - look_to = ed->table_parts[pd_##type->type.orientation.look_to % ed->table_parts_size]; \ - evas_canvas3d_node_position_get(look_to->node, pd_##type->type.position.space, &x, &y, &z); \ - evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, x, y, z, \ - pd_##type->type.position.space, \ - pd_##type->type.orientation.data[3], \ - pd_##type->type.orientation.data[4], \ - pd_##type->type.orientation.data[5]); - -#define SET_ANGLE_AXIS(type) \ - evas_canvas3d_node_orientation_angle_axis_set(ep->node, pd_##type->type.orientation.data[0], \ - pd_##type->type.orientation.data[1], \ - pd_##type->type.orientation.data[2], \ - pd_##type->type.orientation.data[3]); - void _edje_calc_params_clear(Edje_Calc_Params *p) { @@ -357,9 +308,6 @@ case EDJE_PART_TYPE_##Short: \ POPULATE_MEMSIZE_RTL(BOX, Box); POPULATE_MEMSIZE_RTL(TABLE, Table); POPULATE_MEMSIZE_RTL(EXTERNAL, External); - POPULATE_MEMSIZE_RTL(CAMERA, Camera); - POPULATE_MEMSIZE_RTL(LIGHT, Light); - POPULATE_MEMSIZE_RTL(MESH_NODE, Mesh_Node); POPULATE_MEMSIZE_RTL(VECTOR, Vector); } #undef POPULATE_MEMSIZE_RTL @@ -460,9 +408,6 @@ case EDJE_PART_TYPE_##Short: \ EDIT_ALLOC_POOL_RTL(BOX, Box, box); EDIT_ALLOC_POOL_RTL(TABLE, Table, table); EDIT_ALLOC_POOL_RTL(EXTERNAL, External, external_params); - EDIT_ALLOC_POOL_RTL(CAMERA, Camera, camera); - EDIT_ALLOC_POOL_RTL(LIGHT, Light, light); - EDIT_ALLOC_POOL_RTL(MESH_NODE, Mesh_Node, mesh_node); EDIT_ALLOC_POOL_RTL(VECTOR, Vector, vector); } @@ -2897,43 +2842,6 @@ _edje_part_recalc_single_text0(Edje_Calc_Params *params, } static void -_edje_part_recalc_single_light0(Edje_Calc_Params *params, - Edje_Part_Description_Light *light_desc) -{ - _edje_calc_params_need_type_node(params); - params->type.node->data[0] = light_desc->light.orientation.data[0]; - params->type.node->point.x = light_desc->light.position.point.x; - params->type.node->point.y = light_desc->light.position.point.y; - params->type.node->point.z = light_desc->light.position.point.z; -} - -static void -_edje_part_recalc_single_camera0(Edje_Calc_Params *params, - Edje_Part_Description_Camera *camera_desc) -{ - _edje_calc_params_need_type_node(params); - params->type.node->data[0] = camera_desc->camera.orientation.data[0]; - params->type.node->point.x = camera_desc->camera.position.point.x; - params->type.node->point.y = camera_desc->camera.position.point.y; - params->type.node->point.z = camera_desc->camera.position.point.z; -} - -static void -_edje_part_recalc_single_mesh0(Edje_Calc_Params *params, - Edje_Part_Description_Mesh_Node *mesh_desc) -{ - _edje_calc_params_need_type_node(params); - params->type.node->frame = mesh_desc->mesh_node.mesh.frame; - params->type.node->data[0] = mesh_desc->mesh_node.orientation.data[0]; - params->type.node->point.x = mesh_desc->mesh_node.position.point.x; - params->type.node->point.y = mesh_desc->mesh_node.position.point.y; - params->type.node->point.z = mesh_desc->mesh_node.position.point.z; - params->type.node->scale_3d.x = mesh_desc->mesh_node.scale_3d.x; - params->type.node->scale_3d.y = mesh_desc->mesh_node.scale_3d.y; - params->type.node->scale_3d.z = mesh_desc->mesh_node.scale_3d.z; -} - -static void _edje_table_recalc_apply(Edje *ed EINA_UNUSED, Edje_Real_Part *ep, Edje_Calc_Params *p3 EINA_UNUSED, @@ -3095,15 +3003,6 @@ _edje_part_recalc_single(Edje *ed, // image. proxy, snapshot share this filter recalc, so fall through _edje_part_recalc_single_filter(ed, ep, desc, chosen_desc, pos); break; - case EDJE_PART_TYPE_LIGHT: - _edje_part_recalc_single_light0(params, (Edje_Part_Description_Light *)desc); - break; - case EDJE_PART_TYPE_CAMERA: - _edje_part_recalc_single_camera0(params, (Edje_Part_Description_Camera *)desc); - break; - case EDJE_PART_TYPE_MESH_NODE: - _edje_part_recalc_single_mesh0(params, (Edje_Part_Description_Mesh_Node *)desc); - break; case EDJE_PART_TYPE_SPACER: case EDJE_PART_TYPE_RECTANGLE: case EDJE_PART_TYPE_SWALLOW: @@ -4038,19 +3937,6 @@ _edje_part_calc_params_memcpy(Edje_Calc_Params *p, Edje_Calc_Params *s, Edje_Par else p->type.text = NULL; } break; - case EDJE_PART_TYPE_LIGHT: - case EDJE_PART_TYPE_CAMERA: - case EDJE_PART_TYPE_MESH_NODE: - { - Edje_Calc_Params_Type_Node *d = malloc(sizeof(*d)); - if (d) - { - memcpy(d, s->type.node, sizeof(*d)); - p->type.node = d; - } - else p->type.node = NULL; - } - break; default: break; } @@ -4717,33 +4603,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta p3->type.text->align.y = FFP(p1->type.text->align.y, p2->type.text->align.y, pos); p3->type.text->ellipsis = TO_DOUBLE(FINTP(p1->type.text->ellipsis, p2->type.text->ellipsis, pos2)); break; - case EDJE_PART_TYPE_MESH_NODE: - _edje_calc_params_need_type_node(p3); - p3->type.node->frame = INTP(p1->type.node->frame, p2->type.node->frame, pos); - p3->type.node->data[0] = INTP(p1->type.node->data[0], p2->type.node->data[0], pos); - - p3->type.node->point.x = FFP(p1->type.node->point.x, p2->type.node->point.x, pos); - p3->type.node->point.y = FFP(p1->type.node->point.y, p2->type.node->point.y, pos); - p3->type.node->point.z = FFP(p1->type.node->point.z, p2->type.node->point.z, pos); - - p3->type.node->scale_3d.x = FFP(p1->type.node->scale_3d.x, p2->type.node->scale_3d.x, pos); - p3->type.node->scale_3d.y = FFP(p1->type.node->scale_3d.y, p2->type.node->scale_3d.y, pos); - p3->type.node->scale_3d.z = FFP(p1->type.node->scale_3d.z, p2->type.node->scale_3d.z, pos); - break; - case EDJE_PART_TYPE_CAMERA: - p3->type.node->data[0] = FFP(p1->type.node->data[0], p2->type.node->data[0], pos); - - p3->type.node->point.x = FFP(p1->type.node->point.x, p2->type.node->point.x, pos); - p3->type.node->point.y = FFP(p1->type.node->point.y, p2->type.node->point.y, pos); - p3->type.node->point.z = FFP(p1->type.node->point.z, p2->type.node->point.z, pos); - break; - case EDJE_PART_TYPE_LIGHT: - p3->type.node->data[0] = FFP(p1->type.node->data[0], p2->type.node->data[0], pos); - - p3->type.node->point.x = FFP(p1->type.node->point.x, p2->type.node->point.x, pos); - p3->type.node->point.y = FFP(p1->type.node->point.y, p2->type.node->point.y, pos); - p3->type.node->point.z = FFP(p1->type.node->point.z, p2->type.node->point.z, pos); - break; } /* mapped is a special case like visible */ @@ -5020,197 +4879,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta case EDJE_PART_TYPE_SPACER: /* We really should do nothing on SPACER part */ break; - case EDJE_PART_TYPE_CAMERA: - { - Evas_Object *viewport; - Evas_Canvas3D_Camera *camera = NULL; - Edje_Part_Description_Camera *pd_camera; - - efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(pf->req.w, pf->req.h)); - - pd_camera = (Edje_Part_Description_Camera*) ep->chosen_description; - - efl_gfx_entity_position_set(ep->object, EINA_POSITION2D(ed->x + pf->final.x, ed->y + pf->final.y)), - efl_gfx_entity_size_set(ep->object, EINA_SIZE2D(pf->final.w, pf->final.h)); - - viewport = evas_object_image_source_get(ep->object); - - efl_gfx_entity_size_set(viewport, EINA_SIZE2D(pf->req.w, pf->req.h)); - - evas_object_image_source_visible_set(ep->object, EINA_FALSE); - evas_object_image_source_events_set(ep->object, EINA_TRUE); - evas_object_show(ep->object); - - camera = evas_canvas3d_node_camera_get(ep->node); - - evas_canvas3d_camera_projection_perspective_set(camera, pd_camera->camera.camera.fovy, pd_camera->camera.camera.aspect, pd_camera->camera.camera.frustum_near, pd_camera->camera.camera.frustum_far); - - _edje_calc_params_need_type_node(pf); - evas_canvas3d_node_position_set(ep->node, pf->type.node->point.x, pf->type.node->point.y, pf->type.node->point.z); - switch (pd_camera->camera.orientation.type) - { - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_QUATERNION: - { - SET_QUATERNION(camera) - break; - } - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_AT: - SET_LOOK_AT(camera) - break; - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_TO: - { - SET_LOOK_TO(camera) - break; - } - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_ANGLE_AXIS: - SET_ANGLE_AXIS(camera) - break; - } - break; - } - case EDJE_PART_TYPE_LIGHT: - { - Evas_Canvas3D_Light *light_node = NULL; - Edje_Part_Description_Light *pd_light; - - pd_light = (Edje_Part_Description_Light*) ep->chosen_description; - light_node = evas_canvas3d_node_light_get(ep->node); - - evas_canvas3d_light_ambient_set(light_node, (float) pd_light->light.properties.ambient.r / 255, (float) pd_light->light.properties.ambient.g / 255, (float) pd_light->light.properties.ambient.b / 255, (float) pd_light->light.properties.ambient.a / 255); - evas_canvas3d_light_diffuse_set(light_node, (float) pd_light->light.properties.diffuse.r / 255, (float) pd_light->light.properties.diffuse.g / 255, (float) pd_light->light.properties.diffuse.b / 255, (float) pd_light->light.properties.diffuse.a / 255); - evas_canvas3d_light_specular_set(light_node, (float) pd_light->light.properties.specular.r / 255, (float) pd_light->light.properties.specular.g / 255, (float) pd_light->light.properties.specular.b / 255, (float) pd_light->light.properties.specular.a / 255); - evas_canvas3d_light_directional_set(light_node, EINA_TRUE); - evas_canvas3d_light_projection_perspective_set(light_node, pd_light->light.light.fovy, pd_light->light.light.aspect, pd_light->light.light.frustum_near, pd_light->light.light.frustum_far); - - _edje_calc_params_need_type_node(pf); - evas_canvas3d_node_position_set(ep->node, pf->type.node->point.x, pf->type.node->point.y, pf->type.node->point.z); - switch (pd_light->light.orientation.type) - { - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_QUATERNION: - { - SET_QUATERNION(light); - break; - } - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_AT: - SET_LOOK_AT(light) - break; - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_TO: - { - SET_LOOK_TO(light) - break; - } - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_ANGLE_AXIS: - SET_ANGLE_AXIS(light) - break; - } - break; - } - case EDJE_PART_TYPE_MESH_NODE: - { - Evas_Canvas3D_Material *material = NULL; - Evas_Canvas3D_Texture *texture = NULL; - Evas_Canvas3D_Mesh *mesh = NULL; - const char *proxy; - Edje_Part_Description_Mesh_Node *pd_mesh_node; - const Eina_List *meshes; - const Eina_List *list; - Eina_Bool frame_exist; - - meshes = evas_canvas3d_node_mesh_list_get(ep->node); - - EINA_LIST_FOREACH(meshes, list, mesh) - { - material = evas_canvas3d_mesh_frame_material_get(mesh, 0); - texture = evas_canvas3d_material_texture_get(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE); - - pd_mesh_node = (Edje_Part_Description_Mesh_Node*) ep->chosen_description; - - evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE); - evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE); - evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE); - evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, pd_mesh_node->mesh_node.properties.normal); - evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, (float) pd_mesh_node->mesh_node.properties.ambient.r / 255, (float) pd_mesh_node->mesh_node.properties.ambient.g / 255, (float) pd_mesh_node->mesh_node.properties.ambient.b / 255, (float) pd_mesh_node->mesh_node.properties.ambient.a / 255); - evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, (float) pd_mesh_node->mesh_node.properties.diffuse.r / 255, (float) pd_mesh_node->mesh_node.properties.diffuse.g / 255, (float) pd_mesh_node->mesh_node.properties.diffuse.b / 255, (float) pd_mesh_node->mesh_node.properties.diffuse.a / 255); - evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, (float) pd_mesh_node->mesh_node.properties.specular.r / 255, (float) pd_mesh_node->mesh_node.properties.specular.g / 255, (float) pd_mesh_node->mesh_node.properties.specular.b / 255, (float) pd_mesh_node->mesh_node.properties.specular.a / 255); - evas_canvas3d_material_shininess_set(material, pd_mesh_node->mesh_node.properties.shininess); - - switch(pd_mesh_node->mesh_node.mesh.primitive) - { - case EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE: - case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE: - { - Eo *primitive = NULL; - primitive = efl_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base.evas); - evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive); - - _edje_calc_params_need_type_node(pf); - frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node->frame); - if (!frame_exist) - { - evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node->frame, material); - } - evas_canvas3d_mesh_from_primitive_set(mesh, 0, primitive); - break; - } - default: - break; - } - - if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured) - { - proxy = NULL; - - texture = evas_canvas3d_material_texture_get(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE); - - //proxy = _edje_image_name_find(ed, pd_mesh_node->mesh_node.texture.id); - /*FIXME Conflict with function _edje_image_name_find (two places in edje_utils and edje_edit.c, - temporary desicion need to clarify up to commit to phab*/ - proxy = ed->file->image_dir->entries[pd_mesh_node->mesh_node.texture.id].entry; - if (proxy) - { - efl_file_simple_mmap_load(texture, ed->file->f, proxy); - evas_canvas3d_texture_filter_set(texture, pd_mesh_node->mesh_node.texture.filter1, pd_mesh_node->mesh_node.texture.filter2); - evas_canvas3d_texture_wrap_set(texture, pd_mesh_node->mesh_node.texture.wrap1, pd_mesh_node->mesh_node.texture.wrap2); - } - } - - _edje_calc_params_need_type_node(pf); - frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node->frame); - if (!frame_exist) - { - evas_canvas3d_mesh_frame_add(mesh, pf->type.node->frame); - evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node->frame, material); - } - evas_canvas3d_mesh_shader_mode_set(mesh, pd_mesh_node->mesh_node.properties.shade); - evas_canvas3d_mesh_vertex_assembly_set(mesh, pd_mesh_node->mesh_node.mesh.assembly); - evas_canvas3d_node_mesh_frame_set(ep->node, mesh, pf->type.node->frame); - evas_canvas3d_node_scale_set(ep->node, pf->type.node->scale_3d.x, pf->type.node->scale_3d.y, pf->type.node->scale_3d.z); - evas_canvas3d_node_position_set(ep->node, pf->type.node->point.x, pf->type.node->point.y, pf->type.node->point.z); - switch (pd_mesh_node->mesh_node.orientation.type) - { - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_QUATERNION: - { - SET_QUATERNION(mesh_node) - break; - } - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_AT: - SET_LOOK_AT(mesh_node) - break; - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_LOOK_TO: - { - SET_LOOK_TO(mesh_node) - break; - } - case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_ANGLE_AXIS: - SET_ANGLE_AXIS(mesh_node) - break; - } - } - break; - } } /* Some object need special recalc. */ diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c index b0b7962a8a..8b07c9dc13 100644 --- a/src/lib/edje/edje_data.c +++ b/src/lib/edje/edje_data.c @@ -54,12 +54,6 @@ Eet_Data_Descriptor *_edje_edd_edje_part_description_textblock = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_box = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_table = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_external = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_3d_color = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_3d_offset = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_3d_vec = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_mesh_node = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_light = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_camera = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_variant_list = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_rectangle_pointer = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_snapshot_pointer = NULL; @@ -73,9 +67,6 @@ Eet_Data_Descriptor *_edje_edd_edje_part_description_textblock_pointer = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_box_pointer = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_table_pointer = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_external_pointer = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_mesh_node_pointer = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_light_pointer = NULL; -Eet_Data_Descriptor *_edje_edd_edje_part_description_camera_pointer = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_description_filter_data = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_image_id = NULL; Eet_Data_Descriptor *_edje_edd_edje_part_image_id_pointer = NULL; @@ -127,9 +118,6 @@ EMP(BOX, box) EMP(TABLE, table) EMP(EXTERNAL, external) EMP(SPACER, spacer) -EMP(MESH_NODE, mesh_node) -EMP(LIGHT, light) -EMP(CAMERA, camera) EMP(SNAPSHOT, snapshot) EMP(VECTOR, vector) #undef EMP @@ -178,9 +166,6 @@ struct { EDJE_PART_TYPE_EXTERNAL, "external" }, { EDJE_PART_TYPE_PROXY, "proxy" }, { EDJE_PART_TYPE_SPACER, "spacer" }, - { EDJE_PART_TYPE_MESH_NODE, "mesh_node" }, - { EDJE_PART_TYPE_LIGHT, "light" }, - { EDJE_PART_TYPE_CAMERA, "camera" }, { EDJE_PART_TYPE_SNAPSHOT, "snapshot" }, { EDJE_PART_TYPE_VECTOR, "vector" } }; @@ -298,14 +283,8 @@ _edje_edd_shutdown(void) FREED(_edje_edd_edje_part_description_box); FREED(_edje_edd_edje_part_description_table); FREED(_edje_edd_edje_part_description_external); - FREED(_edje_edd_edje_part_description_mesh_node); - FREED(_edje_edd_edje_part_description_light); FREED(_edje_edd_edje_part_description_vector); FREED(_edje_edd_edje_part_description_vector_pointer); - FREED(_edje_edd_edje_part_description_camera); - FREED(_edje_edd_edje_part_description_3d_color); - FREED(_edje_edd_edje_part_description_3d_offset); - FREED(_edje_edd_edje_part_description_3d_vec); FREED(_edje_edd_edje_part_description_variant_list); FREED(_edje_edd_edje_part_description_rectangle_pointer); FREED(_edje_edd_edje_part_description_snapshot_pointer); @@ -319,9 +298,6 @@ _edje_edd_shutdown(void) FREED(_edje_edd_edje_part_description_box_pointer); FREED(_edje_edd_edje_part_description_table_pointer); FREED(_edje_edd_edje_part_description_external_pointer); - FREED(_edje_edd_edje_part_description_mesh_node_pointer); - FREED(_edje_edd_edje_part_description_light_pointer); - FREED(_edje_edd_edje_part_description_camera_pointer); FREED(_edje_edd_edje_part_description_filter_data); FREED(_edje_edd_edje_part_image_id); FREED(_edje_edd_edje_part_image_id_pointer); @@ -494,31 +470,6 @@ _edje_edd_init(void) eet_data_descriptor_file_new(&eddc); EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_vibration_directory, Edje_Vibration_Directory, "samples", samples, _edje_edd_edje_vibration_sample); - /* color structure for ambient, diffuse and specular colors */ - EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Color); - _edje_edd_edje_part_description_3d_color = - eet_data_descriptor_file_new(&eddc); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_color, Edje_Color, "r", r, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_color, Edje_Color, "g", g, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_color, Edje_Color, "b", b, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_color, Edje_Color, "a", a, EET_T_UCHAR); - - /* offset (vector of integer values) */ - EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_3D_Int_Vec); - _edje_edd_edje_part_description_3d_offset = - eet_data_descriptor_file_new(&eddc); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_offset, Edje_3D_Int_Vec, "x", x, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_offset, Edje_3D_Int_Vec, "y", y, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_offset, Edje_3D_Int_Vec, "z", z, EET_T_INT); - - /* vector of float values */ - EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_3D_Vec); - _edje_edd_edje_part_description_3d_vec = - eet_data_descriptor_file_new(&eddc); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_vec, Edje_3D_Vec, "x", x, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_vec, Edje_3D_Vec, "y", y, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_3d_vec, Edje_3D_Vec, "z", z, EDJE_T_FLOAT); - /* Efl.Gfx.Filter */ EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Gfx_Filter); _edje_edd_edje_filter = eet_data_descriptor_file_new(&eddc); @@ -547,9 +498,6 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.EXTERNAL", count.EXTERNAL, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.SPACER", count.SPACER, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.SNAPSHOT", count.SNAPSHOT, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.MESH_NODE", count.MESH_NODE, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.LIGHT", count.LIGHT, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.CAMERA", count.CAMERA, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.VECTOR", count.VECTOR, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "count.part", count.part, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection_directory_entry, Edje_Part_Collection_Directory_Entry, "group_alias", group_alias, EET_T_UCHAR); @@ -672,7 +620,6 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "name", name, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "signal", signal, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "source", source, EET_T_STRING); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "source_3d_id", source_3d_id, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "filter_part", filter.part, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "filter_state", filter.state, EET_T_STRING); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "in.from", in.from, EET_T_DOUBLE); @@ -758,7 +705,6 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "limit", limit, EET_T_CHAR); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.x", align.x, EDJE_T_FLOAT); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.y", align.y, EDJE_T_FLOAT); \ - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", align_3d, _edje_edd_edje_part_description_3d_vec); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", fixed.w, EET_T_UCHAR); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", fixed.h, EET_T_UCHAR); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "user_set.fixed", user_set.fixed, EET_T_UCHAR); \ @@ -858,7 +804,6 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "visible", Dec.visible, EET_T_CHAR); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.x", Dec.align.x, EDJE_T_FLOAT); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "align.y", Dec.align.y, EDJE_T_FLOAT); \ - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(Edd, Type, "align_3d", Dec.align_3d, _edje_edd_edje_part_description_3d_vec); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.w", Dec.fixed.w, EET_T_UCHAR); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "fixed.h", Dec.fixed.h, EET_T_UCHAR); \ EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "user_set.fixed", Dec.user_set.fixed, EET_T_UCHAR); \ @@ -1018,77 +963,6 @@ _edje_edd_init(void) eet_data_descriptor_file_new(&eddc); EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, common); - EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Mesh_Node); - eddc.func.mem_free = mem_free_mesh_node; - eddc.func.mem_alloc = mem_alloc_mesh_node; - _edje_edd_edje_part_description_mesh_node = - eet_data_descriptor_file_new(&eddc); - EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, common); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.position.point", mesh_node.position.point, _edje_edd_edje_part_description_3d_vec); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.position.space", mesh_node.position.space, EET_T_CHAR); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.properties.ambient", mesh_node.properties.ambient, _edje_edd_edje_part_description_3d_color); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.properties.diffuse", mesh_node.properties.diffuse, _edje_edd_edje_part_description_3d_color); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.properties.specular", mesh_node.properties.specular, _edje_edd_edje_part_description_3d_color); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.properties.material_attrib", mesh_node.properties.material_attrib, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.properties.normal", mesh_node.properties.normal, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.properties.shininess", mesh_node.properties.shininess, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.properties.shade", mesh_node.properties.shade, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.aabb1.relative", mesh_node.aabb1.relative, _edje_edd_edje_part_description_3d_vec); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.aabb1.offset", mesh_node.aabb1.offset, _edje_edd_edje_part_description_3d_offset); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.aabb1.rel_to", mesh_node.aabb1.rel_to, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.aabb2.relative", mesh_node.aabb2.relative, _edje_edd_edje_part_description_3d_vec); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.aabb2.offset", mesh_node.aabb2.offset, _edje_edd_edje_part_description_3d_offset); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.aabb2.rel_to", mesh_node.aabb2.rel_to, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.orientation.type", mesh_node.orientation.type, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED_LOOK(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, mesh_node); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.scale_3d", mesh_node.scale_3d, _edje_edd_edje_part_description_3d_vec); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.id", mesh_node.texture.id, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.set", mesh_node.texture.set, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.wrap1", mesh_node.texture.wrap1, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.wrap2", mesh_node.texture.wrap2, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.filter1", mesh_node.texture.filter1, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.filter2", mesh_node.texture.filter2, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.need_texture", mesh_node.texture.need_texture, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.texture.textured", mesh_node.texture.textured, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.mesh.primitive", mesh_node.mesh.primitive, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.mesh.assembly", mesh_node.mesh.assembly, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.mesh.id", mesh_node.mesh.id, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.mesh.set", mesh_node.mesh.set, EET_T_UCHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, "mesh_node.mesh.frame", mesh_node.mesh.frame, EET_T_INT); - - EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Light); - eddc.func.mem_free = mem_free_light; - eddc.func.mem_alloc = mem_alloc_light; - _edje_edd_edje_part_description_light = - eet_data_descriptor_file_new(&eddc); - EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, common); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.position.point", light.position.point, _edje_edd_edje_part_description_3d_vec); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.position.space", light.position.space, EET_T_CHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.orientation.type", light.orientation.type, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED_LOOK(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, light); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.properties.ambient", light.properties.ambient, _edje_edd_edje_part_description_3d_color); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.properties.diffuse", light.properties.diffuse, _edje_edd_edje_part_description_3d_color); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.properties.specular", light.properties.specular, _edje_edd_edje_part_description_3d_color); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.light.perspective.fovy", light.light.fovy, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.light.perspective.aspect", light.light.aspect, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.light.perspective.near", light.light.frustum_near, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_light, Edje_Part_Description_Light, "light.light.perspective.far", light.light.frustum_far, EDJE_T_FLOAT); - - EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Camera); - eddc.func.mem_free = mem_free_camera; - eddc.func.mem_alloc = mem_alloc_camera; - _edje_edd_edje_part_description_camera = - eet_data_descriptor_file_new(&eddc); - EDJE_DATA_DESCRIPTOR_DESCRIPTION_COMMON_SUB(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, common); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, "camera.position.point", camera.position.point, _edje_edd_edje_part_description_3d_vec); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, "camera.position.space", camera.position.space, EET_T_CHAR); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, "camera.orientation.type", camera.orientation.type, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_SUB_NESTED_LOOK(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, camera); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, "camera.camera.perspective.fovy", camera.camera.fovy, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, "camera.camera.perspective.aspect", camera.camera.aspect, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, "camera.camera.perspective.near", camera.camera.frustum_near, EDJE_T_FLOAT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_camera, Edje_Part_Description_Camera, "camera.camera.perspective.far", camera.camera.frustum_far, EDJE_T_FLOAT); - EDJE_DEFINE_POINTER_TYPE(Part_Image_Id, part_image_id); EET_DATA_DESCRIPTOR_ADD_VAR_ARRAY(_edje_edd_edje_part_description_image, Edje_Part_Description_Image, "image.tweens", image.tweens, _edje_edd_edje_part_image_id_pointer); @@ -1259,9 +1133,6 @@ _edje_edd_init(void) EDJE_DEFINE_POINTER_TYPE(Part_Description_Box, part_description_box); EDJE_DEFINE_POINTER_TYPE(Part_Description_Table, part_description_table); EDJE_DEFINE_POINTER_TYPE(Part_Description_External, part_description_external); - EDJE_DEFINE_POINTER_TYPE(Part_Description_Mesh_Node, part_description_mesh_node); - EDJE_DEFINE_POINTER_TYPE(Part_Description_Camera, part_description_camera); - EDJE_DEFINE_POINTER_TYPE(Part_Description_Light, part_description_light); EDJE_DEFINE_POINTER_TYPE(Part_Description_Vector, part_description_vector); eddc.version = EET_DATA_DESCRIPTOR_CLASS_VERSION; @@ -1281,9 +1152,6 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "box", _edje_edd_edje_part_description_box); EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "table", _edje_edd_edje_part_description_table); EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "external", _edje_edd_edje_part_description_external); - EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "mesh_node", _edje_edd_edje_part_description_mesh_node); - EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "light", _edje_edd_edje_part_description_light); - EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "camera", _edje_edd_edje_part_description_camera); EET_DATA_DESCRIPTOR_ADD_MAPPING(_edje_edd_edje_part_description_variant, "vector", _edje_edd_edje_part_description_vector); #define EDJE_ADD_ARRAY_MAPPING(Variant, Type, Minus) \ @@ -1311,9 +1179,6 @@ _edje_edd_init(void) EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "box", box); EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "table", table); EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "external", external); - EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "mesh_node", mesh_node); - EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "light", light); - EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "camera", camera); EDJE_ADD_ARRAY_MAPPING(_edje_edd_edje_part_description_variant_list, "vector", vector); EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Pack_Element); diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c index 1aa5eb8633..1dad199055 100644 --- a/src/lib/edje/edje_edit.c +++ b/src/lib/edje/edje_edit.c @@ -1693,9 +1693,6 @@ _mempools_add(Edje_Part_Collection_Directory_Entry *de) EDIT_EMN(EXTERNAL, Edje_Part_Description_External, de); EDIT_EMN(SPACER, Edje_Part_Description_Common, de); EDIT_EMN(SNAPSHOT, Edje_Part_Description_Snapshot, de); - EDIT_EMN(MESH_NODE, Edje_Part_Description_Mesh_Node, de); - EDIT_EMN(LIGHT, Edje_Part_Description_Light, de); - EDIT_EMN(CAMERA, Edje_Part_Description_Camera, de); EDIT_EMN(part, Edje_Part, de); EDIT_EMNP(RECTANGLE, Edje_Part_Description_Common, de); @@ -1710,9 +1707,6 @@ _mempools_add(Edje_Part_Collection_Directory_Entry *de) EDIT_EMNP(EXTERNAL, Edje_Part_Description_External, de); EDIT_EMNP(SPACER, Edje_Part_Description_Common, de); EDIT_EMNP(SNAPSHOT, Edje_Part_Description_Snapshot, de); - EDIT_EMNP(MESH_NODE, Edje_Part_Description_Mesh_Node, de); - EDIT_EMNP(LIGHT, Edje_Part_Description_Light, de); - EDIT_EMNP(CAMERA, Edje_Part_Description_Camera, de); } EAPI Eina_Bool @@ -6435,9 +6429,6 @@ edje_edit_state_add(Evas_Object *obj, const char *part, const char *name, double pd->persp.zplane = EINA_FALSE; pd->map.zoom.x = FROM_DOUBLE(1.0); pd->map.zoom.y = FROM_DOUBLE(1.0); - pd->align_3d.x = FROM_DOUBLE(0.5); - pd->align_3d.y = FROM_DOUBLE(0.5); - pd->align_3d.z = FROM_DOUBLE(0.5); pd->persp.focal = 1000; if (rp->part->type == EDJE_PART_TYPE_TEXT diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index aa894015c3..783d8d0312 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -269,23 +269,9 @@ edje_mmap_group_exists(Eina_File *f, const char *glob) } EAPI Eina_Bool -edje_mmap_3d_has(Eina_File *f, const char *group) +edje_mmap_3d_has(Eina_File *f EINA_UNUSED, const char *group EINA_UNUSED) { - Edje_Part_Collection *edc = NULL; - Edje_File *edf; - int err_ret = 0; - Eina_Bool r = EINA_FALSE; - - edf = _edje_cache_file_coll_open(f, group, &err_ret, &edc, NULL); - if (!edf || !edc) return EINA_FALSE; - - if (edc->scene_size.width >0 && edc->scene_size.height > 0) - r = EINA_TRUE; - - _edje_cache_coll_unref(edf, edc); - _edje_cache_file_unref(edf); - - return r; + return EINA_FALSE; } typedef struct _Edje_File_Iterator Edje_File_Iterator; @@ -1053,71 +1039,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch rp->object = NULL; break; - case EDJE_PART_TYPE_MESH_NODE: - { - Evas_Canvas3D_Mesh *mesh = NULL; - Evas_Canvas3D_Material *material = NULL; - Edje_Part_Description_Mesh_Node *pd_mesh_node; - - rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_MESH)); - - mesh = efl_add(EVAS_CANVAS3D_MESH_CLASS, ed->base.evas); - evas_canvas3d_node_mesh_add(rp->node, mesh); - - pd_mesh_node = (Edje_Part_Description_Mesh_Node*) rp->chosen_description; - - if (pd_mesh_node->mesh_node.mesh.primitive == EVAS_CANVAS3D_MESH_PRIMITIVE_NONE) - { - efl_file_simple_load(mesh, ed->file->model_dir->entries[pd_mesh_node->mesh_node.mesh.id].entry, NULL); - } - else - { - evas_canvas3d_mesh_frame_add(mesh, 0); - } - - material = efl_add(EVAS_CANVAS3D_MATERIAL_CLASS, ed->base.evas); - evas_canvas3d_mesh_frame_material_set(mesh, 0, material); - if (pd_mesh_node->mesh_node.texture.need_texture && pd_mesh_node->mesh_node.texture.textured) - { - Evas_Canvas3D_Texture *texture = NULL; - - texture = efl_add(EVAS_CANVAS3D_TEXTURE_CLASS, ed->base.evas); - evas_canvas3d_material_texture_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture); - } - rp->object = NULL; - } - break; - - case EDJE_PART_TYPE_LIGHT: - { - Evas_Canvas3D_Light *light = NULL; - - rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_LIGHT)); - light = efl_add(EVAS_CANVAS3D_LIGHT_CLASS, ed->base.evas); - evas_canvas3d_node_light_set(rp->node, light); - - rp->object = NULL; - break; - } - - case EDJE_PART_TYPE_CAMERA: - { - Evas_Canvas3D_Camera *camera = NULL; - - rp->node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas, evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_CAMERA)); - camera = efl_add(EVAS_CANVAS3D_CAMERA_CLASS, ed->base.evas); - evas_canvas3d_node_camera_set(rp->node, camera); - - rp->object = evas_object_image_filled_add(ed->base.evas); - - Eo* viewport = efl_add(EFL_CANVAS_SCENE3D_CLASS, ed->base.evas); - evas_object_image_source_set(rp->object, viewport); - evas_object_show(viewport); - evas_object_event_callback_add(rp->object, EVAS_CALLBACK_DEL, _evas_object_viewport_del, viewport); - - break; - } - default: ERR("wrong part type %i!", ep->type); break; @@ -2726,59 +2647,3 @@ _cb_signal_repeat(void *data, Evas_Object *obj, const char *sig, const char *sou _edje_util_message_send(ed_parent, EDJE_QUEUE_SCRIPT, EDJE_MESSAGE_SIGNAL, 0, &emsg); } - -EAPI Eina_Bool -edje_3d_object_add(Evas_Object *obj, Eo **root_node, Eo *scene) -{ - /* Use default value for state. */ - unsigned int i; - Edje *ed; - Edje_Real_Part *rp; - - ed = _edje_fetch(obj); - - if (!ed) - { - ERR("Cannot get edje from object"); - return EINA_FALSE; - } - - if (*root_node == NULL) - *root_node = efl_add(EVAS_CANVAS3D_NODE_CLASS, ed->base.evas, - evas_canvas3d_node_type_set(efl_added, EVAS_CANVAS3D_NODE_TYPE_NODE)); - - if (scene == NULL) - scene = efl_add(EVAS_CANVAS3D_SCENE_CLASS, ed->base.evas); - - if ((*root_node == NULL) || (scene == NULL)) - { - ERR("Cannot create scene and root node"); - return EINA_FALSE; - } - - for (i = 0; i < ed->table_parts_size; i++) - { - rp = ed->table_parts[i]; - - if (rp->node) - { - evas_canvas3d_node_member_add(*root_node, rp->node); - } - - if (rp->part->type == EDJE_PART_TYPE_CAMERA) - { - Evas_Object *viewport; - - evas_canvas3d_scene_camera_node_set(scene, rp->node); - evas_canvas3d_scene_root_node_set(scene, *root_node); - evas_canvas3d_scene_size_set(scene, ed->collection->scene_size.width, ed->collection->scene_size.height); - evas_canvas3d_scene_background_color_set(scene, 0, 0 ,0 ,0); - - viewport = evas_object_image_source_get(rp->object); - efl_canvas_scene3d_set(viewport, scene); - } - } - - return EINA_TRUE; -} - diff --git a/src/lib/edje/edje_part.c b/src/lib/edje/edje_part.c index cf1aa197b4..b5a477bab4 100644 --- a/src/lib/edje/edje_part.c +++ b/src/lib/edje/edje_part.c @@ -24,9 +24,6 @@ _part_type_to_string(unsigned char type) case EDJE_PART_TYPE_EXTERNAL: typestr = "EXTERNAL"; break; case EDJE_PART_TYPE_PROXY: typestr = "PROXY"; break; case EDJE_PART_TYPE_SPACER: typestr = "SPACER"; break; - case EDJE_PART_TYPE_MESH_NODE: typestr = "MESH_NODE"; break; - case EDJE_PART_TYPE_LIGHT: typestr = "LIGHT"; break; - case EDJE_PART_TYPE_CAMERA: typestr = "CAMERA"; break; case EDJE_PART_TYPE_SNAPSHOT: typestr = "SNAPSHOT"; break; case EDJE_PART_TYPE_VECTOR: typestr = "VECTOR"; break; default: break; |