Пример #1
0
void map_mesh_reset_uv(map_type *map,int mesh_idx)
{
    int						n,npoly;
    map_mesh_type			*mesh;

    mesh=&map->mesh.meshes[mesh_idx];

    npoly=mesh->npoly;

    for (n=0; n!=npoly; n++) {
        map_mesh_reset_poly_uv(map,mesh_idx,n);
    }
}
Пример #2
0
void piece_reset_uvs(bool poly_only)
{
	int						n,sel_count,
							type,mesh_idx,poly_idx;

	sel_count=select_count();
	
	for (n=0;n!=sel_count;n++) {
		select_get(n,&type,&mesh_idx,&poly_idx);
		if (type!=item_map_mesh) continue;
		if (map.mesh.meshes[mesh_idx].flag.lock_uv) continue;
		
		if (poly_only) {
			map_mesh_reset_poly_uv(&map,mesh_idx,poly_idx);
		}
		else {
			map_mesh_reset_uv(&map,mesh_idx);
		}

		view_vbo_mesh_rebuild(mesh_idx);
	}
}