diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 20:55:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-14 20:55:27 +0300 |
commit | 8b7482892b2ecb456be60b42fe1625156d19e954 (patch) | |
tree | b960b19759a4518d9ccaf7be01d08668d26414bf /source/blender/editors/transform | |
parent | d7e2607f964b7bff5c8cc2fd9437bdc2815a6f08 (diff) |
made most variables which are only used in a single file and not defined in header static for blenlib, blenkernel and editors.
Diffstat (limited to 'source/blender/editors/transform')
8 files changed, 52 insertions, 52 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index d7c81fc624f..72ba3269246 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2202,7 +2202,7 @@ static void constraintSizeLim(TransInfo *t, TransData *td) /* ************************** WARP *************************** */ -void postInputWarp(TransInfo *t, float values[3]) +static void postInputWarp(TransInfo *t, float values[3]) { mul_v3_fl(values, (float)(M_PI * 2)); @@ -2371,7 +2371,7 @@ int Warp(TransInfo *t, short UNUSED(mval[2])) /* ************************** SHEAR *************************** */ -void postInputShear(TransInfo *UNUSED(t), float values[3]) +static void postInputShear(TransInfo *UNUSED(t), float values[3]) { mul_v3_fl(values, 0.05f); } @@ -2857,7 +2857,7 @@ int ToSphere(TransInfo *t, short UNUSED(mval[2])) /* ************************** ROTATION *************************** */ -void postInputRotation(TransInfo *t, float values[3]) +static void postInputRotation(TransInfo *t, float values[3]) { if ((t->con.mode & CON_APPLY) && t->con.applyRot) { t->con.applyRot(t, NULL, t->axis, values); @@ -5890,7 +5890,7 @@ void BIF_TransformSetUndo(char *UNUSED(str)) } -void NDofTransform(void) +static void NDofTransform(void) { #if 0 // TRANSFORM_FIX_ME float fval[7]; diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index d5700db8c57..23899398921 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -69,7 +69,7 @@ static void drawObjectConstraint(TransInfo *t); /* ************************** CONSTRAINTS ************************* */ -void constraintAutoValues(TransInfo *t, float vec[3]) +static void constraintAutoValues(TransInfo *t, float vec[3]) { int mode = t->con.mode; if (mode & CON_APPLY) diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index bbadce5369d..de80c0a0423 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -1359,7 +1359,7 @@ static void calc_distanceCurveVerts(TransData *head, TransData *tail) { } /* Utility function for getting the handle data from bezier's */ -TransDataCurveHandleFlags *initTransDataCurveHandles(TransData *td, struct BezTriple *bezt) { +static TransDataCurveHandleFlags *initTransDataCurveHandles(TransData *td, struct BezTriple *bezt) { TransDataCurveHandleFlags *hdata; td->flag |= TD_BEZTRIPLE; hdata = td->hdata = MEM_mallocN(sizeof(TransDataCurveHandleFlags), "CuHandle Data"); @@ -1941,7 +1941,7 @@ static void VertsToTransData(TransInfo *t, TransData *td, EditMesh *em, EditVert } } -void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head *td) { +static void createTransBMeshVerts(TransInfo *t, BME_Mesh *bm, BME_TransData_Head *td) { BME_Vert *v; BME_TransData *vtd; TransData *tob; @@ -5106,7 +5106,7 @@ static void NodeToTransData(TransData *td, TransData2D *td2d, bNode *node) unit_m3(td->smtx); } -void createTransNodeData(bContext *C, TransInfo *t) +static void createTransNodeData(bContext *C, TransInfo *t) { TransData *td; TransData2D *td2d; diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c index 85a7526b7b4..8f7c1001fe8 100644 --- a/source/blender/editors/transform/transform_generics.c +++ b/source/blender/editors/transform/transform_generics.c @@ -1318,7 +1318,7 @@ void calculateCenterCursor2D(TransInfo *t) calculateCenter2D(t); } -void calculateCenterCursorGraph2D(TransInfo *t) +static void calculateCenterCursorGraph2D(TransInfo *t) { SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first; Scene *scene= t->scene; diff --git a/source/blender/editors/transform/transform_input.c b/source/blender/editors/transform/transform_input.c index a06e5ab21e6..6a9f89362f1 100644 --- a/source/blender/editors/transform/transform_input.c +++ b/source/blender/editors/transform/transform_input.c @@ -38,7 +38,7 @@ /* ************************** INPUT FROM MOUSE *************************** */ -void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +static void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float vec[3], dvec[3]; if(mi->precision) @@ -56,7 +56,7 @@ void InputVector(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) } -void InputSpring(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputSpring(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { float ratio, precise_ratio, dx, dy; if(mi->precision) @@ -82,7 +82,7 @@ void InputSpring(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float outp output[0] = ratio; } -void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) +static void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { InputSpring(t, mi, mval, output); @@ -94,7 +94,7 @@ void InputSpringFlip(TransInfo *t, MouseInput *mi, short mval[2], float output[3 } } -void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { if(mi->precision) @@ -112,7 +112,7 @@ void InputTrackBall(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float o output[1] *= mi->factor; } -void InputHorizontalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputHorizontalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float x, pad; pad = t->ar->winx / 10; @@ -129,7 +129,7 @@ void InputHorizontalRatio(TransInfo *t, MouseInput *mi, short mval[2], float out output[0] = (x - pad) / (t->ar->winx - 2 * pad); } -void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float vec[3]; InputVector(t, mi, mval, vec); @@ -138,7 +138,7 @@ void InputHorizontalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[0] = dot_v3v3(t->viewinv[0], vec) * 2.0f; } -void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float y, pad; pad = t->ar->winy / 10; @@ -154,7 +154,7 @@ void InputVerticalRatio(TransInfo *t, MouseInput *mi, short mval[2], float outpu output[0] = (y - pad) / (t->ar->winy - 2 * pad); } -void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { +static void InputVerticalAbsolute(TransInfo *t, MouseInput *mi, short mval[2], float output[3]) { float vec[3]; InputVector(t, mi, mval, vec); @@ -179,7 +179,7 @@ void setCustomPoints(TransInfo *UNUSED(t), MouseInput *mi, short start[2], short data[3] = end[1]; } -void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { float length; float distance; @@ -212,7 +212,7 @@ void InputCustomRatio(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float } } -void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) +static void InputAngle(TransInfo *UNUSED(t), MouseInput *mi, short mval[2], float output[3]) { double dx2 = mval[0] - mi->center[0]; double dy2 = mval[1] - mi->center[1]; diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index d69ba22585b..49080b86e87 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -546,7 +546,7 @@ int calc_manipulator_stats(const bContext *C) } /* don't draw axis perpendicular to the view */ -void test_manipulator_axis(const bContext *C) +static void test_manipulator_axis(const bContext *C) { RegionView3D *rv3d= CTX_wm_region_view3d(C); float angle; diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c index 82cec1eec42..5c42a59ac69 100644 --- a/source/blender/editors/transform/transform_ops.c +++ b/source/blender/editors/transform/transform_ops.c @@ -54,20 +54,20 @@ typedef struct TransformModeItem static float VecOne[3] = {1, 1, 1}; -char OP_TRANSLATION[] = "TRANSFORM_OT_translate"; -char OP_ROTATION[] = "TRANSFORM_OT_rotate"; -char OP_TOSPHERE[] = "TRANSFORM_OT_tosphere"; -char OP_RESIZE[] = "TRANSFORM_OT_resize"; -char OP_SHEAR[] = "TRANSFORM_OT_shear"; -char OP_WARP[] = "TRANSFORM_OT_warp"; -char OP_SHRINK_FATTEN[] = "TRANSFORM_OT_shrink_fatten"; -char OP_PUSH_PULL[] = "TRANSFORM_OT_push_pull"; -char OP_TILT[] = "TRANSFORM_OT_tilt"; -char OP_TRACKBALL[] = "TRANSFORM_OT_trackball"; -char OP_MIRROR[] = "TRANSFORM_OT_mirror"; -char OP_EDGE_SLIDE[] = "TRANSFORM_OT_edge_slide"; -char OP_EDGE_CREASE[] = "TRANSFORM_OT_edge_crease"; -char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide"; +static char OP_TRANSLATION[] = "TRANSFORM_OT_translate"; +static char OP_ROTATION[] = "TRANSFORM_OT_rotate"; +static char OP_TOSPHERE[] = "TRANSFORM_OT_tosphere"; +static char OP_RESIZE[] = "TRANSFORM_OT_resize"; +static char OP_SHEAR[] = "TRANSFORM_OT_shear"; +static char OP_WARP[] = "TRANSFORM_OT_warp"; +static char OP_SHRINK_FATTEN[] = "TRANSFORM_OT_shrink_fatten"; +static char OP_PUSH_PULL[] = "TRANSFORM_OT_push_pull"; +static char OP_TILT[] = "TRANSFORM_OT_tilt"; +static char OP_TRACKBALL[] = "TRANSFORM_OT_trackball"; +static char OP_MIRROR[] = "TRANSFORM_OT_mirror"; +static char OP_EDGE_SLIDE[] = "TRANSFORM_OT_edge_slide"; +static char OP_EDGE_CREASE[] = "TRANSFORM_OT_edge_crease"; +static char OP_SEQ_SLIDE[] = "TRANSFORM_OT_seq_slide"; void TRANSFORM_OT_translate(struct wmOperatorType *ot); void TRANSFORM_OT_rotate(struct wmOperatorType *ot); @@ -84,7 +84,7 @@ void TRANSFORM_OT_edge_slide(struct wmOperatorType *ot); void TRANSFORM_OT_edge_crease(struct wmOperatorType *ot); void TRANSFORM_OT_seq_slide(struct wmOperatorType *ot); -TransformModeItem transform_modes[] = +static TransformModeItem transform_modes[] = { {OP_TRANSLATION, TFM_TRANSLATION, TRANSFORM_OT_translate}, {OP_ROTATION, TFM_ROTATION, TRANSFORM_OT_rotate}, @@ -114,7 +114,7 @@ static int snap_type_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; } -void TRANSFORM_OT_snap_type(wmOperatorType *ot) +static void TRANSFORM_OT_snap_type(wmOperatorType *ot) { /* identifiers */ ot->name= "Snap Type"; @@ -159,7 +159,7 @@ static int select_orientation_invoke(bContext *C, wmOperator *UNUSED(op), wmEven return OPERATOR_CANCELLED; } -void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot) { PropertyRNA *prop; @@ -214,7 +214,7 @@ static int delete_orientation_poll(bContext *C) return selected_index >= 0; } -void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_delete_orientation(struct wmOperatorType *ot) { /* identifiers */ ot->name = "Delete Orientation"; @@ -249,7 +249,7 @@ static int create_orientation_invoke(bContext *C, wmOperator *op, wmEvent *UNUSE return create_orientation_exec(C, op); } -void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) +static void TRANSFORM_OT_create_orientation(struct wmOperatorType *ot) { /* identifiers */ ot->name = "Create Orientation"; diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 93403ea5817..cf84e02b8ae 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -356,7 +356,7 @@ int validSnappingNormal(TransInfo *t) return 0; } -void initSnappingMode(TransInfo *t) +static void initSnappingMode(TransInfo *t) { ToolSettings *ts = t->settings; Object *obedit = t->obedit; @@ -1021,7 +1021,7 @@ void TargetSnapClosest(TransInfo *t) } /*================================================================*/ -int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4co, float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) +static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4co, float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) { float lambda; int result; @@ -1072,7 +1072,7 @@ int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], float *v4 return retval; } -int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2no[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) +static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2no[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) { float intersect[3] = {0, 0, 0}, ray_end[3], dvec[3]; int result; @@ -1157,7 +1157,7 @@ int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], short v2n return retval; } -int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) +static int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray_start[3], float ray_start_local[3], float ray_normal_local[3], float obmat[][4], float timat[][3], float *loc, float *no, int *dist, float *depth) { int retval = 0; float dvec[3]; @@ -1201,7 +1201,7 @@ int snapVertex(ARegion *ar, float vco[3], short vno[3], float mval[2], float ray return retval; } -int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *UNUSED(no), int *dist, float *depth) +static int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *UNUSED(no), int *dist, float *depth) { float imat[4][4]; float ray_start_local[3], ray_normal_local[3]; @@ -1266,7 +1266,7 @@ int snapArmature(short snap_mode, ARegion *ar, Object *ob, bArmature *arm, float return retval; } -int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, EditMesh *em, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) +static int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, EditMesh *em, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) { int retval = 0; int totvert = dm->getNumVerts(dm); @@ -1534,7 +1534,7 @@ int snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMesh *dm, E return retval; } -int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) +static int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obmat[][4], float ray_start[3], float ray_normal[3], float mval[2], float *loc, float *no, int *dist, float *depth) { ToolSettings *ts= scene->toolsettings; int retval = 0; @@ -1567,7 +1567,7 @@ int snapObject(Scene *scene, ARegion *ar, Object *ob, int editobject, float obma return retval; } -int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) { +static int snapObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, float mval[2], int *dist, float *loc, float *no, SnapMode mode) { Base *base; float depth = FLT_MAX; int retval = 0; @@ -1636,7 +1636,7 @@ int snapObjectsContext(bContext *C, float mval[2], int *dist, float *loc, float /******************** PEELING *********************************/ -int cmpPeel(void *arg1, void *arg2) +static int cmpPeel(void *arg1, void *arg2) { DepthPeel *p1 = arg1; DepthPeel *p2 = arg2; @@ -1654,7 +1654,7 @@ int cmpPeel(void *arg1, void *arg2) return val; } -void removeDoublesPeel(ListBase *depth_peels) +static void removeDoublesPeel(ListBase *depth_peels) { DepthPeel *peel; @@ -1676,7 +1676,7 @@ void removeDoublesPeel(ListBase *depth_peels) } } -void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], Object *ob) +static void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], Object *ob) { DepthPeel *peel = MEM_callocN(sizeof(DepthPeel), "DepthPeel"); @@ -1690,7 +1690,7 @@ void addDepthPeel(ListBase *depth_peels, float depth, float p[3], float no[3], O peel->flag = 0; } -int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], float UNUSED(mval[2]), ListBase *depth_peels) +static int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_start[3], float ray_normal[3], float UNUSED(mval[2]), ListBase *depth_peels) { int retval = 0; int totvert = dm->getNumVerts(dm); @@ -1798,7 +1798,7 @@ int peelDerivedMesh(Object *ob, DerivedMesh *dm, float obmat[][4], float ray_sta return retval; } -int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, float mval[2]) +static int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase *depth_peels, float mval[2]) { Base *base; int retval = 0; |