Blender V2.61 - r43446
|
#include <string.h>
#include <ctype.h>
#include "MEM_guardedalloc.h"
#include "DNA_armature_types.h"
#include "DNA_curve_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
#include "BKE_armature.h"
#include "BKE_curve.h"
#include "BKE_context.h"
#include "BKE_report.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_editVert.h"
#include "BLI_utildefines.h"
#include "BLF_translation.h"
#include "ED_armature.h"
#include "ED_mesh.h"
#include "RNA_define.h"
#include "UI_interface.h"
#include "transform.h"
Go to the source code of this file.
Definition in file transform_orientations.c.
TransformOrientation* addMatrixSpace | ( | bContext * | C, |
float | mat[3][3], | ||
char | name[], | ||
int | overwrite | ||
) | [read] |
Definition at line 273 of file transform_orientations.c.
References BLI_addtail(), copy_m3_m3(), CTX_data_scene(), findOrientationName(), TransformOrientation::mat, MEM_callocN(), TransformOrientation::name, NULL, Scene::transform_spaces, and uniqueOrientationName().
Referenced by createBoneSpace(), createMeshSpace(), and createObjectSpace().
void applyTransformOrientation | ( | const bContext * | C, |
float | mat[3][3], | ||
char * | name | ||
) |
Definition at line 455 of file transform_orientations.c.
References copy_m3_m3(), CTX_data_scene(), CTX_wm_view3d(), ListBase::first, i, TransformOrientation::mat, TransformOrientation::name, TransformOrientation::next, Scene::transform_spaces, View3D::twmode, and V3D_MANIP_CUSTOM.
void BIF_clearTransformOrientation | ( | bContext * | C | ) |
Definition at line 69 of file transform_orientations.c.
References BLI_freelistN(), CTX_data_scene(), CTX_wm_view3d(), Scene::transform_spaces, View3D::twmode, V3D_MANIP_CUSTOM, and V3D_MANIP_GLOBAL.
Referenced by do_view3d_region_buttons().
int BIF_countTransformOrientation | ( | const bContext * | C | ) |
Definition at line 442 of file transform_orientations.c.
References CTX_data_scene(), ListBase::first, TransformOrientation::next, and Scene::transform_spaces.
void BIF_createTransformOrientation | ( | bContext * | C, |
ReportList * | reports, | ||
char * | name, | ||
int | use, | ||
int | overwrite | ||
) |
Definition at line 105 of file transform_orientations.c.
References BIF_selectTransformOrientation(), createBoneSpace(), createMeshSpace(), createObjectSpace(), CTX_data_active_object(), CTX_data_edit_object(), Object::mode, NULL, OB_ARMATURE, OB_MESH, OB_MODE_POSE, and Object::type.
Referenced by create_orientation_exec(), and do_view3d_region_buttons().
EnumPropertyItem* BIF_enumTransformOrientation | ( | bContext * | C | ) | [read] |
Definition at line 375 of file transform_orientations.c.
References CTX_data_scene(), ListBase::first, i, EnumPropertyItem::identifier, TransformOrientation::name, EnumPropertyItem::name, TransformOrientation::next, NULL, RNA_enum_item_add(), RNA_enum_item_add_separator(), RNA_enum_item_end(), Scene::transform_spaces, V3D_MANIP_CUSTOM, V3D_MANIP_GLOBAL, V3D_MANIP_LOCAL, V3D_MANIP_NORMAL, V3D_MANIP_VIEW, and EnumPropertyItem::value.
const char* BIF_menustringTransformOrientation | ( | const bContext * | C, |
const char * | title | ||
) |
Definition at line 418 of file transform_orientations.c.
References BIF_countTransformOrientation(), CTX_data_scene(), ListBase::first, i, IFACE_, MAX_NAME, MEM_callocN(), TransformOrientation::name, TransformOrientation::next, p, strlen(), TIP_, Scene::transform_spaces, and V3D_MANIP_CUSTOM.
void BIF_removeTransformOrientation | ( | bContext * | C, |
TransformOrientation * | target | ||
) |
Definition at line 301 of file transform_orientations.c.
References BLI_freelinkN(), CTX_data_scene(), CTX_wm_view3d(), ListBase::first, i, TransformOrientation::next, Scene::transform_spaces, View3D::twmode, V3D_MANIP_CUSTOM, and V3D_MANIP_GLOBAL.
void BIF_removeTransformOrientationIndex | ( | bContext * | C, |
int | index | ||
) |
Definition at line 329 of file transform_orientations.c.
References BLI_findlink(), BLI_freelinkN(), CTX_data_scene(), CTX_wm_view3d(), Scene::transform_spaces, View3D::twmode, V3D_MANIP_CUSTOM, and V3D_MANIP_GLOBAL.
Referenced by delete_orientation_exec().
void BIF_selectTransformOrientation | ( | bContext * | C, |
TransformOrientation * | target | ||
) |
Definition at line 353 of file transform_orientations.c.
References CTX_data_scene(), CTX_wm_view3d(), ListBase::first, i, TransformOrientation::next, Scene::transform_spaces, View3D::twmode, and V3D_MANIP_CUSTOM.
Referenced by BIF_createTransformOrientation().
void BIF_selectTransformOrientationValue | ( | bContext * | C, |
int | orientation | ||
) |
Definition at line 368 of file transform_orientations.c.
References CTX_wm_view3d(), and View3D::twmode.
Referenced by select_orientation_exec().
Definition at line 476 of file transform_orientations.c.
References BONE_SELECTED, BONE_TRANSFORM, Bone::childbase, ListBase::first, Bone::flag, Bone::layer, bArmature::layer, and Bone::next.
Referenced by getTransformOrientation().
TransformOrientation* createBoneSpace | ( | bContext * | C, |
ReportList * | reports, | ||
char * | name, | ||
int | overwrite | ||
) | [read] |
Definition at line 154 of file transform_orientations.c.
References addMatrixSpace(), BKE_reports_prepend(), createSpaceNormalTangent(), getTransformOrientation(), and NULL.
Referenced by BIF_createTransformOrientation().
TransformOrientation* createMeshSpace | ( | bContext * | C, |
ReportList * | reports, | ||
char * | name, | ||
int | overwrite | ||
) | [read] |
Definition at line 174 of file transform_orientations.c.
References addMatrixSpace(), BKE_reports_prepend(), createSpaceNormal(), createSpaceNormalTangent(), getTransformOrientation(), NULL, ORIENTATION_EDGE, ORIENTATION_FACE, and ORIENTATION_VERT.
Referenced by BIF_createTransformOrientation().
TransformOrientation* createObjectSpace | ( | bContext * | C, |
ReportList * | UNUSEDreports, | ||
char * | name, | ||
int | overwrite | ||
) |
Definition at line 130 of file transform_orientations.c.
References addMatrixSpace(), copy_m3_m4(), CTX_data_active_base(), Object::id, MAX_ID_NAME, ID::name, normalize_m3(), NULL, Base::object, and Object::obmat.
int createSpaceNormal | ( | float | mat[3][3], |
float | normal[3] | ||
) |
Definition at line 225 of file transform_orientations.c.
References copy_v3_v3(), cross_v3_v3v3(), dot_v3v3(), normalize_m3(), and normalize_v3().
Referenced by createMeshSpace(), and ED_getTransformOrientationMatrix().
int createSpaceNormalTangent | ( | float | mat[3][3], |
float | normal[3], | ||
float | tangent[3] | ||
) |
Definition at line 248 of file transform_orientations.c.
References copy_v3_v3(), cross_v3_v3v3(), normalize_m3(), and normalize_v3().
Referenced by createBoneSpace(), createMeshSpace(), and ED_getTransformOrientationMatrix().
void ED_getTransformOrientationMatrix | ( | const bContext * | C, |
float | orientation_mat[][3], | ||
int | activeOnly | ||
) |
Definition at line 919 of file transform_orientations.c.
References createSpaceNormal(), createSpaceNormalTangent(), getTransformOrientation(), ORIENTATION_EDGE, ORIENTATION_FACE, ORIENTATION_NONE, ORIENTATION_NORMAL, ORIENTATION_VERT, and unit_m3().
static TransformOrientation* findOrientationName | ( | ListBase * | lb, |
const char * | name | ||
) | [static] |
Definition at line 82 of file transform_orientations.c.
References ListBase::first, TransformOrientation::name, TransformOrientation::next, and NULL.
Referenced by addMatrixSpace(), and uniqueOrientationNameCheck().
int getTransformOrientation | ( | const bContext * | C, |
float | normal[3], | ||
float | plane[3], | ||
int | activeOnly | ||
) |
Definition at line 560 of file transform_orientations.c.
References add_v3_v3(), Scene::base, Nurb::bezt, bPoseChannel::bone, BONE_SELECTED, BONE_TRANSFORM, bArmature::bonebase, bPose::chanbase, EditVert::co, copy_m3_m4(), copy_v3_v3(), count_bone_select(), cross_v3_v3v3(), CTX_data_edit_object(), CTX_data_scene(), CTX_wm_view3d(), CU_BEZIER, curve_editnurbs(), Object::data, bArmature::edbo, EditMesh::edges, Mesh::edit_mesh, EDITEDGE, editelems, EDITFACE, EDITVERT, ELEM, EM_editselection_normal(), EM_editselection_plane(), EM_get_actSelection(), EditEdge::f, EditVert::f, EditFace::f, BezTriple::f1, BezTriple::f2, BezTriple::f3, EditMesh::faces, ListBase::first, Object::flag, Bone::flag, EditBone::flag, MetaElem::flag, EditBone::head, invert_m3_m3(), EditBone::layer, bArmature::layer, Object::mode, mul_m3_v3(), mul_mat3_m4_v3(), EditFace::n, negate_v3(), negate_v3_v3(), Base::next, bPoseChannel::next, EditBone::next, MetaElem::next, Nurb::next, EditEdge::next, EditVert::next, EditFace::next, EditVert::no, normalize_v3(), NULL, OB_ARMATURE, OB_CURVE, OB_MBALL, OB_MESH, OB_MODE_ALL_PAINT, OB_MODE_PARTICLE_EDIT, OB_MODE_POSE, OB_SURF, OBACT, Base::object, Object::obmat, ORIENTATION_EDGE, ORIENTATION_FACE, ORIENTATION_NONE, ORIENTATION_NORMAL, ORIENTATION_VERT, Nurb::pntsu, Object::pose, bPoseChannel::pose_mat, MetaElem::quat, quat_to_mat4(), EditBone::roll, SELECT, sub_v3_v3v3(), EditBone::tail, TESTBASELIB, EditMesh::totedgesel, EditMesh::totfacesel, EditMesh::totvertsel, transpose_m3(), Nurb::type, EditSelection::type, Object::type, EditEdge::v1, EditFace::v1, EditEdge::v2, EditFace::v2, BezTriple::vec, vec_roll_to_mat3(), and EditMesh::verts.
Definition at line 500 of file transform_orientations.c.
References applyTransformOrientation(), TransInfo::ar, View3D::around, copy_m3_m3(), copy_m3_m4(), CTX_data_active_object(), CTX_wm_view3d(), TransInfo::current_orientation, ED_getTransformOrientationMatrix(), gimbal_axis(), Object::mode, normalize_m3(), OB_MODE_POSE, Object::obmat, ARegion::regiondata, ARegion::regiontype, RGN_TYPE_WINDOW, TransInfo::spacemtx, TransInfo::spacename, unit_m3(), V3D_ACTIVE, V3D_MANIP_GIMBAL, V3D_MANIP_GLOBAL, V3D_MANIP_LOCAL, V3D_MANIP_NORMAL, V3D_MANIP_VIEW, and RegionView3D::viewinv.
Referenced by initTransform().
static void uniqueOrientationName | ( | ListBase * | lb, |
char * | name | ||
) | [static] |
Definition at line 100 of file transform_orientations.c.
References BLI_uniquename_cb(), NULL, and uniqueOrientationNameCheck().
Referenced by addMatrixSpace().
static int uniqueOrientationNameCheck | ( | void * | arg, |
const char * | name | ||
) | [static] |
Definition at line 95 of file transform_orientations.c.
References findOrientationName(), and NULL.
Referenced by uniqueOrientationName().