Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

uvedit_unwrap_ops.c File Reference

#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "MEM_guardedalloc.h"
#include "DNA_camera_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_math.h"
#include "BLI_edgehash.h"
#include "BLI_editVert.h"
#include "BLI_uvproject.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
#include "BKE_depsgraph.h"
#include "BKE_image.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
#include "PIL_time.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_uvedit.h"
#include "ED_view3d.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "uvedit_intern.h"
#include "uvedit_parametrizer.h"

Go to the source code of this file.

Classes

struct  MinStretch

Defines

#define VIEW_ON_EQUATOR   0
#define VIEW_ON_POLES   1
#define ALIGN_TO_OBJECT   2
#define POLAR_ZX   0
#define POLAR_ZY   1

Typedefs

typedef struct MinStretch MinStretch

Functions

static int ED_uvedit_ensure_uvs (bContext *C, Scene *scene, Object *obedit)
static int uvedit_have_selection (Scene *scene, EditMesh *em, short implicit)
static ParamHandleconstruct_param_handle (Scene *scene, EditMesh *em, short implicit, short fill, short sel, short correct_aspect)
static int minimize_stretch_init (bContext *C, wmOperator *op)
static void minimize_stretch_iteration (bContext *C, wmOperator *op, int interactive)
static void minimize_stretch_exit (bContext *C, wmOperator *op, int cancel)
static int minimize_stretch_exec (bContext *C, wmOperator *op)
static int minimize_stretch_invoke (bContext *C, wmOperator *op, wmEvent *UNUSED(event))
static int minimize_stretch_modal (bContext *C, wmOperator *op, wmEvent *event)
static int minimize_stretch_cancel (bContext *C, wmOperator *op)
void UV_OT_minimize_stretch (wmOperatorType *ot)
static int pack_islands_exec (bContext *C, wmOperator *op)
void UV_OT_pack_islands (wmOperatorType *ot)
static int average_islands_scale_exec (bContext *C, wmOperator *UNUSED(op))
void UV_OT_average_islands_scale (wmOperatorType *ot)
void ED_uvedit_live_unwrap_begin (Scene *scene, Object *obedit)
void ED_uvedit_live_unwrap_re_solve (void)
void ED_uvedit_live_unwrap_end (short cancel)
static void uv_map_transform_center (Scene *scene, View3D *v3d, float *result, Object *ob, EditMesh *em)
static void uv_map_rotation_matrix (float result[][4], RegionView3D *rv3d, Object *ob, float upangledeg, float sideangledeg, float radius)
static void uv_map_transform (bContext *C, wmOperator *op, float center[3], float rotmat[4][4])
static void uv_transform_properties (wmOperatorType *ot, int radius)
static void correct_uv_aspect (EditMesh *em)
static void uv_map_clip_correct_properties (wmOperatorType *ot)
static void uv_map_clip_correct (EditMesh *em, wmOperator *op)
void ED_unwrap_lscm (Scene *scene, Object *obedit, const short sel)
static int unwrap_exec (bContext *C, wmOperator *op)
void UV_OT_unwrap (wmOperatorType *ot)
static int uv_from_view_exec (bContext *C, wmOperator *op)
static int uv_from_view_poll (bContext *C)
void UV_OT_from_view (wmOperatorType *ot)
static int reset_exec (bContext *C, wmOperator *UNUSED(op))
void UV_OT_reset (wmOperatorType *ot)
static void uv_sphere_project (float target[2], float source[3], float center[3], float rotmat[4][4])
static void uv_map_mirror (EditFace *efa, MTFace *tf)
static int sphere_project_exec (bContext *C, wmOperator *op)
void UV_OT_sphere_project (wmOperatorType *ot)
static void uv_cylinder_project (float target[2], float source[3], float center[3], float rotmat[4][4])
static int cylinder_project_exec (bContext *C, wmOperator *op)
void UV_OT_cylinder_project (wmOperatorType *ot)
static int cube_project_exec (bContext *C, wmOperator *op)
void UV_OT_cube_project (wmOperatorType *ot)

Variables

static ParamHandleliveHandle = NULL

Detailed Description

Definition in file uvedit_unwrap_ops.c.


Define Documentation

#define ALIGN_TO_OBJECT   2

Definition at line 620 of file uvedit_unwrap_ops.c.

Referenced by uv_map_transform(), and uv_transform_properties().

#define POLAR_ZX   0

Definition at line 622 of file uvedit_unwrap_ops.c.

Referenced by uv_transform_properties().

#define POLAR_ZY   1

Definition at line 623 of file uvedit_unwrap_ops.c.

Referenced by uv_map_transform(), and uv_transform_properties().

#define VIEW_ON_EQUATOR   0

Definition at line 618 of file uvedit_unwrap_ops.c.

Referenced by uv_map_transform(), and uv_transform_properties().

#define VIEW_ON_POLES   1

Definition at line 619 of file uvedit_unwrap_ops.c.

Referenced by uv_transform_properties().


Typedef Documentation

typedef struct MinStretch MinStretch

Function Documentation

static int average_islands_scale_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static ParamHandle* construct_param_handle ( Scene scene,
EditMesh em,
short  implicit,
short  fill,
short  sel,
short  correct_aspect 
) [static]
static void correct_uv_aspect ( EditMesh em) [static]
static int cube_project_exec ( bContext C,
wmOperator op 
) [static]
static int cylinder_project_exec ( bContext C,
wmOperator op 
) [static]
void ED_unwrap_lscm ( Scene scene,
Object obedit,
const short  sel 
)
static int ED_uvedit_ensure_uvs ( bContext C,
Scene scene,
Object obedit 
) [static]
void ED_uvedit_live_unwrap_begin ( Scene scene,
Object obedit 
)
void ED_uvedit_live_unwrap_end ( short  cancel)
void ED_uvedit_live_unwrap_re_solve ( void  )

Definition at line 597 of file uvedit_unwrap_ops.c.

References param_flush(), and param_lscm_solve().

Referenced by recalcData_image(), and uvedit_live_unwrap_update().

static int minimize_stretch_cancel ( bContext C,
wmOperator op 
) [static]

Definition at line 456 of file uvedit_unwrap_ops.c.

References minimize_stretch_exit(), and OPERATOR_CANCELLED.

Referenced by UV_OT_minimize_stretch().

static int minimize_stretch_exec ( bContext C,
wmOperator op 
) [static]
static void minimize_stretch_exit ( bContext C,
wmOperator op,
int  cancel 
) [static]
static int minimize_stretch_init ( bContext C,
wmOperator op 
) [static]
static int minimize_stretch_invoke ( bContext C,
wmOperator op,
wmEvent UNUSEDevent 
) [static]
static void minimize_stretch_iteration ( bContext C,
wmOperator op,
int  interactive 
) [static]
static int minimize_stretch_modal ( bContext C,
wmOperator op,
wmEvent event 
) [static]
static int pack_islands_exec ( bContext C,
wmOperator op 
) [static]
static int reset_exec ( bContext C,
wmOperator UNUSEDop 
) [static]
static int sphere_project_exec ( bContext C,
wmOperator op 
) [static]
static int unwrap_exec ( bContext C,
wmOperator op 
) [static]
static void uv_cylinder_project ( float  target[2],
float  source[3],
float  center[3],
float  rotmat[4][4] 
) [static]

Definition at line 1248 of file uvedit_unwrap_ops.c.

References map_to_tube(), mul_m4_v3(), and sub_v3_v3v3().

Referenced by cylinder_project_exec().

static int uv_from_view_exec ( bContext C,
wmOperator op 
) [static]
static int uv_from_view_poll ( bContext C) [static]

Definition at line 1075 of file uvedit_unwrap_ops.c.

References CTX_wm_region_view3d(), ED_operator_uvmap(), and NULL.

Referenced by UV_OT_from_view().

static void uv_map_clip_correct ( EditMesh em,
wmOperator op 
) [static]
static void uv_map_clip_correct_properties ( wmOperatorType ot) [static]
static void uv_map_mirror ( EditFace efa,
MTFace tf 
) [static]

Definition at line 1170 of file uvedit_unwrap_ops.c.

References i, MTFace::uv, and EditFace::v4.

Referenced by cylinder_project_exec(), and sphere_project_exec().

static void uv_map_rotation_matrix ( float  result[][4],
RegionView3D rv3d,
Object ob,
float  upangledeg,
float  sideangledeg,
float  radius 
) [static]
static void uv_map_transform ( bContext C,
wmOperator op,
float  center[3],
float  rotmat[4][4] 
) [static]
static void uv_map_transform_center ( Scene scene,
View3D v3d,
float *  result,
Object ob,
EditMesh em 
) [static]
void UV_OT_average_islands_scale ( wmOperatorType ot)
void UV_OT_cube_project ( wmOperatorType ot)
void UV_OT_cylinder_project ( wmOperatorType ot)
void UV_OT_from_view ( wmOperatorType ot)
void UV_OT_minimize_stretch ( wmOperatorType ot)
void UV_OT_pack_islands ( wmOperatorType ot)
void UV_OT_reset ( wmOperatorType ot)
void UV_OT_sphere_project ( wmOperatorType ot)
void UV_OT_unwrap ( wmOperatorType ot)
static void uv_sphere_project ( float  target[2],
float  source[3],
float  center[3],
float  rotmat[4][4] 
) [static]

Definition at line 1156 of file uvedit_unwrap_ops.c.

References map_to_sphere(), mul_m4_v3(), and sub_v3_v3v3().

Referenced by sphere_project_exec().

static void uv_transform_properties ( wmOperatorType ot,
int  radius 
) [static]
static int uvedit_have_selection ( Scene scene,
EditMesh em,
short  implicit 
) [static]

Variable Documentation

ParamHandle* liveHandle = NULL [static]

Definition at line 578 of file uvedit_unwrap_ops.c.