Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c106
1 files changed, 53 insertions, 53 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 7a5c14b1dab..8e1206ad0b3 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -76,9 +76,9 @@ typedef struct SK_GestureAction {
GestureApplyFct apply;
} SK_GestureAction;
-SK_Point boneSnap;
-int LAST_SNAP_POINT_VALID = 0;
-float LAST_SNAP_POINT[3];
+static SK_Point boneSnap;
+static int LAST_SNAP_POINT_VALID = 0;
+static float LAST_SNAP_POINT[3];
typedef struct SK_StrokeIterator {
@@ -129,7 +129,7 @@ int sk_hasOverdraw(SK_Sketch *sketch, SK_Stroke *stk);
/******************** GESTURE ACTIONS ******************************/
-SK_GestureAction GESTURE_ACTIONS[] =
+static SK_GestureAction GESTURE_ACTIONS[] =
{
{"Cut", sk_detectCutGesture, sk_applyCutGesture},
{"Trim", sk_detectTrimGesture, sk_applyTrimGesture},
@@ -143,10 +143,10 @@ SK_GestureAction GESTURE_ACTIONS[] =
/******************** TEMPLATES UTILS *************************/
-char *TEMPLATES_MENU = NULL;
-int TEMPLATES_CURRENT = 0;
-GHash *TEMPLATES_HASH = NULL;
-RigGraph *TEMPLATE_RIGG = NULL;
+static char *TEMPLATES_MENU = NULL;
+static int TEMPLATES_CURRENT = 0;
+static GHash *TEMPLATES_HASH = NULL;
+static RigGraph *TEMPLATE_RIGG = NULL;
void BIF_makeListTemplates(const bContext *C)
{
@@ -240,7 +240,7 @@ int BIF_currentTemplate(const bContext *C)
return TEMPLATES_CURRENT;
}
-RigGraph* sk_makeTemplateGraph(const bContext *C, Object *ob)
+static RigGraph* sk_makeTemplateGraph(const bContext *C, Object *ob)
{
Object *obedit = CTX_data_edit_object(C);
if (ob == obedit)
@@ -348,7 +348,7 @@ void BIF_setTemplate(bContext *C, int index)
/*********************** CONVERSION ***************************/
-void sk_autoname(bContext *C, ReebArc *arc)
+static void sk_autoname(bContext *C, ReebArc *arc)
{
ToolSettings *ts = CTX_data_tool_settings(C);
if (ts->skgen_retarget_options & SK_RETARGET_AUTONAME)
@@ -396,7 +396,7 @@ void sk_autoname(bContext *C, ReebArc *arc)
}
}
-ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3])
+static ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3])
{
ReebNode *node;
@@ -410,7 +410,7 @@ ReebNode *sk_pointToNode(SK_Point *pt, float imat[][4], float tmat[][3])
return node;
}
-ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3])
+static ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3])
{
ReebArc *arc;
int i;
@@ -434,7 +434,7 @@ ReebArc *sk_strokeToArc(SK_Stroke *stk, float imat[][4], float tmat[][3])
return arc;
}
-void sk_retargetStroke(bContext *C, SK_Stroke *stk)
+static void sk_retargetStroke(bContext *C, SK_Stroke *stk)
{
ToolSettings *ts = CTX_data_tool_settings(C);
Object *obedit = CTX_data_edit_object(C);
@@ -465,7 +465,7 @@ void sk_retargetStroke(bContext *C, SK_Stroke *stk)
/**************************************************************/
-void sk_cancelStroke(SK_Sketch *sketch)
+static void sk_cancelStroke(SK_Sketch *sketch)
{
if (sketch->active_stroke != NULL)
{
@@ -475,18 +475,18 @@ void sk_cancelStroke(SK_Sketch *sketch)
}
-float sk_clampPointSize(SK_Point *pt, float size)
+static float sk_clampPointSize(SK_Point *pt, float size)
{
return MAX2(size * pt->size, size / 2);
}
-void sk_drawPoint(GLUquadric *quad, SK_Point *pt, float size)
+static void sk_drawPoint(GLUquadric *quad, SK_Point *pt, float size)
{
glTranslatef(pt->p[0], pt->p[1], pt->p[2]);
gluSphere(quad, sk_clampPointSize(pt, size), 8, 8);
}
-void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float size)
+static void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float size)
{
float vec1[3], vec2[3] = {0, 0, 1}, axis[3];
float angle, length;
@@ -507,7 +507,7 @@ void sk_drawEdge(GLUquadric *quad, SK_Point *pt0, SK_Point *pt1, float size)
gluCylinder(quad, sk_clampPointSize(pt1, size), sk_clampPointSize(pt0, size), length, 8, 8);
}
-void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float height)
+static void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float height)
{
float vec2[3] = {0, 0, 1}, axis[3];
float angle;
@@ -531,7 +531,7 @@ void sk_drawNormal(GLUquadric *quad, SK_Point *pt, float size, float height)
glPopMatrix();
}
-void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end)
+static void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end)
{
float rgb[3];
int i;
@@ -607,7 +607,7 @@ void sk_drawStroke(SK_Stroke *stk, int id, float color[3], int start, int end)
gluDeleteQuadric(quad);
}
-void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, NextSubdivisionFunc next_subdividion)
+static void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, NextSubdivisionFunc next_subdividion)
{
SK_Stroke *stk = ((SK_StrokeIterator*)iter)->stroke;
float head[3], tail[3];
@@ -643,7 +643,7 @@ void drawSubdividedStrokeBy(ToolSettings *toolsettings, BArcIterator *iter, Next
gluDeleteQuadric(quad);
}
-void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk)
+static void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk)
{
int head_index = -1;
int i;
@@ -694,7 +694,7 @@ void sk_drawStrokeSubdivision(ToolSettings *toolsettings, SK_Stroke *stk)
}
}
-SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *dist, int *index, int all_pts)
+static SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *dist, int *index, int all_pts)
{
ARegion *ar = CTX_wm_region(C);
SK_Point *pt = NULL;
@@ -727,7 +727,7 @@ SK_Point *sk_snapPointStroke(bContext *C, SK_Stroke *stk, short mval[2], int *di
return pt;
}
-SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short mval[2], int *dist)
+static SK_Point *sk_snapPointArmature(bContext *C, Object *ob, ListBase *ebones, short mval[2], int *dist)
{
ARegion *ar = CTX_wm_region(C);
SK_Point *pt = NULL;
@@ -791,7 +791,7 @@ int sk_hasOverdraw(SK_Sketch *sketch, SK_Stroke *stk)
(sketch->over.start != -1 || sketch->over.end != -1);
}
-void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
+static void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
{
if (sketch->over.target == NULL)
{
@@ -868,7 +868,7 @@ void sk_updateOverdraw(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa
}
/* return 1 on reverse needed */
-int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end)
+static int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end)
{
int retval = 0;
@@ -896,7 +896,7 @@ int sk_adjustIndexes(SK_Sketch *sketch, int *start, int *end)
return retval;
}
-void sk_endOverdraw(SK_Sketch *sketch)
+static void sk_endOverdraw(SK_Sketch *sketch)
{
SK_Stroke *stk = sketch->active_stroke;
@@ -925,7 +925,7 @@ void sk_endOverdraw(SK_Sketch *sketch)
}
-void sk_startStroke(SK_Sketch *sketch)
+static void sk_startStroke(SK_Sketch *sketch)
{
SK_Stroke *stk = sk_createStroke();
@@ -935,7 +935,7 @@ void sk_startStroke(SK_Sketch *sketch)
sk_resetOverdraw(sketch);
}
-void sk_endStroke(bContext *C, SK_Sketch *sketch)
+static void sk_endStroke(bContext *C, SK_Sketch *sketch)
{
ToolSettings *ts = CTX_data_tool_settings(C);
sk_shrinkStrokeBuffer(sketch->active_stroke);
@@ -948,7 +948,7 @@ void sk_endStroke(bContext *C, SK_Sketch *sketch)
sketch->active_stroke = NULL;
}
-void sk_updateDrawData(SK_DrawData *dd)
+static void sk_updateDrawData(SK_DrawData *dd)
{
dd->type = PT_CONTINUOUS;
@@ -956,7 +956,7 @@ void sk_updateDrawData(SK_DrawData *dd)
dd->previous_mval[1] = dd->mval[1];
}
-float sk_distanceDepth(bContext *C, float p1[3], float p2[3])
+static float sk_distanceDepth(bContext *C, float p1[3], float p2[3])
{
ARegion *ar = CTX_wm_region(C);
RegionView3D *rv3d = ar->regiondata;
@@ -977,7 +977,7 @@ float sk_distanceDepth(bContext *C, float p1[3], float p2[3])
return distance;
}
-void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float length, float distance)
+static void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float length, float distance)
{
ARegion *ar = CTX_wm_region(C);
ScrArea *sa = CTX_wm_area(C);
@@ -1004,7 +1004,7 @@ void sk_interpolateDepth(bContext *C, SK_Stroke *stk, int start, int end, float
}
}
-void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData *dd)
+static void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData *dd)
{
ARegion *ar = CTX_wm_region(C);
/* copied from grease pencil, need fixing */
@@ -1026,7 +1026,7 @@ void sk_projectDrawPoint(bContext *C, float vec[3], SK_Stroke *stk, SK_DrawData
sub_v3_v3v3(vec, fp, dvec);
}
-int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *UNUSED(sketch), SK_Stroke *stk, SK_DrawData *dd)
+static int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *UNUSED(sketch), SK_Stroke *stk, SK_DrawData *dd)
{
pt->type = dd->type;
pt->mode = PT_PROJECT;
@@ -1035,7 +1035,7 @@ int sk_getStrokeDrawPoint(bContext *C, SK_Point *pt, SK_Sketch *UNUSED(sketch),
return 1;
}
-int sk_addStrokeDrawPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
+static int sk_addStrokeDrawPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
{
ARegion *ar = CTX_wm_region(C);
RegionView3D *rv3d = ar->regiondata;
@@ -1050,7 +1050,7 @@ int sk_addStrokeDrawPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_Dra
return 1;
}
-int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
+static int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
{
ToolSettings *ts = CTX_data_tool_settings(C);
int point_added = 0;
@@ -1206,7 +1206,7 @@ int sk_getStrokeSnapPoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Strok
return point_added;
}
-int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
+static int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd)
{
int point_added;
ARegion *ar = CTX_wm_region(C);
@@ -1257,7 +1257,7 @@ int sk_addStrokeSnapPoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_Dra
return point_added;
}
-void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
+static void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
{
ToolSettings *ts = CTX_data_tool_settings(C);
int point_added = 0;
@@ -1278,7 +1278,7 @@ void sk_addStrokePoint(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawDa
}
}
-void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
+static void sk_getStrokePoint(bContext *C, SK_Point *pt, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
{
int point_added = 0;
@@ -1466,7 +1466,7 @@ static int iteratorStopped(void *arg)
}
}
-void sk_convertStroke(bContext *C, SK_Stroke *stk)
+static void sk_convertStroke(bContext *C, SK_Stroke *stk)
{
Object *obedit = CTX_data_edit_object(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -1558,7 +1558,7 @@ void sk_convertStroke(bContext *C, SK_Stroke *stk)
}
}
-void sk_convert(bContext *C, SK_Sketch *sketch)
+static void sk_convert(bContext *C, SK_Sketch *sketch)
{
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Stroke *stk;
@@ -1584,7 +1584,7 @@ void sk_convert(bContext *C, SK_Sketch *sketch)
/* returns the number of self intersections */
-int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture)
+static int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture)
{
ARegion *ar = CTX_wm_region(C);
int added = 0;
@@ -1633,7 +1633,7 @@ int sk_getSelfIntersections(bContext *C, ListBase *list, SK_Stroke *gesture)
return added;
}
-int cmpIntersections(void *i1, void *i2)
+static int cmpIntersections(void *i1, void *i2)
{
SK_Intersection *isect1 = i1, *isect2 = i2;
@@ -1665,7 +1665,7 @@ int cmpIntersections(void *i1, void *i2)
/* returns the maximum number of intersections per stroke */
-int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Stroke *gesture)
+static int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Stroke *gesture)
{
ARegion *ar = CTX_wm_region(C);
ScrArea *sa = CTX_wm_area(C);
@@ -1735,7 +1735,7 @@ int sk_getIntersections(bContext *C, ListBase *list, SK_Sketch *sketch, SK_Strok
return added;
}
-int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture)
+static int sk_getSegments(SK_Stroke *segments, SK_Stroke *gesture)
{
SK_StrokeIterator sk_iter;
BArcIterator *iter = (BArcIterator*)&sk_iter;
@@ -2124,7 +2124,7 @@ static void sk_freeGesture(SK_Gesture *gest)
BLI_freelistN(&gest->self_intersections);
}
-void sk_applyGesture(bContext *C, SK_Sketch *sketch)
+static void sk_applyGesture(bContext *C, SK_Sketch *sketch)
{
SK_Gesture gest;
SK_GestureAction *act;
@@ -2147,7 +2147,7 @@ void sk_applyGesture(bContext *C, SK_Sketch *sketch)
/********************************************/
-int sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend)
+static int sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend)
{
ViewContext vc;
rcti rect;
@@ -2198,7 +2198,7 @@ int sk_selectStroke(bContext *C, SK_Sketch *sketch, short mval[2], int extend)
return 0;
}
-void sk_queueRedrawSketch(SK_Sketch *sketch)
+static void sk_queueRedrawSketch(SK_Sketch *sketch)
{
if (sketch->active_stroke != NULL)
{
@@ -2212,7 +2212,7 @@ void sk_queueRedrawSketch(SK_Sketch *sketch)
}
}
-void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int with_names)
+static void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int with_names)
{
ToolSettings *ts= scene->toolsettings;
SK_Stroke *stk;
@@ -2340,7 +2340,7 @@ void sk_drawSketch(Scene *scene, View3D *UNUSED(v3d), SK_Sketch *sketch, int wit
}
}
-int sk_finish_stroke(bContext *C, SK_Sketch *sketch)
+static int sk_finish_stroke(bContext *C, SK_Sketch *sketch)
{
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -2375,7 +2375,7 @@ int sk_finish_stroke(bContext *C, SK_Sketch *sketch)
return 0;
}
-void sk_start_draw_stroke(SK_Sketch *sketch)
+static void sk_start_draw_stroke(SK_Sketch *sketch)
{
if (sketch->active_stroke == NULL)
{
@@ -2386,12 +2386,12 @@ void sk_start_draw_stroke(SK_Sketch *sketch)
}
}
-void sk_start_draw_gesture(SK_Sketch *sketch)
+static void sk_start_draw_gesture(SK_Sketch *sketch)
{
sketch->gesture = sk_createStroke();
}
-int sk_draw_stroke(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
+static int sk_draw_stroke(bContext *C, SK_Sketch *sketch, SK_Stroke *stk, SK_DrawData *dd, short snap)
{
if (sk_stroke_filtermval(dd))
{
@@ -2769,7 +2769,7 @@ int ED_operator_sketch_mode_active_stroke(bContext *C)
}
}
-int ED_operator_sketch_mode_gesture(bContext *C)
+static int ED_operator_sketch_mode_gesture(bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Sketch *sketch = contextSketch(C, 0);