Blender V2.61 - r43446
|
#include <float.h>
#include <math.h>
#include <stdlib.h>
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
#include "BKE_DerivedMesh.h"
#include "BKE_mesh.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "ED_util.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_uvedit.h"
#include "UI_resources.h"
#include "uvedit_intern.h"
Go to the source code of this file.
Functions | |
static void | drawcursor_sima (SpaceImage *sima, ARegion *ar) |
static int | draw_uvs_face_check (Scene *scene) |
static void | draw_uvs_shadow (Object *obedit) |
static int | draw_uvs_dm_shadow (DerivedMesh *dm) |
static void | draw_uvs_stretch (SpaceImage *sima, Scene *scene, EditMesh *em, MTFace *activetf) |
static void | draw_uvs_other (Scene *scene, Object *obedit, MTFace *activetf) |
static void | draw_uvs (SpaceImage *sima, Scene *scene, Object *obedit) |
void | draw_uvedit_main (SpaceImage *sima, ARegion *ar, Scene *scene, Object *obedit) |
Definition in file uvedit_draw.c.
void draw_uvedit_main | ( | SpaceImage * | sima, |
ARegion * | ar, | ||
Scene * | scene, | ||
Object * | obedit | ||
) |
Definition at line 838 of file uvedit_draw.c.
References draw_uvs(), draw_uvs_shadow(), drawcursor_sima(), ED_space_image_show_uvedit(), and ED_space_image_show_uvshadow().
Referenced by image_main_area_draw().
static void draw_uvs | ( | SpaceImage * | sima, |
Scene * | scene, | ||
Object * | obedit | ||
) | [static] |
Definition at line 423 of file uvedit_draw.c.
References bglBegin(), bglEnd(), bglVertex2fv(), BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), CD_MASK_BAREMESH, CD_MASK_MTFACE, CD_MTFACE, cpack, CustomData_em_get(), EditFace::data, Object::data, EditMesh::derivedFinal, draw_uvs_dm_shadow(), draw_uvs_face_check(), draw_uvs_other(), draw_uvs_stretch(), Mesh::drawflag, SpaceImage::dt_uv, editmesh_get_derived_cage_and_final(), EM_get_active_mtface(), EditMesh::faces, EditMesh::fdata, ListBase::first, SpaceImage::flag, SpaceImage::image, ME_DRAWEDGES, EditFace::next, NULL, EditFace::p, DerivedMesh::release, SCE_SELECT_VERTEX, ToolSettings::selectmode, setlinestyle(), SI_DRAW_OTHER, SI_DRAW_STRETCH, SI_DRAWSHADOW, SI_NO_DRAWFACES, SI_SMOOTH_UV, SI_UVDT_BLACK, SI_UVDT_DASH, SI_UVDT_OUTLINE, SI_UVDT_WHITE, stipple_quarttone, TF_PIN1, TF_PIN2, TF_PIN3, TF_PIN4, TH_EDITMESH_ACTIVE, TH_FACE, TH_FACE_DOT, TH_FACE_SELECT, TH_FACEDOT_SIZE, TH_VERTEX, TH_VERTEX_SELECT, TH_VERTEX_SIZE, TH_WIRE, EditFace::tmp, Scene::toolsettings, UI_GetThemeColor4ubv(), UI_GetThemeValuef(), UI_ThemeColor(), UI_ThemeColor4(), MTFace::unwrap, MTFace::uv, uv_center(), ToolSettings::uv_flag, UV_SELECT_VERTEX, ToolSettings::uv_selectmode, UV_SYNC_SELECTION, uvedit_edge_selected(), uvedit_face_selected(), uvedit_face_visible(), uvedit_uv_selected(), and EditFace::v4.
Referenced by draw_uvedit_main().
static int draw_uvs_dm_shadow | ( | DerivedMesh * | dm | ) | [static] |
Definition at line 147 of file uvedit_draw.c.
References CD_MTFACE, CustomData_has_layer(), DerivedMesh::drawUVEdges, and DerivedMesh::faceData.
Referenced by draw_uvs().
static int draw_uvs_face_check | ( | Scene * | scene | ) | [static] |
Definition at line 105 of file uvedit_draw.c.
References SCE_SELECT_FACE, ToolSettings::selectmode, Scene::toolsettings, ToolSettings::uv_flag, UV_SELECT_FACE, ToolSettings::uv_selectmode, and UV_SYNC_SELECTION.
Referenced by draw_uvs().
Definition at line 383 of file uvedit_draw.c.
References Scene::base, Object::data, ListBase::first, Base::flag, Scene::lay, Base::lay, Mesh::mface, Mesh::mtface, Base::next, NULL, OB_MESH, OB_RESTRICT_VIEW, Base::object, Object::restrictflag, SELECT, Mesh::totface, MTFace::tpage, Object::type, MTFace::uv, and MFace::v4.
Referenced by draw_uvs().
static void draw_uvs_shadow | ( | Object * | obedit | ) | [static] |
Definition at line 122 of file uvedit_draw.c.
References BKE_mesh_end_editmesh(), BKE_mesh_get_editmesh(), CD_MTFACE, CustomData_em_get(), EditFace::data, Object::data, EditMesh::faces, EditMesh::fdata, ListBase::first, EditFace::next, MTFace::uv, and EditFace::v4.
Referenced by draw_uvedit_main().
static void draw_uvs_stretch | ( | SpaceImage * | sima, |
Scene * | scene, | ||
EditMesh * | em, | ||
MTFace * | activetf | ||
) | [static] |
Definition at line 160 of file uvedit_draw.c.
References angle_normalized_v2v2(), angle_normalized_v3v3(), angle_v2v2v2(), angle_v3v3v3(), CD_MTFACE, EditVert::co, CustomData_em_get(), EditFace::data, SpaceImage::dt_uvstretch, ED_space_image_uv_aspect(), EM_face_area(), fabsf, EditMesh::faces, EditMesh::fdata, ListBase::first, SpaceImage::image, M_PI, EditFace::next, normalize_v2(), normalize_v3(), NULL, EditFace::p, powf, RAD2DEG, SI_UVDT_STRETCH_ANGLE, SI_UVDT_STRETCH_AREA, sub_v2_v2v2(), sub_v3_v3v3(), EditFace::tmp, MTFace::uv, uv_area(), uv_copy_aspect(), uvedit_face_visible(), EditFace::v1, EditFace::v2, EditFace::v3, EditFace::v4, and weight_to_rgb().
Referenced by draw_uvs().
static void drawcursor_sima | ( | SpaceImage * | sima, |
ARegion * | ar | ||
) | [static] |
Definition at line 61 of file uvedit_draw.c.
References cpack, SpaceImage::cursor, ED_space_image_size(), ED_space_image_zoom(), fdrawline(), setlinestyle(), and simple_enum_gen::w.
Referenced by draw_uvedit_main().