summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorperepelits.m <perepelits.m@samsung.com>2016-01-04 14:03:12 -0800
committerCedric BAIL <cedric@osg.samsung.com>2016-01-04 14:03:15 -0800
commit728eff8836163a7c24c10ad8e1ce6e21eca13b01 (patch)
tree4c580c8a28b2062fe851aa44f53a079bdd853ebf
parentdc560521509b93a58905c8280d7cf9622d4e87c4 (diff)
edje: implementation of Edje_3d
Summary: I have a strange feeling that I always commit the same code to edje-3d, I hope it will finish very soon. However here are some important new keywords, descriptors for them, methods for models, structure for providing animation in edje programs and some more changes. Reviewers: raster, Hermet, cedric Reviewed By: cedric Subscribers: jpeg, artem.popov Projects: #efl Differential Revision: https://phab.enlightenment.org/D3437 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/bin/edje/edje_cc.c10
-rw-r--r--src/bin/edje/edje_cc.h2
-rw-r--r--src/bin/edje/edje_cc_handlers.c382
-rw-r--r--src/bin/edje/edje_cc_out.c76
-rw-r--r--src/lib/edje/edje_data.c11
-rw-r--r--src/lib/edje/edje_private.h18
6 files changed, 472 insertions, 27 deletions
diff --git a/src/bin/edje/edje_cc.c b/src/bin/edje/edje_cc.c
index 237d580447..9452fff17c 100644
--- a/src/bin/edje/edje_cc.c
+++ b/src/bin/edje/edje_cc.c
@@ -16,6 +16,7 @@ Eina_List *snd_dirs = NULL;
16Eina_List *mo_dirs = NULL; 16Eina_List *mo_dirs = NULL;
17Eina_List *vibration_dirs = NULL; 17Eina_List *vibration_dirs = NULL;
18Eina_List *img_dirs = NULL; 18Eina_List *img_dirs = NULL;
19Eina_List *model_dirs = NULL;
19Eina_List *fnt_dirs = NULL; 20Eina_List *fnt_dirs = NULL;
20Eina_List *data_dirs = NULL; 21Eina_List *data_dirs = NULL;
21Eina_List *defines = NULL; 22Eina_List *defines = NULL;
@@ -153,7 +154,9 @@ main(int argc, char **argv)
153 tmp_dir = (char *)eina_environment_tmp_get(); 154 tmp_dir = (char *)eina_environment_tmp_get();
154 155
155 img_dirs = eina_list_append(img_dirs, "."); 156 img_dirs = eina_list_append(img_dirs, ".");
156 157
158 model_dirs = eina_list_append(model_dirs, ".");
159
157 /* add defines to epp so edc files can detect edje_cc version */ 160 /* add defines to epp so edc files can detect edje_cc version */
158 defines = eina_list_append(defines, mem_strdup("-DEDJE_VERSION_12=12")); 161 defines = eina_list_append(defines, mem_strdup("-DEDJE_VERSION_12=12"));
159 162
@@ -202,6 +205,11 @@ main(int argc, char **argv)
202 i++; 205 i++;
203 img_dirs = eina_list_append(img_dirs, argv[i]); 206 img_dirs = eina_list_append(img_dirs, argv[i]);
204 } 207 }
208 else if ((!strcmp(argv[i], "-mod") || !strcmp(argv[i], "--model_dir")) && (i < (argc - 1)))
209 {
210 i++;
211 model_dirs = eina_list_append(model_dirs, argv[i]);
212 }
205 else if ((!strcmp(argv[i], "-fd") || !strcmp(argv[i], "--font_dir")) && (i < (argc - 1))) 213 else if ((!strcmp(argv[i], "-fd") || !strcmp(argv[i], "--font_dir")) && (i < (argc - 1)))
206 { 214 {
207 i++; 215 i++;
diff --git a/src/bin/edje/edje_cc.h b/src/bin/edje/edje_cc.h
index 106ea17815..b4da941806 100644
--- a/src/bin/edje/edje_cc.h
+++ b/src/bin/edje/edje_cc.h
@@ -187,6 +187,7 @@ void data_queue_image_lookup(char *name, int *dest, Eina_Bool *set);
187void data_queue_model_lookup(char *name, int *dest, Eina_Bool *set); 187void data_queue_model_lookup(char *name, int *dest, Eina_Bool *set);
188void data_queue_copied_image_lookup(int *src, int *dest, Eina_Bool *set); 188void data_queue_copied_image_lookup(int *src, int *dest, Eina_Bool *set);
189void data_queue_image_remove(int *dest, Eina_Bool *set); 189void data_queue_image_remove(int *dest, Eina_Bool *set);
190void data_queue_copied_model_lookup(int *src, int *dest, Eina_Bool *set);
190void data_queue_model_remove(int *dest, Eina_Bool *set); 191void data_queue_model_remove(int *dest, Eina_Bool *set);
191void data_queue_spectrum_lookup(char *name, int *dest); 192void data_queue_spectrum_lookup(char *name, int *dest);
192void data_queue_spectrum_slave_lookup(int *master, int *slave); 193void data_queue_spectrum_slave_lookup(int *master, int *slave);
@@ -253,6 +254,7 @@ int get_param_index(char *str);
253/* global vars */ 254/* global vars */
254extern Eina_List *ext_dirs; 255extern Eina_List *ext_dirs;
255extern Eina_List *img_dirs; 256extern Eina_List *img_dirs;
257extern Eina_List *model_dirs;
256extern Eina_List *fnt_dirs; 258extern Eina_List *fnt_dirs;
257extern Eina_List *snd_dirs; 259extern Eina_List *snd_dirs;
258extern Eina_List *mo_dirs; 260extern Eina_List *mo_dirs;
diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 007a9301ce..5d830a3235 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -413,11 +413,14 @@ static void st_collections_group_parts_part_description_properties_material(void
413static void st_collections_group_parts_part_description_properties_normal(void); 413static void st_collections_group_parts_part_description_properties_normal(void);
414static void st_collections_group_parts_part_description_properties_shininess(void); 414static void st_collections_group_parts_part_description_properties_shininess(void);
415static void st_collections_group_parts_part_description_properties_shade(void); 415static void st_collections_group_parts_part_description_properties_shade(void);
416static void st_collections_group_parts_part_description_orientation_angle_axis(void);
416static void st_collections_group_parts_part_description_orientation_look1(void); 417static void st_collections_group_parts_part_description_orientation_look1(void);
417static void st_collections_group_parts_part_description_orientation_look2(void); 418static void st_collections_group_parts_part_description_orientation_look2(void);
418static void st_collections_group_parts_part_description_orientation_look_to(void); 419static void st_collections_group_parts_part_description_orientation_look_to(void);
419static void st_collections_group_parts_part_description_orientation_angle_axis(void); 420static void st_collections_group_parts_part_description_orientation_angle_axis(void);
420static void st_collections_group_parts_part_description_orientation_quaternion(void); 421static void st_collections_group_parts_part_description_orientation_quaternion(void);
422static void st_collections_group_parts_part_description_scale(void);
423static void st_collections_group_parts_part_description_mesh_primitive(void);
421static void ob_collections_group_parts_part_description_texture(void); 424static void ob_collections_group_parts_part_description_texture(void);
422static void st_collections_group_parts_part_description_texture_image(void); 425static void st_collections_group_parts_part_description_texture_image(void);
423static void st_collections_group_parts_part_description_texture_wrap1(void); 426static void st_collections_group_parts_part_description_texture_wrap1(void);
@@ -426,6 +429,7 @@ static void st_collections_group_parts_part_description_texture_filter1(void);
426static void st_collections_group_parts_part_description_texture_filter2(void); 429static void st_collections_group_parts_part_description_texture_filter2(void);
427static void st_collections_group_parts_part_description_mesh_assembly(void); 430static void st_collections_group_parts_part_description_mesh_assembly(void);
428static void st_collections_group_parts_part_description_mesh_geometry(void); 431static void st_collections_group_parts_part_description_mesh_geometry(void);
432static void st_collections_group_parts_part_description_mesh_frame(void);
429static void st_collections_group_parts_part_description_filter_code(void); 433static void st_collections_group_parts_part_description_filter_code(void);
430static void st_collections_group_parts_part_description_filter_source(void); 434static void st_collections_group_parts_part_description_filter_source(void);
431static void st_collections_group_parts_part_description_filter_data(void); 435static void st_collections_group_parts_part_description_filter_data(void);
@@ -896,11 +900,13 @@ New_Statement_Handler statement_handlers[] =
896 {"collections.group.parts.part.description.properties.normal", st_collections_group_parts_part_description_properties_normal}, 900 {"collections.group.parts.part.description.properties.normal", st_collections_group_parts_part_description_properties_normal},
897 {"collections.group.parts.part.description.properties.shininess", st_collections_group_parts_part_description_properties_shininess}, 901 {"collections.group.parts.part.description.properties.shininess", st_collections_group_parts_part_description_properties_shininess},
898 {"collections.group.parts.part.description.properties.shade", st_collections_group_parts_part_description_properties_shade}, 902 {"collections.group.parts.part.description.properties.shade", st_collections_group_parts_part_description_properties_shade},
903 {"collections.group.parts.part.description.mesh.primitive", st_collections_group_parts_part_description_mesh_primitive},
899 {"collections.group.parts.part.description.orientation.look1", st_collections_group_parts_part_description_orientation_look1}, 904 {"collections.group.parts.part.description.orientation.look1", st_collections_group_parts_part_description_orientation_look1},
900 {"collections.group.parts.part.description.orientation.look2", st_collections_group_parts_part_description_orientation_look2}, 905 {"collections.group.parts.part.description.orientation.look2", st_collections_group_parts_part_description_orientation_look2},
901 {"collections.group.parts.part.description.orientation.look_to", st_collections_group_parts_part_description_orientation_look_to}, 906 {"collections.group.parts.part.description.orientation.look_to", st_collections_group_parts_part_description_orientation_look_to},
902 {"collections.group.parts.part.description.orientation.angle_axis", st_collections_group_parts_part_description_orientation_angle_axis}, 907 {"collections.group.parts.part.description.orientation.angle_axis", st_collections_group_parts_part_description_orientation_angle_axis},
903 {"collections.group.parts.part.description.orientation.quaternion", st_collections_group_parts_part_description_orientation_quaternion}, 908 {"collections.group.parts.part.description.orientation.quaternion", st_collections_group_parts_part_description_orientation_quaternion},
909 {"collections.group.parts.part.description.scale", st_collections_group_parts_part_description_scale},
904 {"collections.group.parts.part.description.texture.image", st_collections_group_parts_part_description_texture_image}, 910 {"collections.group.parts.part.description.texture.image", st_collections_group_parts_part_description_texture_image},
905 {"collections.group.parts.part.description.texture.wrap1", st_collections_group_parts_part_description_texture_wrap1}, 911 {"collections.group.parts.part.description.texture.wrap1", st_collections_group_parts_part_description_texture_wrap1},
906 {"collections.group.parts.part.description.texture.wrap2", st_collections_group_parts_part_description_texture_wrap2}, 912 {"collections.group.parts.part.description.texture.wrap2", st_collections_group_parts_part_description_texture_wrap2},
@@ -908,6 +914,7 @@ New_Statement_Handler statement_handlers[] =
908 {"collections.group.parts.part.description.texture.filter2", st_collections_group_parts_part_description_texture_filter2}, 914 {"collections.group.parts.part.description.texture.filter2", st_collections_group_parts_part_description_texture_filter2},
909 {"collections.group.parts.part.description.mesh.assembly", st_collections_group_parts_part_description_mesh_assembly}, 915 {"collections.group.parts.part.description.mesh.assembly", st_collections_group_parts_part_description_mesh_assembly},
910 {"collections.group.parts.part.description.mesh.geometry", st_collections_group_parts_part_description_mesh_geometry}, 916 {"collections.group.parts.part.description.mesh.geometry", st_collections_group_parts_part_description_mesh_geometry},
917 {"collections.group.parts.part.description.mesh.frame", st_collections_group_parts_part_description_mesh_frame},
911 {"collections.group.parts.part.description.filter.code", st_collections_group_parts_part_description_filter_code}, 918 {"collections.group.parts.part.description.filter.code", st_collections_group_parts_part_description_filter_code},
912 {"collections.group.parts.part.description.filter.source", st_collections_group_parts_part_description_filter_source}, 919 {"collections.group.parts.part.description.filter.source", st_collections_group_parts_part_description_filter_source},
913 {"collections.group.parts.part.description.filter.data", st_collections_group_parts_part_description_filter_data}, 920 {"collections.group.parts.part.description.filter.data", st_collections_group_parts_part_description_filter_data},
@@ -1596,6 +1603,157 @@ _edje_part_description_alloc(unsigned char type, const char *collection, const c
1596 result = &ed->common; 1603 result = &ed->common;
1597 break; 1604 break;
1598 } 1605 }
1606 case EDJE_PART_TYPE_MESH_NODE:
1607 {
1608 Edje_Part_Description_Mesh_Node *ed;
1609
1610 ed = mem_alloc(SZ(Edje_Part_Description_Mesh_Node));
1611
1612 ed->mesh_node.mesh.id = -1;
1613 ed->mesh_node.mesh.primitive = 0;
1614 ed->mesh_node.mesh.assembly = 1;
1615 ed->mesh_node.mesh.frame = 0;
1616
1617 ed->mesh_node.texture.id = -1;
1618 ed->mesh_node.texture.wrap1 = 0;
1619 ed->mesh_node.texture.wrap2 = 0;
1620 ed->mesh_node.texture.filter1 = 0;
1621 ed->mesh_node.texture.filter2 = 0;
1622
1623 ed->mesh_node.properties.shade = EVAS_CANVAS3D_SHADE_MODE_VERTEX_COLOR;
1624 ed->mesh_node.properties.ambient.r = 50;
1625 ed->mesh_node.properties.ambient.g = 50;
1626 ed->mesh_node.properties.ambient.b = 50;
1627 ed->mesh_node.properties.ambient.a = 255;
1628 ed->mesh_node.properties.diffuse.r = 255;
1629 ed->mesh_node.properties.diffuse.g = 255;
1630 ed->mesh_node.properties.diffuse.b = 255;
1631 ed->mesh_node.properties.diffuse.a = 255;
1632 ed->mesh_node.properties.specular.r = 255;
1633 ed->mesh_node.properties.specular.g = 255;
1634 ed->mesh_node.properties.specular.b = 255;
1635 ed->mesh_node.properties.specular.a = 255;
1636
1637 ed->mesh_node.properties.material_attrib = 1;
1638 ed->mesh_node.properties.normal = 1;
1639 ed->mesh_node.properties.shininess = 50;
1640
1641 ed->mesh_node.aabb1.relative.x = -1.0;
1642 ed->mesh_node.aabb1.relative.y = -1.0;
1643 ed->mesh_node.aabb1.relative.z = -1.0;
1644 ed->mesh_node.aabb1.offset.x = 0;
1645 ed->mesh_node.aabb1.offset.y = 0;
1646 ed->mesh_node.aabb1.offset.z = 0;
1647 ed->mesh_node.aabb1.rel_to = -1;
1648 ed->mesh_node.aabb2.relative.x = 1.0;
1649 ed->mesh_node.aabb2.relative.y = 1.0;
1650 ed->mesh_node.aabb2.relative.z = 1.0;
1651 ed->mesh_node.aabb2.offset.x = 0;
1652 ed->mesh_node.aabb2.offset.y = 0;
1653 ed->mesh_node.aabb2.offset.z = 0;
1654 ed->mesh_node.aabb2.rel_to = -1;
1655
1656 ed->mesh_node.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE;
1657 /* x1 is angle for angle_axis and cosine of half angle for quternion,
1658 x2, x3, x4 define axis for angle_axis and quaternion,
1659 x1, x2, x3 are coordinates of point to look at for look_at,
1660 x4, x5, x6 define a vector that indicates the angle at which
1661 the subject is looking at the target for look_at and look_to */
1662 ed->mesh_node.orientation.data[0] = 1.0;
1663 ed->mesh_node.orientation.data[1] = 0.0;
1664 ed->mesh_node.orientation.data[2] = 0.0;
1665 ed->mesh_node.orientation.data[3] = 0.0;
1666 ed->mesh_node.orientation.data[4] = 1.0;
1667 ed->mesh_node.orientation.data[5] = 0.0;
1668 ed->mesh_node.orientation.look_to = -1;
1669
1670 ed->mesh_node.scale_3d.x = 1.0;
1671 ed->mesh_node.scale_3d.y = 1.0;
1672 ed->mesh_node.scale_3d.z = 1.0;
1673
1674 ed->mesh_node.position.point.x = 0.0;
1675 ed->mesh_node.position.point.y = 0.0;
1676 ed->mesh_node.position.point.z = 0.0;
1677 ed->mesh_node.position.space = EVAS_CANVAS3D_SPACE_PARENT;
1678
1679 result = &ed->common;
1680 break;
1681 }
1682 case EDJE_PART_TYPE_LIGHT:
1683 {
1684 Edje_Part_Description_Light *ed;
1685
1686 ed = mem_alloc(SZ(Edje_Part_Description_Light));
1687
1688 ed->light.properties.ambient.r = 50;
1689 ed->light.properties.ambient.g = 50;
1690 ed->light.properties.ambient.b = 50;
1691 ed->light.properties.ambient.a = 255;
1692 ed->light.properties.diffuse.r = 255;
1693 ed->light.properties.diffuse.g = 255;
1694 ed->light.properties.diffuse.b = 255;
1695 ed->light.properties.diffuse.a = 255;
1696 ed->light.properties.specular.r = 255;
1697 ed->light.properties.specular.g = 255;
1698 ed->light.properties.specular.b = 255;
1699 ed->light.properties.specular.a = 255;
1700
1701 ed->light.position.point.x = 0.0;
1702 ed->light.position.point.y = 0.0;
1703 ed->light.position.point.z = 1.0;
1704 ed->light.position.space = EVAS_CANVAS3D_SPACE_PARENT;
1705
1706 ed->light.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE;
1707 /* x1 is angle for angle_axis and cosine of half angle for quternion,
1708 x2, x3, x4 define axis for angle_axis and quaternion,
1709 x1, x2, x3 are coordinates of point to look at for look_at,
1710 x4, x5, x6 define a vector that indicates the angle at which
1711 the subject is looking at the target for look_at and look_to */
1712 ed->light.orientation.data[0] = 1.0;
1713 ed->light.orientation.data[1] = 0.0;
1714 ed->light.orientation.data[2] = 0.0;
1715 ed->light.orientation.data[3] = 0.0;
1716 ed->light.orientation.data[4] = 1.0;
1717 ed->light.orientation.data[5] = 0.0;
1718 ed->light.orientation.look_to = -1;
1719
1720 result = &ed->common;
1721 break;
1722 }
1723 case EDJE_PART_TYPE_CAMERA:
1724 {
1725 Edje_Part_Description_Camera *ed;
1726
1727 ed = mem_alloc(SZ(Edje_Part_Description_Camera));
1728
1729 ed->camera.camera.fovy = 60.0;
1730 ed->camera.camera.aspect = 1.0;
1731 ed->camera.camera.frustum_near = 2.0;
1732 ed->camera.camera.frustum_far = 50.0;
1733
1734 ed->camera.position.point.x = 0.0;
1735 ed->camera.position.point.y = 0.0;
1736 ed->camera.position.point.z = 5.0;
1737
1738 ed->camera.position.space = EVAS_CANVAS3D_SPACE_PARENT;
1739
1740 ed->camera.orientation.type = EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE;
1741 /* x1 is angle for angle_axis and cosine of half angle for quternion,
1742 x2, x3, x4 define axis for angle_axis and quaternion,
1743 x1, x2, x3 are coordinates of point to look at for look_at,
1744 x4, x5, x6 define a vector that indicates the angle at which
1745 the subject is looking at the target for look_at and look_to */
1746 ed->camera.orientation.data[0] = 1.0;
1747 ed->camera.orientation.data[1] = 0.0;
1748 ed->camera.orientation.data[2] = 0.0;
1749 ed->camera.orientation.data[3] = 0.0;
1750 ed->camera.orientation.data[4] = 1.0;
1751 ed->camera.orientation.data[5] = 0.0;
1752 ed->camera.orientation.look_to = -1;
1753
1754 result = &ed->common;
1755 break;
1756 }
1599 } 1757 }
1600 1758
1601 if (!result) 1759 if (!result)
@@ -5659,6 +5817,9 @@ st_collections_group_parts_part_name(void)
5659 @li BOX 5817 @li BOX
5660 @li TABLE 5818 @li TABLE
5661 @li EXTERNAL 5819 @li EXTERNAL
5820 @li MESH_NODE
5821 @li CAMERA
5822 @li LIGHT
5662 @li PROXY 5823 @li PROXY
5663 @li SPACER 5824 @li SPACER
5664 @li SNAPSHOT 5825 @li SNAPSHOT
@@ -5668,6 +5829,9 @@ static void
5668st_collections_group_parts_part_type(void) 5829st_collections_group_parts_part_type(void)
5669{ 5830{
5670 unsigned int type; 5831 unsigned int type;
5832 unsigned int i = 0;
5833
5834 Edje_Part_Collection *pc;
5671 5835
5672 check_arg_count(1); 5836 check_arg_count(1);
5673 5837
@@ -5687,6 +5851,21 @@ st_collections_group_parts_part_type(void)
5687 "SNAPSHOT", EDJE_PART_TYPE_SNAPSHOT, 5851 "SNAPSHOT", EDJE_PART_TYPE_SNAPSHOT,
5688 NULL); 5852 NULL);
5689 5853
5854 pc = eina_list_data_get(eina_list_last(edje_collections));
5855
5856 if (type == EDJE_PART_TYPE_CAMERA)
5857 {
5858 for (i = 0; i < (pc->parts_count - 1); i++)
5859 {
5860 if (pc->parts[i]->type == EDJE_PART_TYPE_CAMERA)
5861 {
5862 WRN("parse error %s:%i. more then one part of type CAMERA in scene.",
5863 file_in, line - 1);
5864 exit(-1);
5865 }
5866 }
5867 }
5868
5690 _part_type_set(type); 5869 _part_type_set(type);
5691} 5870}
5692 5871
@@ -5986,7 +6165,8 @@ st_collections_group_parts_part_mask_flags(void)
5986 such as font size, min/max size of the part, and possibly can be used 6165 such as font size, min/max size of the part, and possibly can be used
5987 to scale based on DPI of the target device. The reason to be selective 6166 to scale based on DPI of the target device. The reason to be selective
5988 is that some things work well being scaled, others do not, so the 6167 is that some things work well being scaled, others do not, so the
5989 designer gets to choose what works best. 6168 designer gets to choose what works best. For MESH_NODE parts three
6169 parameters specify how much the part will stretched along each axis.
5990 @endproperty 6170 @endproperty
5991*/ 6171*/
5992static void 6172static void
@@ -7569,6 +7749,45 @@ st_collections_group_parts_part_description_inherit(void)
7569 } 7749 }
7570 break; 7750 break;
7571 } 7751 }
7752 case EDJE_PART_TYPE_CAMERA:
7753 {
7754 Edje_Part_Description_Camera *ced = (Edje_Part_Description_Camera *) ed;
7755 Edje_Part_Description_Camera *cparent = (Edje_Part_Description_Camera *) parent;
7756
7757 ced->camera = cparent->camera;
7758
7759 data_queue_copied_part_lookup(pc, &(cparent->camera.orientation.look_to), &(ced->camera.orientation.look_to));
7760
7761 break;
7762 }
7763 case EDJE_PART_TYPE_LIGHT:
7764 {
7765 Edje_Part_Description_Light *led = (Edje_Part_Description_Light *) ed;
7766 Edje_Part_Description_Light *lparent = (Edje_Part_Description_Light *) parent;
7767
7768 led->light = lparent->light;
7769
7770 data_queue_copied_part_lookup(pc, &(lparent->light.orientation.look_to), &(led->light.orientation.look_to));
7771
7772 break;
7773 }
7774 case EDJE_PART_TYPE_MESH_NODE:
7775 {
7776 Edje_Part_Description_Mesh_Node *med = (Edje_Part_Description_Mesh_Node *) ed;
7777 Edje_Part_Description_Mesh_Node *mparent = (Edje_Part_Description_Mesh_Node *) parent;
7778
7779 med->mesh_node = mparent->mesh_node;
7780
7781 data_queue_model_remove(&med->mesh_node.mesh.id, &med->mesh_node.mesh.set);
7782 data_queue_copied_model_lookup(&mparent->mesh_node.mesh.id, &med->mesh_node.mesh.id, &med->mesh_node.mesh.set);
7783
7784 data_queue_image_remove(&med->mesh_node.texture.id, &med->mesh_node.texture.set);
7785 data_queue_copied_model_lookup(&mparent->mesh_node.texture.id, &med->mesh_node.texture.id, &med->mesh_node.texture.set);
7786
7787 data_queue_copied_part_lookup(pc, &(mparent->mesh_node.orientation.look_to), &(med->mesh_node.orientation.look_to));
7788
7789 break;
7790 }
7572 } 7791 }
7573 7792
7574#undef STRDUP 7793#undef STRDUP
@@ -8550,6 +8769,8 @@ st_collections_group_parts_part_description_image_normal(void)
8550 { 8769 {
8551 char *name; 8770 char *name;
8552 8771
8772 ed->image.set = EINA_TRUE;
8773
8553 name = parse_str(0); 8774 name = parse_str(0);
8554 data_queue_image_remove(&(ed->image.id), &(ed->image.set)); 8775 data_queue_image_remove(&(ed->image.id), &(ed->image.set));
8555 data_queue_image_lookup(name, &(ed->image.id), &(ed->image.set)); 8776 data_queue_image_lookup(name, &(ed->image.id), &(ed->image.set));
@@ -10327,23 +10548,25 @@ st_collections_group_parts_part_description_position_space(void)
10327static void 10548static void
10328st_collections_group_parts_part_description_camera_properties(void) 10549st_collections_group_parts_part_description_camera_properties(void)
10329{ 10550{
10330 Edje_Part_Description_Camera *ed;
10331
10332 check_arg_count(4); 10551 check_arg_count(4);
10333 10552
10334 if (current_part->type != EDJE_PART_TYPE_CAMERA) 10553 if (current_part->type == EDJE_PART_TYPE_CAMERA)
10554 {
10555 Edje_Part_Description_Camera *ed;
10556
10557 ed = (Edje_Part_Description_Camera*) current_desc;
10558
10559 ed->camera.camera.fovy = FROM_DOUBLE(parse_float(0));
10560 ed->camera.camera.aspect = FROM_DOUBLE(parse_float(1));
10561 ed->camera.camera.frustum_near = FROM_DOUBLE(parse_float(2));
10562 ed->camera.camera.frustum_far = FROM_DOUBLE(parse_float(3));
10563 }
10564 else
10335 { 10565 {
10336 ERR("parse error %s:%i. camera attributes in non-CAMERA part.", 10566 ERR("parse error %s:%i. camera attributes in non-CAMERA and non-LIGHT part.",
10337 file_in, line - 1); 10567 file_in, line - 1);
10338 exit(-1); 10568 exit(-1);
10339 } 10569 }
10340
10341 ed = (Edje_Part_Description_Camera*) current_desc;
10342
10343 ed->camera.camera.fovy = FROM_DOUBLE(parse_float(0));
10344 ed->camera.camera.aspect = FROM_DOUBLE(parse_float(1));
10345 ed->camera.camera.frustum_near = FROM_DOUBLE(parse_float(2));
10346 ed->camera.camera.frustum_far = FROM_DOUBLE(parse_float(3));
10347} 10570}
10348 10571
10349/** 10572/**
@@ -10397,10 +10620,10 @@ st_collections_group_parts_part_description_properties_ambient(void)
10397 10620
10398 ed = (Edje_Part_Description_Light*) current_desc; 10621 ed = (Edje_Part_Description_Light*) current_desc;
10399 10622
10400 ed->light.properties.ambient.r = parse_int_range(0, 0, 255); 10623 ed->light.properties.specular.r = parse_int_range(0, 0, 255);
10401 ed->light.properties.ambient.g = parse_int_range(1, 0, 255); 10624 ed->light.properties.specular.g = parse_int_range(1, 0, 255);
10402 ed->light.properties.ambient.b = parse_int_range(2, 0, 255); 10625 ed->light.properties.specular.b = parse_int_range(2, 0, 255);
10403 ed->light.properties.ambient.a = parse_int_range(3, 0, 255); 10626 ed->light.properties.specular.a = parse_int_range(3, 0, 255);
10404 break; 10627 break;
10405 } 10628 }
10406 case EDJE_PART_TYPE_MESH_NODE: 10629 case EDJE_PART_TYPE_MESH_NODE:
@@ -10409,10 +10632,10 @@ st_collections_group_parts_part_description_properties_ambient(void)
10409 10632
10410 ed = (Edje_Part_Description_Mesh_Node*) current_desc; 10633 ed = (Edje_Part_Description_Mesh_Node*) current_desc;
10411 10634
10412 ed->mesh_node.properties.ambient.r = parse_int_range(0, 0, 255); 10635 ed->mesh_node.properties.specular.r = parse_int_range(0, 0, 255);
10413 ed->mesh_node.properties.ambient.g = parse_int_range(1, 0, 255); 10636 ed->mesh_node.properties.specular.g = parse_int_range(1, 0, 255);
10414 ed->mesh_node.properties.ambient.b = parse_int_range(2, 0, 255); 10637 ed->mesh_node.properties.specular.b = parse_int_range(2, 0, 255);
10415 ed->mesh_node.properties.ambient.a = parse_int_range(3, 0, 255); 10638 ed->mesh_node.properties.specular.a = parse_int_range(3, 0, 255);
10416 break; 10639 break;
10417 } 10640 }
10418 default: 10641 default:
@@ -10907,6 +11130,37 @@ st_collections_group_parts_part_description_orientation_quaternion(void)
10907} 11130}
10908 11131
10909/** 11132/**
11133 @page edcref
11134 @property
11135 scale
11136 @parameters
11137 [scale_x] [scale_y] [scale_z]
11138 @effect
11139 Specifies the scale parametr for MESH_NODE.
11140 @endproperty
11141*/
11142static void
11143st_collections_group_parts_part_description_scale(void)
11144{
11145 if (current_part->type == EDJE_PART_TYPE_MESH_NODE)
11146 {
11147 Edje_Part_Description_Mesh_Node *ed;
11148
11149 ed = (Edje_Part_Description_Mesh_Node*) current_desc;
11150
11151 ed->mesh_node.scale_3d.x = FROM_DOUBLE(parse_float_range(0, 0.0, 1000.0));
11152 ed->mesh_node.scale_3d.y = FROM_DOUBLE(parse_float_range(1, 0.0, 1000.0));
11153 ed->mesh_node.scale_3d.z = FROM_DOUBLE(parse_float_range(2, 0.0, 1000.0));
11154 }
11155 else
11156 {
11157 ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.",
11158 file_in, line - 1);
11159 exit(-1);
11160 }
11161}
11162
11163/**
10910 @edcsubsection{collections_group_parts_description_texture, 11164 @edcsubsection{collections_group_parts_description_texture,
10911 Group.Parts.Part.Description.Texture} 11165 Group.Parts.Part.Description.Texture}
10912 */ 11166 */
@@ -11184,6 +11438,71 @@ st_collections_group_parts_part_description_texture_filter2(void)
11184} 11438}
11185 11439
11186/** 11440/**
11441 @edcsubsection{collections_group_parts_description_mesh,Mesh}
11442 */
11443
11444/**
11445 @page edcref
11446
11447 @block
11448 mesh
11449 @context
11450 part {
11451 description {
11452 ..
11453 mesh {
11454 geometry: "file_name";
11455 primitive: CUBE;
11456 assembly: LINEAR;
11457 }
11458 ..
11459 }
11460 }
11461 @description
11462 @endblock
11463
11464 @property
11465 primitive
11466 @parameters
11467 [PRIMITIVE]
11468 @effect
11469 Specifies the the type of primitive model to be used.
11470 Valid primitives:
11471 @li NONE
11472 @li CUBE
11473 @li SPHERE
11474 @endproperty
11475*/
11476static void
11477st_collections_group_parts_part_description_mesh_primitive(void)
11478{
11479 unsigned int primitive;
11480
11481 check_arg_count(1);
11482
11483 primitive = parse_enum(0,
11484 "NONE", EVAS_CANVAS3D_MESH_PRIMITIVE_NONE,
11485 "CUBE", EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE,
11486 "SPHERE", EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE,
11487 NULL);
11488
11489 if (current_part->type == EDJE_PART_TYPE_MESH_NODE)
11490 {
11491 Edje_Part_Description_Mesh_Node *ed;
11492
11493 ed = (Edje_Part_Description_Mesh_Node*) current_desc;
11494
11495 ed->mesh_node.mesh.primitive = primitive;
11496 }
11497 else
11498 {
11499 ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.",
11500 file_in, line - 1);
11501 exit(-1);
11502 }
11503}
11504
11505/**
11187 @page edcref 11506 @page edcref
11188 @property 11507 @property
11189 assembly 11508 assembly
@@ -11277,6 +11596,28 @@ st_collections_group_parts_part_description_mesh_geometry(void)
11277} 11596}
11278 11597
11279static void 11598static void
11599st_collections_group_parts_part_description_mesh_frame(void)
11600{
11601 check_arg_count(1);
11602
11603
11604 if (current_part->type == EDJE_PART_TYPE_MESH_NODE)
11605 {
11606 Edje_Part_Description_Mesh_Node *ed;
11607
11608 ed = (Edje_Part_Description_Mesh_Node*) current_desc;
11609
11610 ed->mesh_node.mesh.frame = parse_int(0);
11611 }
11612 else
11613 {
11614 ERR("parse error %s:%i. mesh_node attributes in non-MESH_NODE part.",
11615 file_in, line - 1);
11616 exit(-1);
11617 }
11618}
11619
11620static void
11280st_collections_group_parts_part_description_table_min(void) 11621st_collections_group_parts_part_description_table_min(void)
11281{ 11622{
11282 Edje_Part_Description_Table *ed; 11623 Edje_Part_Description_Table *ed;
@@ -12983,6 +13324,7 @@ ob_collections_group_programs_program(void)
12983 13324
12984 ep = mem_alloc(SZ(Edje_Program_Parser)); 13325 ep = mem_alloc(SZ(Edje_Program_Parser));
12985 ep->id = -1; 13326 ep->id = -1;
13327 ep->source_3d_id = -1;
12986 ep->tween.mode = EDJE_TWEEN_MODE_LINEAR; 13328 ep->tween.mode = EDJE_TWEEN_MODE_LINEAR;
12987 ep->tween.use_duration_factor = EINA_FALSE; 13329 ep->tween.use_duration_factor = EINA_FALSE;
12988 ep->after = NULL; 13330 ep->after = NULL;
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index fb7a9ee833..c5c439aefe 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -627,6 +627,30 @@ check_program(Edje_Part_Collection *pc, Edje_Program *ep, Eet_File *ef)
627 default: 627 default:
628 break; 628 break;
629 } 629 }
630 Edje_Program_Target *et;
631 Eina_List *l;
632 unsigned int i = 0;
633 int camera_id = -1;
634
635 for (i = 0; (i < pc->parts_count) && (camera_id < 0); i++)
636 {
637 if (pc->parts[i]->type == EDJE_PART_TYPE_CAMERA)
638 camera_id = i;
639 }
640
641 EINA_LIST_FOREACH(ep->targets, l, et)
642 {
643 if (((ep->action == EDJE_ACTION_TYPE_STATE_SET) || (ep->action == EDJE_ACTION_TYPE_SIGNAL_EMIT)) &&
644 (pc->parts[et->id]->type == EDJE_PART_TYPE_MESH_NODE) && strstr(ep->signal, "mouse"))
645 {
646 for (i = 0; (i < pc->parts_count) && (ep->source_3d_id < 0); i++)
647 {
648 if (!strcmp(pc->parts[i]->name, ep->source))
649 ep->source_3d_id = i;
650 }
651 ep->source = mem_strdup(pc->parts[camera_id]->name);
652 }
653 }
630} 654}
631 655
632static void 656static void
@@ -1306,6 +1330,40 @@ data_write_images(Eet_File *ef, int *image_num)
1306} 1330}
1307 1331
1308static void 1332static void
1333data_check_models(Eet_File *ef EINA_UNUSED, int *model_num EINA_UNUSED)
1334{
1335 int i;
1336
1337 if (!((edje_file) && (edje_file->model_dir))) return;
1338
1339 for (i = 0; i < (int)edje_file->model_dir->entries_count; i++)
1340 {
1341 Edje_Model_Directory_Entry *model;
1342 Eina_List *ll;
1343 char *s;
1344 Eina_Bool file_exist = EINA_FALSE;
1345
1346 model = &edje_file->model_dir->entries[i];
1347
1348 EINA_LIST_FOREACH(model_dirs, ll, s)
1349 {
1350 char buf[PATH_MAX];
1351
1352 snprintf(buf, sizeof(buf), "%s/%s", s, model->entry);
1353
1354 file_exist = file_exist || ecore_file_exists(buf);
1355
1356 }
1357 if (!file_exist)
1358 {
1359 ERR("Unablegstsh to load model \"%s\". Check if path to file is correct (both directory and file name).",
1360 model->entry);
1361 exit(-1);
1362 }
1363 }
1364}
1365
1366static void
1309data_thread_sounds(void *data, Ecore_Thread *thread EINA_UNUSED) 1367data_thread_sounds(void *data, Ecore_Thread *thread EINA_UNUSED)
1310{ 1368{
1311 Sound_Write *sw = data; 1369 Sound_Write *sw = data;
@@ -2410,6 +2468,7 @@ data_write(void)
2410 Eet_File *ef; 2468 Eet_File *ef;
2411 Eet_Error err; 2469 Eet_Error err;
2412 int image_num = 0; 2470 int image_num = 0;
2471 int model_num = 0;
2413 int sound_num = 0; 2472 int sound_num = 0;
2414 int mo_num = 0; 2473 int mo_num = 0;
2415 int vibration_num = 0; 2474 int vibration_num = 0;
@@ -2469,6 +2528,8 @@ data_write(void)
2469 INF("fontmap: %3.5f", ecore_time_get() - t); t = ecore_time_get(); 2528 INF("fontmap: %3.5f", ecore_time_get() - t); t = ecore_time_get();
2470 data_write_images(ef, &image_num); 2529 data_write_images(ef, &image_num);
2471 INF("images: %3.5f", ecore_time_get() - t); t = ecore_time_get(); 2530 INF("images: %3.5f", ecore_time_get() - t); t = ecore_time_get();
2531 data_check_models(ef, &model_num);
2532 INF("models: %3.5f", ecore_time_get() - t); t = ecore_time_get();
2472 data_write_fonts(ef, &font_num); 2533 data_write_fonts(ef, &font_num);
2473 INF("fonts: %3.5f", ecore_time_get() - t); t = ecore_time_get(); 2534 INF("fonts: %3.5f", ecore_time_get() - t); t = ecore_time_get();
2474 data_write_sounds(ef, &sound_num); 2535 data_write_sounds(ef, &sound_num);
@@ -3030,6 +3091,19 @@ data_queue_model_remove(int *dest, Eina_Bool *set)
3030} 3091}
3031 3092
3032void 3093void
3094data_queue_copied_model_lookup(int *src, int *dest, Eina_Bool *set)
3095{
3096 Eina_List *l;
3097 Image_Lookup *il;
3098
3099 EINA_LIST_FOREACH(model_lookups, l, il)
3100 {
3101 if (il->dest == src)
3102 data_queue_model_lookup(il->name, dest, set);
3103 }
3104}
3105
3106void
3033data_queue_copied_image_lookup(int *src, int *dest, Eina_Bool *set) 3107data_queue_copied_image_lookup(int *src, int *dest, Eina_Bool *set)
3034{ 3108{
3035 Eina_List *l; 3109 Eina_List *l;
@@ -3625,6 +3699,8 @@ free_group:
3625 eina_hash_direct_add(images_in_use, set->name, set); 3699 eina_hash_direct_add(images_in_use, set->name, set);
3626 break; 3700 break;
3627 } 3701 }
3702 else
3703 *(image->set) = EINA_FALSE;
3628 } 3704 }
3629 } 3705 }
3630 } 3706 }
diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c
index 905831d822..18e014e7e6 100644
--- a/src/lib/edje/edje_data.c
+++ b/src/lib/edje/edje_data.c
@@ -610,6 +610,7 @@ _edje_edd_init(void)
610 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "name", name, EET_T_STRING); 610 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "name", name, EET_T_STRING);
611 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "signal", signal, EET_T_STRING); 611 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "signal", signal, EET_T_STRING);
612 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "source", source, EET_T_STRING); 612 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "source", source, EET_T_STRING);
613 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "source_3d_id", source_3d_id, EET_T_INT);
613 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "filter_part", filter.part, EET_T_STRING); 614 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "filter_part", filter.part, EET_T_STRING);
614 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "filter_state", filter.state, EET_T_STRING); 615 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "filter_state", filter.state, EET_T_STRING);
615 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "in.from", in.from, EET_T_DOUBLE); 616 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_program, Edje_Program, "in.from", in.from, EET_T_DOUBLE);
@@ -877,7 +878,12 @@ _edje_edd_init(void)
877 878
878#define EET_DATA_DESCRIPTOR_ADD_SUB_NESTED_LOOK(Edd, Type, Dec) \ 879#define EET_DATA_DESCRIPTOR_ADD_SUB_NESTED_LOOK(Edd, Type, Dec) \
879 { \ 880 { \
880 EET_DATA_DESCRIPTOR_ADD_BASIC_ARRAY(Edd, Type, #Dec ".orientation.look", Dec.orientation.data, EDJE_T_FLOAT); \ 881 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "Dec##.orientation.look1.x", Dec.orientation.data[0], EDJE_T_FLOAT); \
882 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "Dec##.orientation.look1.y", Dec.orientation.data[1], EDJE_T_FLOAT); \
883 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "Dec##.orientation.look1.z", Dec.orientation.data[2], EDJE_T_FLOAT); \
884 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "Dec##.orientation.look2.x", Dec.orientation.data[3], EDJE_T_FLOAT); \
885 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "Dec##.orientation.look2.y", Dec.orientation.data[4], EDJE_T_FLOAT); \
886 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, "Dec##.orientation.look2.z", Dec.orientation.data[5], EDJE_T_FLOAT); \
881 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, #Dec ".orientation.look_to", Dec.orientation.look_to, EET_T_INT); \ 887 EET_DATA_DESCRIPTOR_ADD_BASIC(Edd, Type, #Dec ".orientation.look_to", Dec.orientation.look_to, EET_T_INT); \
882 } 888 }
883 889
@@ -950,6 +956,7 @@ _edje_edd_init(void)
950 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); 956 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);
951 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); 957 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);
952 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED_LOOK(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, mesh_node); 958 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED_LOOK(_edje_edd_edje_part_description_mesh_node, Edje_Part_Description_Mesh_Node, mesh_node);
959 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);
953 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); 960 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);
954 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); 961 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);
955 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); 962 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);
@@ -962,6 +969,7 @@ _edje_edd_init(void)
962 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); 969 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);
963 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); 970 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);
964 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); 971 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);
972 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);
965 973
966 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Light); 974 EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_Light);
967 eddc.func.mem_free = mem_free_light; 975 eddc.func.mem_free = mem_free_light;
@@ -1289,7 +1297,6 @@ _edje_edd_init(void)
1289 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "ignore_flags", ignore_flags, EET_T_INT); 1297 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "ignore_flags", ignore_flags, EET_T_INT);
1290 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "mask_flags", mask_flags, EET_T_INT); 1298 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "mask_flags", mask_flags, EET_T_INT);
1291 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "scale", scale, EET_T_UCHAR); 1299 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "scale", scale, EET_T_UCHAR);
1292 EET_DATA_DESCRIPTOR_ADD_SUB_NESTED(_edje_edd_edje_part, Edje_Part, "scale_3d", scale_3d, _edje_edd_edje_part_description_3d_vec);
1293 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "precise_is_inside", precise_is_inside, EET_T_UCHAR); 1300 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "precise_is_inside", precise_is_inside, EET_T_UCHAR);
1294 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "use_alternate_font_metrics", use_alternate_font_metrics, EET_T_UCHAR); 1301 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "use_alternate_font_metrics", use_alternate_font_metrics, EET_T_UCHAR);
1295 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "pointer_mode", pointer_mode, EET_T_UCHAR); 1302 EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part, Edje_Part, "pointer_mode", pointer_mode, EET_T_UCHAR);
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 5f1d6d478a..68c3f35ed6 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -752,6 +752,7 @@ struct _Edje_Program /* a conditional program to be run */
752 752
753 const char *signal; /* if signal emission name matches the glob here... */ 753 const char *signal; /* if signal emission name matches the glob here... */
754 const char *source; /* if part that emitted this (name) matches this glob */ 754 const char *source; /* if part that emitted this (name) matches this glob */
755 int source_3d_id; /* id of real 3D part */
755 const char *sample_name; 756 const char *sample_name;
756 const char *tone_name; 757 const char *tone_name;
757 double duration; 758 double duration;
@@ -1407,14 +1408,15 @@ struct _Edje_Part_Description_Spec_Table
1407struct _Edje_Part_Description_Spec_Mesh_Node 1408struct _Edje_Part_Description_Spec_Mesh_Node
1408{ 1409{
1409 struct { 1410 struct {
1410 Edje_Part_Image_Id **tweens; 1411 Edje_Part_Image_Id **tweens;
1411 unsigned int tweens_count; 1412 unsigned int tweens_count;
1412 int id; 1413 int id;
1413 1414
1414 Eina_Bool set; 1415 Eina_Bool set;
1415 1416
1416 Evas_Canvas3D_Mesh_Primitive primitive; 1417 Evas_Canvas3D_Mesh_Primitive primitive;
1417 Evas_Canvas3D_Vertex_Assembly assembly; 1418 Evas_Canvas3D_Vertex_Assembly assembly;
1419 int frame;
1418 } mesh; 1420 } mesh;
1419 1421
1420 struct { 1422 struct {
@@ -1452,6 +1454,8 @@ struct _Edje_Part_Description_Spec_Mesh_Node
1452 int look_to; /* -1 = whole part collection, or part ID */ 1454 int look_to; /* -1 = whole part collection, or part ID */
1453 } orientation; 1455 } orientation;
1454 1456
1457 Edje_3D_Vec scale_3d;
1458
1455 struct { 1459 struct {
1456 Edje_3D_Vec point; 1460 Edje_3D_Vec point;
1457 1461
@@ -1774,6 +1778,12 @@ struct _Edje_Calc_Params
1774 int size; // 4 1778 int size; // 4
1775 Edje_Color color2, color3; // 8 1779 Edje_Color color2, color3; // 8
1776 } text; // 36 1780 } text; // 36
1781 struct {
1782 int frame; //4
1783 FLOAT_T data[6];
1784 Edje_3D_Vec point;
1785 Edje_3D_Vec scale_3d;
1786 } node; // 4
1777 } type; // 40 1787 } type; // 40
1778 const Edje_Calc_Params_Map *map; // 88 1788 const Edje_Calc_Params_Map *map; // 88
1779#ifdef HAVE_EPHYSICS 1789#ifdef HAVE_EPHYSICS