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

view3d_snap.c File Reference

#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_lattice_types.h"
#include "DNA_meta_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_editVert.h"
#include "BLI_linklist.h"
#include "BLI_utildefines.h"
#include "BKE_armature.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_depsgraph.h"
#include "BKE_lattice.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_scene.h"
#include "BKE_tracking.h"
#include "WM_api.h"
#include "WM_types.h"
#include "ED_armature.h"
#include "ED_mesh.h"
#include "ED_keyframing.h"
#include "ED_screen.h"
#include "ED_curve.h"
#include "view3d_intern.h"

Go to the source code of this file.

Classes

struct  TransVert

Defines

#define TM_ALL_JOINTS   1
#define TM_SKIP_HANDLES   2

Typedefs

typedef struct TransVert TransVert

Functions

static void special_transvert_update (Object *obedit)
static void make_trans_verts (Object *obedit, float *min, float *max, int mode)
static int snap_sel_to_grid (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_selected_to_grid (wmOperatorType *ot)
static int snap_sel_to_curs (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_selected_to_cursor (wmOperatorType *ot)
static int snap_curs_to_grid (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_grid (wmOperatorType *ot)
static void bundle_midpoint (Scene *scene, Object *ob, float vec[3])
static int snap_curs_to_sel (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_selected (wmOperatorType *ot)
static int snap_curs_to_active (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_active (wmOperatorType *ot)
static int snap_curs_to_center (bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_snap_cursor_to_center (wmOperatorType *ot)
int minmax_verts (Object *obedit, float *min, float *max)

Variables

float originmat [3][3]
static TransVerttransvmain = NULL
static int tottrans = 0

Detailed Description

Definition in file view3d_snap.c.


Define Documentation

#define TM_ALL_JOINTS   1

Definition at line 193 of file view3d_snap.c.

Referenced by make_trans_verts(), minmax_verts(), and snap_curs_to_sel().

#define TM_SKIP_HANDLES   2

Definition at line 194 of file view3d_snap.c.

Referenced by make_trans_verts(), and snap_curs_to_sel().


Typedef Documentation

typedef struct TransVert TransVert

Function Documentation

static void bundle_midpoint ( Scene scene,
Object ob,
float  vec[3] 
) [static]
static void make_trans_verts ( Object obedit,
float *  min,
float *  max,
int  mode 
) [static]

Definition at line 195 of file view3d_snap.c.

References add_v3_v3(), BPoint::alfa, BezTriple::alfa, Nurb::bezt, BLI_countlist(), BONE_CONNECTED, BONE_ROOTSEL, BONE_TIPSEL, Nurb::bp, EditVert::co, copy_v3_v3(), CU_BEZIER, curve_editnurbs(), Object::data, Lattice::def, DO_MINMAX, bArmature::edbo, EditMesh::edges, Mesh::edit_mesh, MetaBall::editelems, Lattice::editlatt, ELEM, EditFace::f, EditEdge::f, EditVert::f, BPoint::f1, BezTriple::f1, EditVert::f1, BezTriple::f2, BezTriple::f3, EditMesh::faces, ListBase::first, MetaElem::flag, EditBone::flag, TransVert::flag, EditFace::h, EditEdge::h, EditVert::h, EditBone::head, BPoint::hide, BezTriple::hide, INIT_MINMAX, EditLatt::latt, bArmature::layer, EditBone::layer, TransVert::loc, MEM_callocN(), MEM_freeN(), mid_v3_v3v3(), mul_v3_fl(), MetaElem::next, Nurb::next, EditBone::next, EditFace::next, EditEdge::next, EditVert::next, EditVert::no, TransVert::nor, NULL, OB_ARMATURE, OB_CURVE, OB_LATTICE, OB_MBALL, OB_MESH, OB_SURF, TransVert::oldloc, TransVert::oldval, EditBone::parent, Lattice::pntsu, Nurb::pntsu, Lattice::pntsv, Nurb::pntsv, Lattice::pntsw, MetaElem::rad, SCE_SELECT_EDGE, SCE_SELECT_VERTEX, SELECT, EditMesh::selectmode, EditBone::tail, TM_ALL_JOINTS, TM_SKIP_HANDLES, tottrans, transvmain, Nurb::type, Object::type, EditFace::v1, EditEdge::v1, EditFace::v2, EditEdge::v2, EditFace::v3, EditFace::v4, TransVert::val, BPoint::vec, BezTriple::vec, EditMesh::verts, and MetaElem::x.

Referenced by minmax_verts(), snap_curs_to_sel(), snap_sel_to_curs(), and snap_sel_to_grid().

int minmax_verts ( Object obedit,
float *  min,
float *  max 
)
static int snap_curs_to_active ( bContext C,
wmOperator UNUSEDop 
) [static]
static int snap_curs_to_center ( bContext C,
wmOperator UNUSEDop 
) [static]
static int snap_curs_to_grid ( bContext C,
wmOperator UNUSEDop 
) [static]
static int snap_curs_to_sel ( bContext C,
wmOperator UNUSEDop 
) [static]
static int snap_sel_to_curs ( bContext C,
wmOperator UNUSEDop 
) [static]
static int snap_sel_to_grid ( bContext C,
wmOperator UNUSEDop 
) [static]
static void special_transvert_update ( Object obedit) [static]
void VIEW3D_OT_snap_cursor_to_active ( wmOperatorType ot)
void VIEW3D_OT_snap_cursor_to_center ( wmOperatorType ot)
void VIEW3D_OT_snap_cursor_to_grid ( wmOperatorType ot)
void VIEW3D_OT_snap_cursor_to_selected ( wmOperatorType ot)
void VIEW3D_OT_snap_selected_to_cursor ( wmOperatorType ot)
void VIEW3D_OT_snap_selected_to_grid ( wmOperatorType ot)

Variable Documentation

float originmat[3][3]

Definition at line 116 of file object.c.

Referenced by snap_sel_to_curs(), snap_sel_to_grid(), and solve_parenting().

int tottrans = 0 [static]
TransVert* transvmain = NULL [static]