# fake module importing
def fake_module(mod_name, mod_path, speedy=True):
if bpy.app.debug:
- print("fake_module", mod_name, mod_path)
+ print("fake_module", mod_path, mod_name)
import ast
ModuleType = type(ast)
file_mod = open(mod_path, "r", encoding='UTF-8')
void pchan_mat3_to_rot(struct bPoseChannel *pchan, float mat[][3], short use_compat);
void pchan_apply_mat4(struct bPoseChannel *pchan, float mat[][4], short use_comat);
void pchan_to_mat4(struct bPoseChannel *pchan, float chan_mat[4][4]);
+void pchan_calc_mat(struct bPoseChannel *pchan);
/* Rotation Mode Conversions - Used for PoseChannels + Objects... */
void BKE_rotMode_change_values(float quat[4], float eul[3], float axis[3], float *angle, short oldMode, short newMode);
/***/
-enum {
+static enum {
Vert_eEffected= (1<<0),
Vert_eChanged= (1<<1),
Vert_eSeam= (1<<2),
} VertFlags;
-enum {
+static enum {
Edge_eEffected= (1<<0),
} CCGEdgeFlags;
-enum {
+static enum {
Face_eEffected= (1<<0),
} FaceFlags;
/* loc/rot/size to mat4 */
/* used in constraint.c too */
-void chan_calc_mat(bPoseChannel *pchan)
+void pchan_calc_mat(bPoseChannel *pchan)
{
/* this is just a wrapper around the copy of this function which calculates the matrix
* and stores the result in any given channel
parchan= pchan->parent;
/* this gives a chan_mat with actions (ipos) results */
- if(do_extra) chan_calc_mat(pchan);
+ if(do_extra) pchan_calc_mat(pchan);
else unit_m4(pchan->chan_mat);
/* construct the posemat based on PoseChannels, that we do before applying constraints */
}
-int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end )
+static int cloth_collision_response_static ( ClothModifierData *clmd, CollisionModifierData *collmd, CollPair *collpair, CollPair *collision_end )
{
int result = 0;
Cloth *cloth1;
}
//Determines collisions on overlap, collisions are written to collpair[i] and collision+number_collision_found is returned
-CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, CollPair *collpair )
+static CollPair* cloth_collision ( ModifierData *md1, ModifierData *md2, BVHTreeOverlap *overlap, CollPair *collpair )
{
ClothModifierData *clmd = ( ClothModifierData * ) md1;
CollisionModifierData *collmd = ( CollisionModifierData * ) md2;
static void actcon_get_tarmat (bConstraint *con, bConstraintOb *cob, bConstraintTarget *ct, float UNUSED(ctime))
{
- extern void chan_calc_mat(bPoseChannel *chan);
bActionConstraint *data = con->data;
if (VALID_CONS_TARGET(ct)) {
what_does_obaction(cob->scene, cob->ob, &workob, pose, data->act, pchan->name, t);
/* convert animation to matrices for use here */
- chan_calc_mat(tchan);
+ pchan_calc_mat(tchan);
copy_m4_m4(ct->matrix, tchan->chan_mat);
/* Clean up */
/* there is also a timing calculation in drawobject() */
-int no_speed_curve= 0;
+static int no_speed_curve= 0;
void disable_speed_curve(int val)
{
add_v3_v3v3(mat[3], ob->loc, ob->dloc);
}
+/* extern */
int enable_cu_speed= 1;
static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[][4])
***********************************************************************************************************/
#define PSYS_FLUID_SPRINGS_INITIAL_SIZE 256
-ParticleSpring *add_fluid_spring(ParticleSystem *psys, ParticleSpring *spring)
+static ParticleSpring *add_fluid_spring(ParticleSystem *psys, ParticleSpring *spring)
{
/* Are more refs required? */
if(psys->alloc_fluidsprings == 0 || psys->fluid_springs == NULL) {
return psys->fluid_springs + psys->tot_fluidsprings - 1;
}
-void delete_fluid_spring(ParticleSystem *psys, int j)
+static void delete_fluid_spring(ParticleSystem *psys, int j)
{
if (j != psys->tot_fluidsprings - 1)
psys->fluid_springs[j] = psys->fluid_springs[psys->tot_fluidsprings - 1];
}
}
-EdgeHash *build_fluid_springhash(ParticleSystem *psys)
+static EdgeHash *build_fluid_springhash(ParticleSystem *psys)
{
EdgeHash *springhash = NULL;
ParticleSpring *spring;
#define TRI_UVOFFSET (1./4.)
-int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm)
+static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm)
{
if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid)
{
#include "BLI_utildefines.h"
-
+#include "BKE_writeframeserver.h"
#include "BKE_global.h"
#include "BKE_report.h"
-
#include "DNA_scene_types.h"
static int sock;
#ifndef BLI_JITTER_H
#define BLI_JITTER_H
-extern void BLI_initjit(float *jitarr, int num);
-extern void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
-extern void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
+void BLI_initjit(float *jitarr, int num);
+void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1);
+void BLI_jitterate2(float *jit1, float *jit2, int num, float rad2);
#endif
#define BLI_MEMPOOL_H
struct BLI_mempool;
-typedef struct BLI_mempool BLI_mempool;
-
-BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk, int use_sysmalloc);
-void *BLI_mempool_alloc(BLI_mempool *pool);
-void *BLI_mempool_calloc(BLI_mempool *pool);
-void BLI_mempool_free(BLI_mempool *pool, void *addr);
-void BLI_mempool_destroy(BLI_mempool *pool);
+struct BLI_mempool *BLI_mempool_create(int esize, int tote, int pchunk, int use_sysmalloc);
+void *BLI_mempool_alloc(struct BLI_mempool *pool);
+void *BLI_mempool_calloc(struct BLI_mempool *pool);
+void BLI_mempool_free(struct BLI_mempool *pool, void *addr);
+void BLI_mempool_destroy(struct BLI_mempool *pool);
#endif
float cellNoise(float x, float y, float z);
void cellNoiseV(float x, float y, float z, float *ca);
-
#ifdef __cplusplus
}
#endif
* @param f The function to use as callback
* @attention used in creator.c
*/
-void BLI_setErrorCallBack(void (*f)(char*));
+void BLI_setErrorCallBack(void (*f)(const char*));
/**
* Set a function to be able to interrupt the execution of processing
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
+#include "BLI_mempool.h"
#include <string.h>
typedef struct BLI_freenode{
#include "MEM_guardedalloc.h"
#include "BLI_rand.h"
+#include "BLI_jitter.h"
void BLI_jitterate1(float *jit1, float *jit2, int num, float rad1)
#include <math.h>
+#include "BLI_noise.h"
+
/* local */
static float noise3_perlin(float vec[3]);
//static float turbulence_perlin(float *point, float lofreq, float hifreq);
0xA2,0xA0};
-float g[512+2][3]= {
+static float g[512+2][3]= {
{0.33783, 0.715698, -0.611206},
{-0.944031, -0.326599, -0.045624},
{-0.101074, -0.416443, -0.903503},
/* Bitmap */
typedef char* BLI_bitmap;
-BLI_bitmap BLI_bitmap_new(int tot)
+static BLI_bitmap BLI_bitmap_new(int tot)
{
return MEM_callocN((tot >> 3) + 1, "BLI bitmap");
}
-int BLI_bitmap_get(BLI_bitmap b, int index)
+static int BLI_bitmap_get(BLI_bitmap b, int index)
{
return b[index >> 3] & (1 << (index & 7));
}
-void BLI_bitmap_set(BLI_bitmap b, int index)
+static void BLI_bitmap_set(BLI_bitmap b, int index)
{
b[index >> 3] |= (1 << (index & 7));
}
-void BLI_bitmap_clear(BLI_bitmap b, int index)
+static void BLI_bitmap_clear(BLI_bitmap b, int index)
{
b[index >> 3] &= ~(1 << (index & 7));
}
}
}
-void check_partitioning(int *prim_indices, int lo, int hi, int axis,
+static void check_partitioning(int *prim_indices, int lo, int hi, int axis,
float mid, BBC *prim_bbc, int index_of_2nd_partition)
{
int i;
offset and start indicate a range in the array of primitive indices
*/
-void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc,
+static void build_sub(PBVH *bvh, int node_index, BB *cb, BBC *prim_bbc,
int offset, int count)
{
int i, axis, end;
return node->tmin;
}
-void BLI_pbvh_search_callback_occluded(PBVH *bvh,
+static void BLI_pbvh_search_callback_occluded(PBVH *bvh,
BLI_pbvh_SearchCallback scb, void *search_data,
BLI_pbvh_HitOccludedCallback hcb, void *hit_data)
{
* ***** END GPL LICENSE BLOCK *****
*
*/
-
-#include "DNA_vec_types.h"
#include <stdio.h>
#include <math.h>
+#include "DNA_vec_types.h"
+#include "BLI_rect.h"
+
int BLI_rcti_is_empty(rcti * rect)
{
return ((rect->xmax<=rect->xmin) ||
#include "MEM_guardedalloc.h"
-
+#include "BLI_callbacks.h"
#include "BLI_editVert.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
+#include "BLI_scanfill.h"
/* callbacks for errors and interrupts and some goo */
static void (*BLI_localErrorCallBack)(const char*) = NULL;
* ***** END GPL LICENSE BLOCK *****
*/
-#ifdef WIN32
#include "PIL_time.h"
+
+#ifdef WIN32
#include <windows.h>
double PIL_check_seconds_timer(void)
#include "DNA_object_types.h"
#include "BLI_math.h"
+#include "BLI_uvproject.h"
typedef struct UvCameraInfo {
float camangle;
#include "RNA_access.h"
-
#include "UI_interface.h"
#include "UI_resources.h"
+#include "ED_anim_api.h"
+
/* ********************************************** */
/* UI STUFF */
#include "BKE_global.h"
#include "RNA_access.h"
+#include "RNA_enum_types.h"
#include "ED_anim_api.h"
#include "ED_keyframing.h"
*/
/* globals for copy/paste data (like for other copy/paste buffers) */
-ListBase animcopybuf = {NULL, NULL};
+static ListBase animcopybuf = {NULL, NULL};
static float animcopy_firstframe= 999999999.0f;
static float animcopy_lastframe= -999999999.0f;
static float animcopy_cfra= 0.0;
/* -------------- 'Smarter' Keyframing Functions -------------------- */
/* return codes for new_key_needed */
-enum {
+static enum {
KEYNEEDED_DONTADD = 0,
KEYNEEDED_JUSTADD,
KEYNEEDED_DELPREV,
/* KEYFRAME MODIFICATION */
/* mode for commonkey_modifykey */
-enum {
+static enum {
COMMONKEY_MODE_INSERT = 0,
COMMONKEY_MODE_DELETE,
} eCommonModifyKey_Modes;
/* Checks whether an Action has a keyframe for a given frame
* Since we're only concerned whether a keyframe exists, we can simply loop until a match is found...
*/
-short action_frame_has_keyframe (bAction *act, float frame, short filter)
+static short action_frame_has_keyframe (bAction *act, float frame, short filter)
{
FCurve *fcu;
}
/* Checks whether an Object has a keyframe for a given frame */
-short object_frame_has_keyframe (Object *ob, float frame, short filter)
+static short object_frame_has_keyframe (Object *ob, float frame, short filter)
{
/* error checking */
if (ob == NULL)
/* REGISTERED KEYING SETS */
/* Keying Set Type Info declarations */
-ListBase keyingset_type_infos = {NULL, NULL};
+static ListBase keyingset_type_infos = {NULL, NULL};
/* Built-In Keying Sets (referencing type infos)*/
ListBase builtin_keyingsets = {NULL, NULL};
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-void hide_selected_armature_bones(Scene *scene)
+static void hide_selected_armature_bones(Scene *scene)
{
Object *obedit= scene->obedit; // XXX get from context
bArmature *arm= obedit->data;
ARC_USED = 2
} ArcUsageFlags;
-RigGraph *GLOBAL_RIGG = NULL;
+static RigGraph *GLOBAL_RIGG = NULL;
/*******************************************************************************************************/
VECCOPY(up_axis, mat[2]);
}
-float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float qrot[4], float qroll[4], float aligned_axis[3])
+static float rollBoneByQuatAligned(EditBone *bone, float old_up_axis[3], float qrot[4], float qroll[4], float aligned_axis[3])
{
float nor[3], new_up_axis[3], x_axis[3], z_axis[3];
/*******************************************************************************************************/
-void RIG_printNode(RigNode *node, const char name[])
+static void RIG_printNode(RigNode *node, const char name[])
{
printf("%s %p %i <%0.3f, %0.3f, %0.3f>\n", name, (void *)node, node->degree, node->p[0], node->p[1], node->p[2]);
}
}
-void RIG_printArcBones(RigArc *arc)
+static void RIG_printArcBones(RigArc *arc)
{
RigEdge *edge;
printf("\n");
}
-void RIG_printCtrl(RigControl *ctrl, char *indent)
+static void RIG_printCtrl(RigControl *ctrl, char *indent)
{
char text[128];
printf("%sFlag: %i\n", indent, ctrl->flag);
}
-void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs)
+static void RIG_printLinkedCtrl(RigGraph *rg, EditBone *bone, int tabs)
{
RigControl *ctrl;
char indent[64];
}
}
-void RIG_printArc(RigGraph *rg, RigArc *arc)
+static void RIG_printArc(RigGraph *rg, RigArc *arc)
{
RigEdge *edge;
RIG_printNode((RigNode*)arc->tail, "tail");
}
-void RIG_printGraph(RigGraph *rg)
+static void RIG_printGraph(RigGraph *rg)
{
RigArc *arc;
return rg;
}
-RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm)
+static RigGraph *armatureSelectedToGraph(bContext *C, Object *ob, bArmature *arm)
{
Object *obedit = CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
}
#endif
-void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level_limit)
+static void generateMissingArcsFromNode(RigGraph *rigg, ReebNode *node, int multi_level_limit)
{
while (node->multi_level > multi_level_limit && node->link_up)
{
}
}
-void generateMissingArcs(RigGraph *rigg)
+static void generateMissingArcs(RigGraph *rigg)
{
ReebGraph *reebg;
int multi_level_limit = 5;
return total;
}
-void BIF_freeRetarget(void)
+static void BIF_freeRetarget(void)
{
if (GLOBAL_RIGG)
{
}
}
-void BIF_retargetArmature(bContext *C)
+static void BIF_retargetArmature(bContext *C)
{
ReebGraph *reebg;
double start_time, end_time;
// allqueue(REDRAWVIEW3D, 0);
}
-void BIF_adjustRetarget(bContext *C)
+static void BIF_adjustRetarget(bContext *C)
{
if (GLOBAL_RIGG)
{
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 {
/******************** GESTURE ACTIONS ******************************/
-SK_GestureAction GESTURE_ACTIONS[] =
+static SK_GestureAction GESTURE_ACTIONS[] =
{
{"Cut", sk_detectCutGesture, sk_applyCutGesture},
{"Trim", sk_detectTrimGesture, sk_applyTrimGesture},
/******************** 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)
{
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)
/*********************** 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)
}
}
-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;
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;
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);
/**************************************************************/
-void sk_cancelStroke(SK_Sketch *sketch)
+static void sk_cancelStroke(SK_Sketch *sketch)
{
if (sketch->active_stroke != NULL)
{
}
-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;
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;
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;
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];
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;
}
}
-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;
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;
(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)
{
}
/* 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;
return retval;
}
-void sk_endOverdraw(SK_Sketch *sketch)
+static void sk_endOverdraw(SK_Sketch *sketch)
{
SK_Stroke *stk = sketch->active_stroke;
}
-void sk_startStroke(SK_Sketch *sketch)
+static void sk_startStroke(SK_Sketch *sketch)
{
SK_Stroke *stk = sk_createStroke();
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);
sketch->active_stroke = NULL;
}
-void sk_updateDrawData(SK_DrawData *dd)
+static void sk_updateDrawData(SK_DrawData *dd)
{
dd->type = PT_CONTINUOUS;
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;
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);
}
}
-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 */
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;
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;
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;
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);
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;
}
}
-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;
}
}
-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);
}
}
-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;
/* 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;
return added;
}
-int cmpIntersections(void *i1, void *i2)
+static int cmpIntersections(void *i1, void *i2)
{
SK_Intersection *isect1 = i1, *isect2 = 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);
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;
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;
/********************************************/
-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;
return 0;
}
-void sk_queueRedrawSketch(SK_Sketch *sketch)
+static void sk_queueRedrawSketch(SK_Sketch *sketch)
{
if (sketch->active_stroke != NULL)
{
}
}
-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;
}
}
-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);
return 0;
}
-void sk_start_draw_stroke(SK_Sketch *sketch)
+static void sk_start_draw_stroke(SK_Sketch *sketch)
{
if (sketch->active_stroke == NULL)
{
}
}
-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))
{
}
}
-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);
#include "BLO_sys_types.h" // for intptr_t support
#include "ED_mesh.h"
+#include "ED_armature.h"
#include "meshlaplacian.h"
}
}
-LaplacianSystem *laplacian_system_construct_begin(int totvert, int totface, int lsq)
+static LaplacianSystem *laplacian_system_construct_begin(int totvert, int totface, int lsq)
{
LaplacianSystem *sys;
sys->totface++;
}
-void laplacian_system_construct_end(LaplacianSystem *sys)
+static void laplacian_system_construct_end(LaplacianSystem *sys)
{
int (*face)[3];
int a, totvert=sys->totvert, totface=sys->totface;
sys->edgehash= NULL;
}
-void laplacian_system_delete(LaplacianSystem *sys)
+static void laplacian_system_delete(LaplacianSystem *sys)
{
if(sys->verts) MEM_freeN(sys->verts);
if(sys->varea) MEM_freeN(sys->varea);
sys->heat.H[vertex]= h;
}
-void heat_calc_vnormals(LaplacianSystem *sys)
+static void heat_calc_vnormals(LaplacianSystem *sys)
{
float fnor[3];
int a, v1, v2, v3, (*face)[3];
/* ************************************************************* */
/* gets list of poses in poselib as a string usable for pupmenu() */
-char *poselib_build_poses_menu (bAction *act, char title[])
+static char *poselib_build_poses_menu (bAction *act, char title[])
{
DynStr *pupds= BLI_dynstr_new();
TimeMarker *marker;
/* gets the first available frame in poselib to store a pose on
* - frames start from 1, and a pose should occur on every frame... 0 is error!
*/
-int poselib_get_free_index (bAction *act)
+static int poselib_get_free_index (bAction *act)
{
TimeMarker *marker;
int low=0, high=0;
}
/* returns the active pose for a poselib */
-TimeMarker *poselib_get_active_pose (bAction *act)
+static TimeMarker *poselib_get_active_pose (bAction *act)
{
if ((act) && (act->active_marker))
return BLI_findlink(&act->markers, act->active_marker-1);
/* ************************************************************* */
/* Initialise a new poselib (whether it is needed or not) */
-bAction *poselib_init_new (Object *ob)
+static bAction *poselib_init_new (Object *ob)
{
/* sanity checks - only for armatures */
if (ELEM(NULL, ob, ob->pose))
}
/* Initialise a new poselib (checks if that needs to happen) */
-bAction *poselib_validate (Object *ob)
+static bAction *poselib_validate (Object *ob)
{
if (ELEM(NULL, ob, ob->pose))
return NULL;
* in the action. This is for use in making existing actions usable as poselibs.
*/
// TODO: operatorfy me!
-void poselib_validate_act (bAction *act)
+static void poselib_validate_act (bAction *act)
{
DLRBT_Tree keys = {NULL, NULL};
ActKeyColumn *ak;
/* This function is used to indicate that a bone is selected and needs keyframes inserted */
-void set_pose_keys (Object *ob)
+static void set_pose_keys (Object *ob)
{
bArmature *arm= ob->data;
bPoseChannel *chan;
/* --------- */
/* for the object with pose/action: clear path curves for selected bones only */
-void ED_pose_clear_paths(Object *ob)
+static void ED_pose_clear_paths(Object *ob)
{
bPoseChannel *pchan;
short skipped = 0;
/* ********************************************** */
-void pose_copy_menu(Scene *scene)
+static void pose_copy_menu(Scene *scene)
{
Object *obedit= scene->obedit; // XXX context
Object *ob= OBACT;
/* ********************************************** */
/* context active object, or weightpainted object with armature in posemode */
-void pose_activate_flipped_bone(Scene *scene)
+static void pose_activate_flipped_bone(Scene *scene)
{
Object *ob= OBACT;
#include "reeb.h"
-ReebGraph *GLOBAL_RG = NULL;
-ReebGraph *FILTERED_RG = NULL;
+static ReebGraph *GLOBAL_RG = NULL;
+static ReebGraph *FILTERED_RG = NULL;
/*
* Skeleton generation algorithm based on:
/***************************************** UTILS **********************************************/
-VertexData *allocVertexData(EditMesh *em)
+static VertexData *allocVertexData(EditMesh *em)
{
VertexData *data;
EditVert *eve;
return data;
}
-int indexData(EditVert *eve)
+static int indexData(EditVert *eve)
{
return ((VertexData*)eve->tmp.p)->i;
}
-float weightData(EditVert *eve)
+static float weightData(EditVert *eve)
{
return ((VertexData*)eve->tmp.p)->w;
}
-void weightSetData(EditVert *eve, float w)
+static void weightSetData(EditVert *eve, float w)
{
((VertexData*)eve->tmp.p)->w = w;
}
-ReebNode* nodeData(EditVert *eve)
+static ReebNode* nodeData(EditVert *eve)
{
return ((VertexData*)eve->tmp.p)->n;
}
-void nodeSetData(EditVert *eve, ReebNode *n)
+static void nodeSetData(EditVert *eve, ReebNode *n)
{
((VertexData*)eve->tmp.p)->n = n;
}
}
}
-ReebNode * addNode(ReebGraph *rg, EditVert *eve)
+static ReebNode * addNode(ReebGraph *rg, EditVert *eve)
{
float weight;
ReebNode *node = NULL;
return node;
}
-ReebNode * copyNode(ReebGraph *rg, ReebNode *node)
+static ReebNode * copyNode(ReebGraph *rg, ReebNode *node)
{
ReebNode *cp_node = NULL;
return cp_node;
}
-void relinkNodes(ReebGraph *low_rg, ReebGraph *high_rg)
+static void relinkNodes(ReebGraph *low_rg, ReebGraph *high_rg)
{
ReebNode *low_node, *high_node;
return node;
}
-ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
+static ReebArc * copyArc(ReebGraph *rg, ReebArc *arc)
{
ReebArc *cp_arc;
ReebNode *node;
return cp_arc;
}
-ReebGraph * copyReebGraph(ReebGraph *rg, int level)
+static ReebGraph * copyReebGraph(ReebGraph *rg, int level)
{
ReebNode *node;
ReebArc *arc;
return multi_rg;
}
-ReebEdge * copyEdge(ReebEdge *edge)
+static ReebEdge * copyEdge(ReebEdge *edge)
{
ReebEdge *newEdge = NULL;
return newEdge;
}
-void printArc(ReebArc *arc)
+static void printArc(ReebArc *arc)
{
ReebEdge *edge;
ReebNode *head = (ReebNode*)arc->head;
}
}
-void flipArc(ReebArc *arc)
+static void flipArc(ReebArc *arc)
{
ReebNode *tmp;
tmp = arc->head;
}
#ifdef DEBUG_REEB_NODE
-void NodeDegreeDecrement(ReebGraph *UNUSED(rg), ReebNode *node)
+static void NodeDegreeDecrement(ReebGraph *UNUSED(rg), ReebNode *node)
{
node->degree--;
// }
}
-void NodeDegreeIncrement(ReebGraph *UNUSED(rg), ReebNode *node)
+static void NodeDegreeIncrement(ReebGraph *UNUSED(rg), ReebNode *node)
{
// if (node->degree == 0)
// {
}
}
-void verifyNodeDegree(ReebGraph *rg)
+static void verifyNodeDegree(ReebGraph *rg)
{
#ifdef DEBUG_REEB
ReebNode *node = NULL;
#endif
}
-void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc)
+static void verifyBucketsArc(ReebGraph *UNUSED(rg), ReebArc *arc)
{
ReebNode *head = (ReebNode*)arc->head;
ReebNode *tail = (ReebNode*)arc->tail;
#endif
}
-void verifyArcs(ReebGraph *rg)
+static void verifyArcs(ReebGraph *rg)
{
ReebArc *arc;
}
}
-void verifyMultiResolutionLinks(ReebGraph *rg, int level)
+static void verifyMultiResolutionLinks(ReebGraph *rg, int level)
{
#ifdef DEBUG_REEB
ReebGraph *lower_rg = rg->link_up;
}
/***************************************** BUCKET UTILS **********************************************/
-void addVertToBucket(EmbedBucket *b, float co[3])
+static void addVertToBucket(EmbedBucket *b, float co[3])
{
b->nv++;
interp_v3_v3v3(b->p, b->p, co, 1.0f / b->nv);
}
-void removeVertFromBucket(EmbedBucket *b, float co[3])
+static void removeVertFromBucket(EmbedBucket *b, float co[3])
{
mul_v3_fl(b->p, (float)b->nv);
sub_v3_v3(b->p, co);
mul_v3_fl(b->p, 1.0f / (float)b->nv);
}
-void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc)
+static void mergeBuckets(EmbedBucket *bDst, EmbedBucket *bSrc)
{
if (bDst->nv > 0 && bSrc->nv > 0)
{
}
}
-void mergeArcBuckets(ReebArc *aDst, ReebArc *aSrc, float start, float end)
+static void mergeArcBuckets(ReebArc *aDst, ReebArc *aSrc, float start, float end)
{
if (aDst->bcount > 0 && aSrc->bcount > 0)
{
}
}
-int countArcBuckets(ReebArc *arc)
+static int countArcBuckets(ReebArc *arc)
{
return (int)(floor(arc->tail->weight) - ceil(arc->head->weight)) + 1;
}
-void allocArcBuckets(ReebArc *arc)
+static void allocArcBuckets(ReebArc *arc)
{
int i;
float start = ceil(arc->head->weight);
}
-void resizeArcBuckets(ReebArc *arc)
+static void resizeArcBuckets(ReebArc *arc)
{
EmbedBucket *oldBuckets = arc->buckets;
int oldBCount = arc->bcount;
}
}
-void reweightBuckets(ReebArc *arc)
+static void reweightBuckets(ReebArc *arc)
{
int i;
float start = ceil((arc->head)->weight);
}
}
-void fillArcEmptyBuckets(ReebArc *arc)
+static void fillArcEmptyBuckets(ReebArc *arc)
{
float *start_p, *end_p;
int start_index = 0, end_index = 0;
}
/* CALL THIS ONLY AFTER FILTERING, SINCE IT MESSES UP WEIGHT DISTRIBUTION */
-void extendGraphBuckets(ReebGraph *rg)
+static void extendGraphBuckets(ReebGraph *rg)
{
ReebArc *arc;
/**************************************** LENGTH CALCULATIONS ****************************************/
-void calculateArcLength(ReebArc *arc)
+static void calculateArcLength(ReebArc *arc)
{
ReebArcIterator arc_iter;
BArcIterator *iter = (BArcIterator*)&arc_iter;
arc->length += len_v3v3(arc->tail->p, vec1);
}
-void calculateGraphLength(ReebGraph *rg)
+static void calculateGraphLength(ReebGraph *rg)
{
ReebArc *arc;
/********************************************SORTING****************************************************/
-int compareNodesWeight(void *vnode1, void *vnode2)
+static int compareNodesWeight(void *vnode1, void *vnode2)
{
ReebNode *node1 = (ReebNode*)vnode1;
ReebNode *node2 = (ReebNode*)vnode2;
BLI_sortlist(&rg->nodes, compareNodesWeight);
}
-int compareArcsWeight(void *varc1, void *varc2)
+static int compareArcsWeight(void *varc1, void *varc2)
{
ReebArc *arc1 = (ReebArc*)varc1;
ReebArc *arc2 = (ReebArc*)varc2;
}
/******************************************* JOINING ***************************************************/
-void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float start_weight)
+static void reweightArc(ReebGraph *rg, ReebArc *arc, ReebNode *start_node, float start_weight)
{
ReebNode *node;
float old_weight;
}
}
-void reweightSubgraph(ReebGraph *rg, ReebNode *start_node, float start_weight)
+static void reweightSubgraph(ReebGraph *rg, ReebNode *start_node, float start_weight)
{
int i;
start_node->weight = start_weight;
}
-int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs)
+static int joinSubgraphsEnds(ReebGraph *rg, float threshold, int nb_subgraphs)
{
int joined = 0;
int subgraph;
}
/* Reweight graph from smallest node, fix fliped arcs */
-void fixSubgraphsOrientation(ReebGraph *rg, int nb_subgraphs)
+static void fixSubgraphsOrientation(ReebGraph *rg, int nb_subgraphs)
{
int subgraph;
}
}
-int joinSubgraphs(ReebGraph *rg, float threshold)
+static int joinSubgraphs(ReebGraph *rg, float threshold)
{
int nb_subgraphs;
int joined = 0;
/****************************************** FILTERING **************************************************/
-float lengthArc(ReebArc *arc)
+static float lengthArc(ReebArc *arc)
{
#if 0
ReebNode *head = (ReebNode*)arc->head;
#endif
}
-int compareArcs(void *varc1, void *varc2)
+static int compareArcs(void *varc1, void *varc2)
{
ReebArc *arc1 = (ReebArc*)varc1;
ReebArc *arc2 = (ReebArc*)varc2;
}
}
-void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, ReebArc * srcArc, int merging)
+static void filterArc(ReebGraph *rg, ReebNode *newNode, ReebNode *removedNode, ReebArc * srcArc, int merging)
{
ReebArc *arc = NULL, *nextArc = NULL;
}
}
-int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_internal, float threshold_external)
+static int filterInternalExternalReebGraph(ReebGraph *rg, float threshold_internal, float threshold_external)
{
ReebArc *arc = NULL, *nextArc = NULL;
int value = 0;
return value;
}
-int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold))
+static int filterCyclesReebGraph(ReebGraph *rg, float UNUSED(distance_threshold))
{
ReebArc *arc1, *arc2;
ReebArc *next2;
return value;
}
-void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external)
+static void filterGraph(ReebGraph *rg, short options, float threshold_internal, float threshold_external)
{
int done = 1;
removeNormalNodes(rg);
}
-void finalizeGraph(ReebGraph *rg, char passes, char method)
+static void finalizeGraph(ReebGraph *rg, char passes, char method)
{
int i;
/************************************** WEIGHT SPREADING ***********************************************/
-int compareVerts( const void* a, const void* b )
+static int compareVerts( const void* a, const void* b )
{
EditVert *va = *(EditVert**)a;
EditVert *vb = *(EditVert**)b;
return value;
}
-void spreadWeight(EditMesh *em)
+static void spreadWeight(EditMesh *em)
{
EditVert **verts, *eve;
float lastWeight = 0.0f;
/******************************************** EXPORT ***************************************************/
-void exportNode(FILE *f, const char *text, ReebNode *node)
+static void exportNode(FILE *f, const char *text, ReebNode *node)
{
fprintf(f, "%s i:%i w:%f d:%i %f %f %f\n", text, node->index, node->weight, node->degree, node->p[0], node->p[1], node->p[2]);
}
/***************************************** MAIN ALGORITHM **********************************************/
/* edges alone will create zero degree nodes, use this function to remove them */
-void removeZeroNodes(ReebGraph *rg)
+static void removeZeroNodes(ReebGraph *rg)
{
ReebNode *node, *next_node;
}
-int edgeEquals(ReebEdge *e1, ReebEdge *e2)
+static int edgeEquals(ReebEdge *e1, ReebEdge *e2)
{
return (e1->v1 == e2->v1 && e1->v2 == e2->v2);
}
-ReebArc *nextArcMappedToEdge(ReebArc *arc, ReebEdge *e)
+static ReebArc *nextArcMappedToEdge(ReebArc *arc, ReebEdge *e)
{
ReebEdge *nextEdge = NULL;
ReebEdge *edge = NULL;
return result;
}
-void glueByMergeSort(ReebGraph *rg, ReebArc *a0, ReebArc *a1, ReebEdge *e0, ReebEdge *e1)
+static void glueByMergeSort(ReebGraph *rg, ReebArc *a0, ReebArc *a1, ReebEdge *e0, ReebEdge *e1)
{
int total = 0;
while (total == 0 && a0 != a1 && a0 != NULL && a1 != NULL)
}
}
-void mergePaths(ReebGraph *rg, ReebEdge *e0, ReebEdge *e1, ReebEdge *e2)
+static void mergePaths(ReebGraph *rg, ReebEdge *e0, ReebEdge *e1, ReebEdge *e2)
{
ReebArc *a0, *a1, *a2;
a0 = e0->arc;
glueByMergeSort(rg, a0, a2, e0, e2);
}
-ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
+static ReebEdge * createArc(ReebGraph *rg, ReebNode *node1, ReebNode *node2)
{
ReebEdge *edge;
return edge;
}
-void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, ReebNode * n3, EditFace *efa)
+static void addTriangleToGraph(ReebGraph *rg, ReebNode * n1, ReebNode * n2, ReebNode * n3, EditFace *efa)
{
ReebEdge *re1, *re2, *re3;
ReebEdge *e1, *e2, *e3;
return dot_v3v3(a, b)/clen;
}
-void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2, int e3)
+static void addTriangle(EditVert *v1, EditVert *v2, EditVert *v3, int e1, int e2, int e3)
{
/* Angle opposite e1 */
float t1= cotan_weight(v1->co, v2->co, v3->co) / e2;
return indexed_edges->edges[offset];
}
-void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeIndex *indexed_edges)
+static void shortestPathsFromVert(EditMesh *em, EditVert *starting_vert, EdgeIndex *indexed_edges)
{
Heap *edge_heap;
EditVert *current_eve = NULL;
BLI_heap_free(edge_heap, NULL);
}
-void freeEdgeIndex(EdgeIndex *indexed_edges)
+static void freeEdgeIndex(EdgeIndex *indexed_edges)
{
MEM_freeN(indexed_edges->offset);
MEM_freeN(indexed_edges->edges);
}
-void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
+static void buildIndexedEdges(EditMesh *em, EdgeIndex *indexed_edges)
{
EditVert *eve;
EditEdge *eed;
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_curve.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_transform.h"
-
#include "curve_intern.h"
#include "ED_view3d.h"
#include "ED_curve.h"
+#include "curve_intern.h"
+
#include "UI_interface.h"
#include "RNA_access.h"
/* still need to eradicate a few :( */
#define callocstructN(x,y,name) (x*)MEM_callocN((y)* sizeof(x),name)
-float nurbcircle[8][2]= {
+static float nurbcircle[8][2]= {
{0.0, -1.0}, {-1.0, -1.0}, {-1.0, 0.0}, {-1.0, 1.0},
{0.0, 1.0}, { 1.0, 1.0}, { 1.0, 0.0}, { 1.0, -1.0}
};
}
/* this replaces the active flag used in uv/face mode */
-void set_actNurb(Object *obedit, Nurb *nu)
+static void set_actNurb(Object *obedit, Nurb *nu)
{
Curve *cu= obedit->data;
}
}
-Nurb *get_actNurb(Object *obedit)
+static Nurb *get_actNurb(Object *obedit)
{
Curve *cu= obedit->data;
ListBase *nurbs= ED_curve_editnurbs(cu);
return 0;
}
-int isNurbsel_count(Curve *cu, Nurb *nu)
+static int isNurbsel_count(Curve *cu, Nurb *nu)
{
BezTriple *bezt;
BPoint *bp;
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_curve.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "ED_util.h"
}
-void update_string(Curve *cu)
+static void update_string(Curve *cu)
{
EditFont *ef= cu->editfont;
int len;
/* Generics - Loopers */
/* Loops over the gp-frames for a gp-layer, and applies the given callback */
-short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
+static short gplayer_frames_looper (bGPDlayer *gpl, Scene *scene, short (*gpf_cb)(bGPDframe *, Scene *))
{
bGPDframe *gpf;
/* These are just 'dummy wrappers' around gpencil api calls */
/* make layer active one after being clicked on */
-void gp_ui_activelayer_cb (bContext *C, void *gpd, void *gpl)
+static void gp_ui_activelayer_cb (bContext *C, void *gpd, void *gpl)
{
gpencil_layer_setactive(gpd, gpl);
}
/* delete 'active' layer */
-void gp_ui_dellayer_cb (bContext *C, void *gpd, void *gpl)
+static void gp_ui_dellayer_cb (bContext *C, void *gpd, void *gpl)
{
/* make sure the layer we want to remove is the active one */
gpencil_layer_setactive(gpd, gpl);
#include "UI_view2d.h"
+#include "ED_gpencil.h"
#include "ED_view3d.h"
#include "gpencil_intern.h"
#include "RNA_access.h"
+#include "ED_gpencil.h"
+
#include "gpencil_intern.h"
/* ****************************************** */
int ED_curve_updateAnimPaths(struct Object *obedit);
+/* debug only */
+void printknots(struct Object *obedit);
+
#endif /* ED_CURVE_H */
void ED_uvedit_live_unwrap_re_solve(void);
void ED_uvedit_live_unwrap_end(short cancel);
+void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit);
+
#endif /* ED_UVEDIT_H */
};
/* quick enum for vsm->zone (scroller handles) */
-enum {
+static enum {
SCROLLHANDLE_MIN= -1,
SCROLLHANDLE_BAR,
SCROLLHANDLE_MAX,
}
/* returns 0 if not found, otherwise 1 */
-int facesel_face_pick(struct bContext *C, Mesh *me, short *mval, unsigned int *index, short rect)
+static int facesel_face_pick(struct bContext *C, Mesh *me, short *mval, unsigned int *index, short rect)
{
ViewContext vc;
view3d_set_viewcontext(C, &vc);
return NULL;
}
-void paintface_unhide(Scene *scene)
+static void paintface_unhide(Scene *scene)
{
Mesh *me;
MFace *mface;
paintface_flush_flags(OBACT);
}
-void paintface_hide(Scene *scene)
+static void paintface_hide(Scene *scene)
{
Mesh *me;
MFace *mface;
}
}
-void paintface_select_swap(Scene *scene)
+static void paintface_select_swap(Scene *scene)
{
Mesh *me;
MFace *mface;
/* ********************** */
/* selected faces get hidden edges */
-int make_fgon(EditMesh *em, wmOperator *op, int make)
+static int make_fgon(EditMesh *em, wmOperator *op, int make)
{
EditFace *efa;
EditEdge *eed;
}
/* only adds quads or trias when there's edges already */
-void addfaces_from_edgenet(EditMesh *em)
+static void addfaces_from_edgenet(EditMesh *em)
{
EditVert *eve1, *eve2, *eve3, *eve4;
// this hack is only used so that scons+mingw + split-sources hack works
// ------------------------------- start copied code
/* these are not the monkeys you are looking for */
-int monkeyo= 4;
-int monkeynv= 271;
-int monkeynf= 250;
-signed char monkeyv[271][3]= {
+static int monkeyo= 4;
+static int monkeynv= 271;
+static int monkeynf= 250;
+static signed char monkeyv[271][3]= {
{-71,21,98},{-63,12,88},{-57,7,74},{-82,-3,79},{-82,4,92},
{-82,17,100},{-92,21,102},{-101,12,95},{-107,7,83},
{-117,31,84},{-109,31,95},{-96,31,102},{-92,42,102},
{-26,-16,-42},{-17,49,-49},
};
-signed char monkeyf[250][4]= {
+static signed char monkeyf[250][4]= {
{27,4,5,26}, {25,4,5,24}, {3,6,5,4}, {1,6,5,2}, {5,6,7,4},
{3,6,7,2}, {5,8,7,6}, {3,8,7,4}, {7,8,9,6},
{5,8,9,4}, {7,10,9,8}, {5,10,9,6}, {9,10,11,8},
return (efa->e1->tmp.l || efa->e2->tmp.l || efa->e3->tmp.l) ? 1:0;
}
-void em_deselect_nth_face(EditMesh *em, int nth, EditFace *efa_act)
+static void em_deselect_nth_face(EditMesh *em, int nth, EditFace *efa_act)
{
EditFace *efa;
EditEdge *eed;
return (eed->v1->tmp.l || eed->v2->tmp.l) ? 1:0;
}
-void em_deselect_nth_edge(EditMesh *em, int nth, EditEdge *eed_act)
+static void em_deselect_nth_edge(EditMesh *em, int nth, EditEdge *eed_act)
{
EditEdge *eed;
EditVert *eve;
EM_nfaces_selected(em);
}
-void em_deselect_nth_vert(EditMesh *em, int nth, EditVert *eve_act)
+static void em_deselect_nth_vert(EditMesh *em, int nth, EditVert *eve_act)
{
EditVert *eve;
EditEdge *eed;
}
}
-void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
+static void CutEdgeloop(Object *obedit, wmOperator *op, EditMesh *em, int numcuts)
{
ViewContext vc; // XXX
EditEdge *nearest=NULL, *eed;
return ret;
}
-void EM_mesh_copy_edge(EditMesh *em, short type)
+static void EM_mesh_copy_edge(EditMesh *em, short type)
{
EditSelection *ese;
short change=0;
}
}
-void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
+static void EM_mesh_copy_face(EditMesh *em, wmOperator *op, short type)
{
short change=0;
}
-void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
+static void EM_mesh_copy_face_layer(EditMesh *em, wmOperator *op, short type)
{
short change=0;
/* ctrl+c in mesh editmode */
-void mesh_copy_menu(EditMesh *em, wmOperator *op)
+static void mesh_copy_menu(EditMesh *em, wmOperator *op)
{
EditSelection *ese;
int ret;
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-int select_by_number_vertices_exec(bContext *C, wmOperator *op)
+static int select_by_number_vertices_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
}
-int select_mirror_exec(bContext *C, wmOperator *op)
+static int select_mirror_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
EditMesh *em= BKE_mesh_get_editmesh(((Mesh *)obedit->data));
RNA_def_float(ot->srna, "sharpness", 135.0f, 0.0f, FLT_MAX, "sharpness", "", 0.0f, 180.0f);
}
-void select_non_manifold(EditMesh *em, wmOperator *op )
+static void select_non_manifold(EditMesh *em, wmOperator *op )
{
EditVert *eve;
EditEdge *eed;
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-void EM_select_less(EditMesh *em)
+static void EM_select_less(EditMesh *em)
{
EditEdge *eed;
EditFace *efa;
* which would use same as vertices method), then added
* to interface! Hoera! - zr
*/
-void faceselect_align_view_to_selected(View3D *v3d, RegionView3D *rv3d, Mesh *me, wmOperator *op, int axis)
+static void faceselect_align_view_to_selected(View3D *v3d, RegionView3D *rv3d, Mesh *me, wmOperator *op, int axis)
{
float norm[3];
int i, totselected = 0;
}
-void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *op, View3D *v3d, RegionView3D *rv3d, int axis)
+static void editmesh_align_view_to_selected(Object *obedit, EditMesh *em, wmOperator *op, View3D *v3d, RegionView3D *rv3d, int axis)
{
int nselverts= EM_nvertices_selected(em);
float norm[3]={0.0, 0.0, 0.0}; /* used for storing the mesh normal */
}
/* all verts with (flag & 'flag') are sorted */
-void xsortvert_flag(bContext *C, int flag)
+static void xsortvert_flag(bContext *C, int flag)
{
ViewContext vc;
EditVert *eve;
}
/* called from buttons */
-void hashvert_flag(EditMesh *em, int flag)
+static void hashvert_flag(EditMesh *em, int flag)
{
/* switch vertex order using hash table */
EditVert *eve;
return OPERATOR_FINISHED;
}
-EnumPropertyItem extrude_items[] = {
+static EnumPropertyItem extrude_items[] = {
{1, "REGION", 0, "Region", ""},
{2, "FACES", 0, "Individual Faces", ""},
{3, "EDGES", 0, "Only Edges", ""},
#define FACE_MARKCLEAR(f) (f->f1 = 1)
/* quick hack, basically a copy of beautify_fill */
-void edge_flip(EditMesh *em)
+static void edge_flip(EditMesh *em)
{
EditVert *v1, *v2, *v3, *v4;
EditEdge *eed, *nexted;
/* XXX old bevel not ported yet */
-void bevel_menu(EditMesh *em)
+static void bevel_menu(EditMesh *em)
{
BME_Mesh *bm;
BME_TransData_Head *td;
#include "WM_types.h"
#include "ED_object.h"
+#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_view3d.h"
WM_operatortype_append(MESH_OT_select_nth);
}
-int ED_operator_editmesh_face_select(bContext *C)
+static int ED_operator_editmesh_face_select(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
if(obedit && obedit->type==OB_MESH) {
return 0;
}
-int mesh_get_x_mirror_vert_spacial(Object *ob, int index)
+static int mesh_get_x_mirror_vert_spacial(Object *ob, int index)
{
Mesh *me= ob->data;
MVert *mvert;
#include "BKE_context.h"
#include "BKE_mball.h"
+#include "ED_mball.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_transform.h"
#include "WM_api.h"
#include "WM_types.h"
+#include "mball_intern.h"
+
/* This function is used to free all MetaElems from MetaBall */
void free_editMball(Object *obedit)
{
MEM_freeN(lb);
}
-ListBase *metaball_get_editelems(Object *ob)
+static ListBase *metaball_get_editelems(Object *ob)
{
if(ob && ob->type==OB_MBALL) {
struct MetaBall *mb= (struct MetaBall*)ob->data;
#include "RNA_access.h"
-
+#include "ED_mball.h"
#include "ED_screen.h"
#include "mball_intern.h"
#include "ED_object.h"
+#include "object_intern.h"
+
/* ****************** render BAKING ********************** */
/* threaded break test */
} BakeRender;
/* use by exec and invoke */
-int test_bake_internal(bContext *C, ReportList *reports)
+static int test_bake_internal(bContext *C, ReportList *reports)
{
Scene *scene= CTX_data_scene(C);
/* ------------- PyConstraints ------------------ */
/* this callback sets the text-file to be used for selected menu item */
-void validate_pyconstraint_cb (void *arg1, void *arg2)
+static void validate_pyconstraint_cb (void *arg1, void *arg2)
{
bPythonConstraint *data = arg1;
Text *text= NULL;
#ifdef WITH_PYTHON
/* this returns a string for the list of usable pyconstraint script names */
-char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
+static char *buildmenu_pyconstraints (Text *con_text, int *pyconindex)
{
DynStr *pupds= BLI_dynstr_new();
Text *text;
#endif /* WITH_PYTHON */
/* this callback gets called when the 'refresh' button of a pyconstraint gets pressed */
-void update_pyconstraint_cb (void *arg1, void *arg2)
+static void update_pyconstraint_cb (void *arg1, void *arg2)
{
#ifndef WITH_PYTHON
(void)arg1; /* unused */
/* *********************** */
-void check_editmode(int type)
+static void check_editmode(int type)
{
Object *obedit= NULL; // XXX
}
#endif
-void special_editmenu(Scene *scene, View3D *v3d)
+static void special_editmenu(Scene *scene, View3D *v3d)
{
// XXX static short numcuts= 2;
Object *ob= OBACT;
}
-void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
+static void copy_attr(Main *bmain, Scene *scene, View3D *v3d, short event)
{
Object *ob;
Base *base;
DAG_ids_flush_update(bmain, 0);
}
-void copy_attr_menu(Main *bmain, Scene *scene, View3D *v3d)
+static void copy_attr_menu(Main *bmain, Scene *scene, View3D *v3d)
{
Object *ob;
short event;
/* ********************** */
-void image_aspect(Scene *scene, View3D *v3d)
+static void image_aspect(Scene *scene, View3D *v3d)
{
/* all selected objects with an image map: scale in image aspect */
Base *base;
}
-int vergbaseco(const void *a1, const void *a2)
+static int vergbaseco(const void *a1, const void *a2)
{
Base **x1, **x2;
}
-void auto_timeoffs(Scene *scene, View3D *v3d)
+static void auto_timeoffs(Scene *scene, View3D *v3d)
{
Base *base, **basesort, **bs;
float start, delta;
}
-void ofs_timeoffs(Scene *scene, View3D *v3d)
+static void ofs_timeoffs(Scene *scene, View3D *v3d)
{
float offset=0.0f;
}
-void rand_timeoffs(Scene *scene, View3D *v3d)
+static void rand_timeoffs(Scene *scene, View3D *v3d)
{
Base *base;
float rand_ofs=0.0f;
#include "BKE_lattice.h"
#include "BKE_mesh.h"
+#include "ED_lattice.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_util.h"
}
}
-int select_all_exec(bContext *C, wmOperator *op)
+static int select_all_exec(bContext *C, wmOperator *op)
{
Object *obedit= CTX_data_edit_object(C);
Lattice *lt= obedit->data;
WM_operator_properties_select_all(ot);
}
-int make_regular_poll(bContext *C)
+static int make_regular_poll(bContext *C)
{
Object *ob;
return (ob && ob->type==OB_LATTICE);
}
-int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
+static int make_regular_exec(bContext *C, wmOperator *UNUSED(op))
{
Object *ob= CTX_data_edit_object(C);
Lattice *lt;
/************************** Link to Scene Operator *****************************/
-void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr))
+static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr))
{
#if 0
Scene *sce= (Scene*) BLI_findlink(&bmain->scene, G.curscreen->scenenr-1);
ID_NEW(*obpoin);
}
-void single_object_users(Scene *scene, View3D *v3d, int flag)
+static void single_object_users(Scene *scene, View3D *v3d, int flag)
{
Base *base;
Object *ob, *obn;
set_sca_new_poins();
}
-void new_id_matar(Material **matar, int totcol)
+static void new_id_matar(Material **matar, int totcol)
{
ID *id;
int a;
}
}
-void single_obdata_users(Main *bmain, Scene *scene, int flag)
+static void single_obdata_users(Main *bmain, Scene *scene, int flag)
{
Object *ob;
Lamp *la;
}
}
-void do_single_tex_user(Tex **from)
+static void do_single_tex_user(Tex **from)
{
Tex *tex, *texn;
}
}
-void single_tex_users_expand(Main *bmain)
+static void single_tex_users_expand(Main *bmain)
{
/* only when 'parent' blocks are LIB_NEW */
Material *ma;
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "UI_interface.h"
/************************ Texture Space Transform ****************************/
-void texspace_edit(Scene *scene, View3D *v3d)
+static void texspace_edit(Scene *scene, View3D *v3d)
{
Base *base;
int nr=0;
}
}
-int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_tot)
+static int ED_vgroup_give_parray(ID *id, MDeformVert ***dvert_arr, int *dvert_tot)
{
if(id) {
switch(GS(id->name)) {
/* for mesh in object mode
lattice can be in editmode */
-void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
+static void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
{
/* This routine removes the vertex from the deform
* group with number def_nr.
/* for Mesh in Object mode */
/* allows editmode for Lattice */
-void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, int assignmode)
+static void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float weight, int assignmode)
{
/* add the vert to the deform group with the
* specified number
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "ED_physics.h"
#include "ED_mesh.h"
#include "ED_particle.h"
#include "ED_view3d.h"
}
}
/* force set distances between neighbouring keys */
-void PE_apply_lengths(Scene *scene, PTCacheEdit *edit)
+static void PE_apply_lengths(Scene *scene, PTCacheEdit *edit)
{
ParticleEditSettings *pset=PE_settings(scene);
/* compile dummy functions for disabled fluid sim */
-FluidsimSettings *fluidsimSettingsNew(Object *UNUSED(srcob))
+static FluidsimSettings *fluidsimSettingsNew(Object *UNUSED(srcob))
{
return NULL;
}
-void fluidsimSettingsFree(FluidsimSettings *UNUSED(fss))
+static void fluidsimSettingsFree(FluidsimSettings *UNUSED(fss))
{
}
-FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss))
+static FluidsimSettings* fluidsimSettingsCopy(FluidsimSettings *UNUSED(fss))
{
return NULL;
}
/* only compile dummy functions */
-int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object *UNUSED(ob))
+static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object *UNUSED(ob))
{
return 0;
}
-void fluidsimFreeBake(Object *UNUSED(ob))
+static void fluidsimFreeBake(Object *UNUSED(ob))
{
}
return (ptr.data && ptr.id.data);
}
-void bake_console_progress(void *UNUSED(arg), int nr)
+static void bake_console_progress(void *UNUSED(arg), int nr)
{
printf("\rbake: %3i%%", nr);
fflush(stdout);
}
-void bake_console_progress_end(void *UNUSED(arg))
+static void bake_console_progress_end(void *UNUSED(arg))
{
printf("\rbake: done!\n");
}
#include "WM_api.h"
+#include "ED_render.h"
+
#include "render_intern.h" // own include
#if (defined(WITH_QUICKTIME) && !defined(USE_QTKIT))
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_render.h"
#include "ED_curve.h"
#include "ED_mesh.h"
mtexcopied= 0;
}
-void copy_mtex_copybuf(ID *id)
+static void copy_mtex_copybuf(ID *id)
{
MTex **mtex= NULL;
}
}
-void paste_mtex_copybuf(ID *id)
+static void paste_mtex_copybuf(ID *id)
{
MTex **mtex= NULL;
#include "ED_object.h"
#include "ED_armature.h"
+#include "screen_intern.h"
+
int ed_screen_context(const bContext *C, const char *member, bContextDataResult *result)
{
bScreen *sc= CTX_wm_screen(C);
int scredge_is_horizontal(ScrEdge *se);
ScrEdge *screen_find_active_scredge(bScreen *sc, int mx, int my);
-AZone *is_in_area_actionzone(ScrArea *sa, int x, int y);
+struct AZone *is_in_area_actionzone(ScrArea *sa, int x, int y);
/* screen_context.c */
-void ed_screen_context(const bContext *C, const char *member, bContextDataResult *result);
+int ed_screen_context(const bContext *C, const char *member, bContextDataResult *result);
/* screendump.c */
void SCREEN_OT_screenshot(struct wmOperatorType *ot);
return OPERATOR_CANCELLED;
}
-void SCREEN_OT_header_toolbox(wmOperatorType *ot)
+static void SCREEN_OT_header_toolbox(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Header Toolbox";
return OPERATOR_FINISHED;
}
-void SCREEN_OT_new(wmOperatorType *ot)
+static void SCREEN_OT_new(wmOperatorType *ot)
{
/* identifiers */
ot->name= "New Screen";
return OPERATOR_FINISHED;
}
-void SCREEN_OT_delete(wmOperatorType *ot)
+static void SCREEN_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Screen"; //was scene
return OPERATOR_FINISHED;
}
-void SCENE_OT_new(wmOperatorType *ot)
+static void SCENE_OT_new(wmOperatorType *ot)
{
static EnumPropertyItem type_items[]= {
{SCE_COPY_EMPTY, "EMPTY", 0, "Empty", "Add empty scene"},
return OPERATOR_FINISHED;
}
-void SCENE_OT_delete(wmOperatorType *ot)
+static void SCENE_OT_delete(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Delete Scene";
}
/* run this outside project_paint_uvpixel_init since pixels with mask 0 dont need init */
-float project_paint_uvpixel_mask(
+static float project_paint_uvpixel_mask(
const ProjPaintState *ps,
const int face_index,
const int side,
/* checks if pt is inside a convex 2D polyline, the polyline must be ordered rotating clockwise
* otherwise it would have to test for mixed (line_point_side_v2 > 0.0f) cases */
-int IsectPoly2Df(const float pt[2], float uv[][2], const int tot)
+static int IsectPoly2Df(const float pt[2], float uv[][2], const int tot)
{
int i;
if (line_point_side_v2(uv[tot-1], uv[0], pt) < 0.0f)
#include "BKE_context.h"
#include "BKE_paint.h"
+#include "ED_sculpt.h"
#include "ED_screen.h"
#include "UI_resources.h"
return OPERATOR_FINISHED;
}
-void BRUSH_OT_add(wmOperatorType *ot)
+static void BRUSH_OT_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Brush";
return OPERATOR_FINISHED;
}
-void BRUSH_OT_scale_size(wmOperatorType *ot)
+static void BRUSH_OT_scale_size(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Scale Sculpt/Paint Brush Size";
return OPERATOR_FINISHED;
}
-void PAINT_OT_vertex_color_set(wmOperatorType *ot)
+static void PAINT_OT_vertex_color_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Vertex Colors";
return OPERATOR_FINISHED;
}
-void BRUSH_OT_reset(wmOperatorType *ot)
+static void BRUSH_OT_reset(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reset Brush";
return len_v2v2(p1, p2);
}
-int sculpt_get_brush_geometry(bContext* C, int x, int y, int* pixel_radius,
+static int sculpt_get_brush_geometry(bContext* C, int x, int y, int* pixel_radius,
float location[3])
{
struct PaintStroke *stroke;
/* in contradiction to cpack drawing colors, the MCOL colors (vpaint colors) are per byte!
so not endian sensitive. Mcol = ABGR!!! so be cautious with cpack calls */
-unsigned int rgba_to_mcol(float r, float g, float b, float a)
+static unsigned int rgba_to_mcol(float r, float g, float b, float a)
{
int ir, ig, ib, ia;
unsigned int col;
/* else */
/* sets wp->weight to the closest weight value to vertex */
/* note: we cant sample frontbuf, weight colors are interpolated too unpredictable */
-void sample_wpaint(Scene *scene, ARegion *ar, View3D *UNUSED(v3d), int mode)
+static void sample_wpaint(Scene *scene, ARegion *ar, View3D *UNUSED(v3d), int mode)
{
ViewContext vc;
ToolSettings *ts= scene->toolsettings;
}
/* Check if there are any active modifiers in stack (used for flushing updates at enter/exit sculpt mode) */
-int sculpt_has_active_modifiers(Scene *scene, Object *ob)
+static int sculpt_has_active_modifiers(Scene *scene, Object *ob)
{
ModifierData *md;
/*** BVH Tree ***/
/* Get a screen-space rectangle of the modified area */
-int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d,
+static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d,
Object *ob, rcti *rect)
{
PBVH *pbvh= ob->sculpt->pbvh;
out[2]= in[2];
}
-float calc_overlap(StrokeCache *cache, const char symm, const char axis, const float angle)
+static float calc_overlap(StrokeCache *cache, const char symm, const char axis, const float angle)
{
float mirror[3];
float distsq;
int original;
} SculptRaycastData;
-void sculpt_raycast_cb(PBVHNode *node, void *data_v, float* tmin)
+static void sculpt_raycast_cb(PBVHNode *node, void *data_v, float* tmin)
{
if (BLI_pbvh_node_get_tmin(node) < *tmin) {
SculptRaycastData *srd = data_v;
#include "AUD_C-API.h"
+#include "ED_sound.h"
#include "ED_util.h"
#include "sound_intern.h"
return OPERATOR_FINISHED;
}
-void SOUND_OT_pack(wmOperatorType *ot)
+static void SOUND_OT_pack(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Pack Sound";
return OPERATOR_FINISHED;
}
-void SOUND_OT_unpack(wmOperatorType *ot)
+static void SOUND_OT_unpack(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Unpack Sound";
#include "ED_anim_api.h"
#include "ED_keyframes_draw.h"
+#include "action_intern.h"
/* ************************************************************************* */
/* Channel List */
/* ******************** Insert Keyframes Operator ************************* */
/* defines for insert keyframes tool */
-EnumPropertyItem prop_actkeys_insertkey_types[] = {
+static EnumPropertyItem prop_actkeys_insertkey_types[] = {
{1, "ALL", 0, "All Channels", ""},
{2, "SEL", 0, "Only Selected Channels", ""},
{3, "GROUP", 0, "In Active Group", ""}, // xxx not in all cases
/* ******************** Set Extrapolation-Type Operator *********************** */
/* defines for set extrapolation-type for selected keyframes tool */
-EnumPropertyItem prop_actkeys_expo_types[] = {
+static EnumPropertyItem prop_actkeys_expo_types[] = {
{FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""},
{FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""},
{0, NULL, 0, NULL, NULL}
/* ******************** Set Handle-Type Operator *********************** */
-EnumPropertyItem actkeys_handle_type_items[] = {
+static EnumPropertyItem actkeys_handle_type_items[] = {
{HD_FREE, "FREE", 0, "Free", ""},
{HD_VECT, "VECTOR", 0, "Vector", ""},
{HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
/* ******************** Snap Keyframes Operator *********************** */
/* defines for snap keyframes tool */
-EnumPropertyItem prop_actkeys_snap_types[] = {
+static EnumPropertyItem prop_actkeys_snap_types[] = {
{ACTKEYS_SNAP_CFRA, "CFRA", 0, "Current frame", ""},
{ACTKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
{ACTKEYS_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry?
/* ******************** Mirror Keyframes Operator *********************** */
/* defines for mirror keyframes tool */
-EnumPropertyItem prop_actkeys_mirror_types[] = {
+static EnumPropertyItem prop_actkeys_mirror_types[] = {
{ACTKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current frame", ""},
{ACTKEYS_MIRROR_XAXIS, "XAXIS", 0, "By Values over Value=0", ""},
{ACTKEYS_MIRROR_MARKER, "MARKER", 0, "By Times over First Selected Marker", ""},
*/
/* defines for borderselect mode */
-enum {
+static enum {
ACTKEYS_BORDERSEL_ALLKEYS = 0,
ACTKEYS_BORDERSEL_FRAMERANGE,
ACTKEYS_BORDERSEL_CHANNELS,
#include "UI_resources.h"
#include "UI_view2d.h"
+#include "ED_space_api.h"
#include "ED_anim_api.h"
#include "ED_markers.h"
}
/* only called once, from screen/spacetypes.c */
-void ED_spacetype_xxx(void)
+static void ED_spacetype_xxx(void)
{
static SpaceType st;
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
sbuts->mainbo= sbuts->mainb;
}
-void buttons_operatortypes(void)
+static void buttons_operatortypes(void)
{
WM_operatortype_append(BUTTONS_OT_toolbox);
WM_operatortype_append(BUTTONS_OT_file_browse);
}
-void buttons_keymap(struct wmKeyConfig *keyconf)
+static void buttons_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap= WM_keymap_find(keyconf, "Property Editor", SPACE_BUTS, 0);
MEM_freeN(cl);
}
-void console_scrollback_limit(SpaceConsole *sc)
+static void console_scrollback_limit(SpaceConsole *sc)
{
int tot;
*
* ***** END GPL LICENSE BLOCK *****
*/
-
- #include <string.h>
+#include <string.h>
#include <stdio.h>
#ifdef WIN32
#include "BKE_screen.h"
#include "BKE_idcode.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
UI_view2d_scrollers_free(scrollers);
}
-void console_operatortypes(void)
+static void console_operatortypes(void)
{
/* console_ops.c */
WM_operatortype_append(CONSOLE_OT_move);
WM_operatortype_append(CONSOLE_OT_select_set);
}
-void console_keymap(struct wmKeyConfig *keyconf)
+static void console_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap= WM_keymap_find(keyconf, "Console", SPACE_CONSOLE, 0);
wmKeyMapItem *kmi;
#define TILE_BORDER_Y 8
/* button events */
-enum {
+static enum {
B_FS_DIRNAME,
B_FS_FILENAME
} eFile_ButEvents;
return OPERATOR_FINISHED;
}
-int file_operator_poll(bContext *C)
+static int file_operator_poll(bContext *C)
{
int poll = ED_operator_file_active(C);
SpaceFile *sfile= CTX_wm_space_file(C);
}
-int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused))
+static int file_refresh_exec(bContext *C, wmOperator *UNUSED(unused))
{
SpaceFile *sfile= CTX_wm_space_file(C);
}
}
-int file_directory_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
+static int file_directory_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
{
SpaceFile *sfile= CTX_wm_space_file(C);
ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
}
-int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused))
+static int file_hidedot_exec(bContext *C, wmOperator *UNUSED(unused))
{
SpaceFile *sfile= CTX_wm_space_file(C);
return arnew;
}
-int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused))
+static int file_bookmark_toggle_exec(bContext *C, wmOperator *UNUSED(unused))
{
ScrArea *sa= CTX_wm_area(C);
ARegion *ar= file_buttons_region(sa);
}
-int file_filenum_exec(bContext *C, wmOperator *op)
+static int file_filenum_exec(bContext *C, wmOperator *op)
{
SpaceFile *sfile= CTX_wm_space_file(C);
ScrArea *sa= CTX_wm_area(C);
RNA_def_int(ot->srna, "increment", 1, 0, 100, "Increment", "", 0,100);
}
-int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
+static int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
{
ScrArea *sa= CTX_wm_area(C);
SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
}
-int file_rename_poll(bContext *C)
+static int file_rename_poll(bContext *C)
{
int poll = ED_operator_file_active(C);
SpaceFile *sfile= CTX_wm_space_file(C);
}
-int file_delete_poll(bContext *C)
+static int file_delete_poll(bContext *C)
{
int poll = ED_operator_file_active(C);
SpaceFile *sfile= CTX_wm_space_file(C);
* ***** END GPL LICENSE BLOCK *****
*/
-
/* global includes */
#include <stdlib.h>
#include "DNA_space_types.h"
+#include "ED_fileselect.h"
#include "ED_datafiles.h"
#include "IMB_imbuf.h"
filelist->libfiledata= 0;
}
-struct BlendHandle *filelist_lib(struct FileList* filelist)
+static struct BlendHandle *filelist_lib(struct FileList* filelist)
{
return filelist->libfiledata;
}
return filelist->changed;
}
-struct ImBuf * filelist_loadimage(struct FileList* filelist, int index)
+static struct ImBuf * filelist_loadimage(struct FileList* filelist, int index)
{
ImBuf *imb = NULL;
int fidx = 0;
return ICON_FILE_BLANK;
}
-void filelist_setfiletypes(struct FileList* filelist)
+static void filelist_setfiletypes(struct FileList* filelist)
{
struct direntry *file;
int num;
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "ED_fileselect.h"
#include "UI_view2d.h"
-
#include "file_intern.h" // own include
#include "fsmenu.h"
#include "filelist.h"
}
-void file_operatortypes(void)
+static void file_operatortypes(void)
{
WM_operatortype_append(FILE_OT_select);
WM_operatortype_append(FILE_OT_select_all_toggle);
}
/* NOTE: do not add .blend file reading on this level */
-void file_keymap(struct wmKeyConfig *keyconf)
+static void file_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMapItem *kmi;
/* keys for all areas */
/* ******************** Insert Keyframes Operator ************************* */
/* defines for insert keyframes tool */
-EnumPropertyItem prop_graphkeys_insertkey_types[] = {
+static EnumPropertyItem prop_graphkeys_insertkey_types[] = {
{1, "ALL", 0, "All Channels", ""},
{2, "SEL", 0, "Only Selected Channels", ""},
{0, NULL, 0, NULL, NULL}
/* ******************** Set Extrapolation-Type Operator *********************** */
/* defines for set extrapolation-type for selected keyframes tool */
-EnumPropertyItem prop_graphkeys_expo_types[] = {
+static EnumPropertyItem prop_graphkeys_expo_types[] = {
{FCURVE_EXTRAPOLATE_CONSTANT, "CONSTANT", 0, "Constant Extrapolation", ""},
{FCURVE_EXTRAPOLATE_LINEAR, "LINEAR", 0, "Linear Extrapolation", ""},
{0, NULL, 0, NULL, NULL}
/* ******************** Snap Keyframes Operator *********************** */
/* defines for snap keyframes tool */
-EnumPropertyItem prop_graphkeys_snap_types[] = {
+static EnumPropertyItem prop_graphkeys_snap_types[] = {
{GRAPHKEYS_SNAP_CFRA, "CFRA", 0, "Current Frame", ""},
{GRAPHKEYS_SNAP_VALUE, "VALUE", 0, "Cursor Value", ""},
{GRAPHKEYS_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
/* ******************** Mirror Keyframes Operator *********************** */
/* defines for mirror keyframes tool */
-EnumPropertyItem prop_graphkeys_mirror_types[] = {
+static EnumPropertyItem prop_graphkeys_mirror_types[] = {
{GRAPHKEYS_MIRROR_CFRA, "CFRA", 0, "By Times over Current Frame", ""},
{GRAPHKEYS_MIRROR_VALUE, "VALUE", 0, "By Values over Cursor Value", ""},
{GRAPHKEYS_MIRROR_YAXIS, "YAXIS", 0, "By Times over Time=0", ""},
return OPERATOR_RUNNING_MODAL;
}
-void GRAPH_OT_cursor_set(wmOperatorType *ot)
+static void GRAPH_OT_cursor_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Cursor";
return OPERATOR_FINISHED;
}
-void GRAPH_OT_view_togglehandles (wmOperatorType *ot)
+static void GRAPH_OT_view_togglehandles (wmOperatorType *ot)
{
/* identification */
ot->name= "Show/Hide All Handles";
#include "BKE_fcurve.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "ED_anim_api.h"
#include "ED_markers.h"
void IMAGE_OT_record_composite(struct wmOperatorType *ot);
-/* uvedit_draw.c */
-void draw_uvedit_main(struct SpaceImage *sima, struct ARegion *ar, struct Scene *scene, struct Object *obedit);
-
/* image_panels.c */
struct ImageUser *ntree_get_active_iuser(struct bNodeTree *ntree);
void image_buttons_register(struct ARegionType *art);
int sfra, efra;
} RecordCompositeData;
-int record_composite_apply(bContext *C, wmOperator *op)
+static int record_composite_apply(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
RecordCompositeData *rcd= op->customdata;
/* can get as well the full picture, as the parts while rendering */
/* XXX will be obsolete, here for reference now */
-void imagewindow_progress(SpaceImage *sima, RenderResult *rr, volatile rcti *renrect)
+static void imagewindow_progress(SpaceImage *sima, RenderResult *rr, volatile rcti *renrect)
{
float x1, y1, *rectf= NULL;
unsigned int *rect32= NULL;
/* coming from BIF_toggle_render_display() */
-void imagewindow_toggle_render(bContext *C)
+static void imagewindow_toggle_render(bContext *C)
{
bScreen *sc= CTX_wm_screen(C);
ScrArea *sa;
}
}
-void ED_space_image_render_callbacks(bContext *C, Render *re)
+static void ED_space_image_render_callbacks(bContext *C, Render *re)
{
// RE_display_init_cb(re, C, imagewindow_init_display_cb);
#include "IMB_imbuf_types.h"
+#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_space_api.h"
#include "ED_screen.h"
return (SpaceLink *)simagen;
}
-void image_operatortypes(void)
+static void image_operatortypes(void)
{
WM_operatortype_append(IMAGE_OT_view_all);
WM_operatortype_append(IMAGE_OT_view_pan);
WM_operatortype_append(IMAGE_OT_scopes);
}
-void image_keymap(struct wmKeyConfig *keyconf)
+static void image_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap= WM_keymap_find(keyconf, "Image Generic", SPACE_IMAGE, 0);
wmKeyMapItem *kmi;
#include "BKE_mesh.h"
#include "BKE_particle.h"
+#include "ED_info.h"
#include "ED_armature.h"
#include "ED_mesh.h"
#include "ED_curve.h" /* for ED_curve_editnurbs */
}
}
-char *ED_info_stats_string(Scene *scene)
+const char *ED_info_stats_string(Scene *scene)
{
if(!scene->stats)
stats_update(scene);
#include "BKE_global.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
#include "UI_interface.h"
#include "UI_view2d.h"
-
#include "info_intern.h" // own include
/* ******************** default callbacks for info space ***************** */
UI_view2d_scrollers_free(scrollers);
}
-void info_operatortypes(void)
+static void info_operatortypes(void)
{
WM_operatortype_append(FILE_OT_pack_all);
WM_operatortype_append(FILE_OT_unpack_all);
WM_operatortype_append(INFO_OT_report_copy);
}
-void info_keymap(struct wmKeyConfig *keyconf)
+static void info_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap= WM_keymap_find(keyconf, "Window", 0, 0);
}
}
-void recent_files_menu_register(void)
+static void recent_files_menu_register(void)
{
MenuType *mt;
#include "BKE_main.h"
#include "BKE_sca.h"
+#include "ED_logic.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "logic_intern.h"
/* ************* Generic Operator Helpers ************* */
-
static int edit_sensor_poll(bContext *C)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "sensor", &RNA_Sensor);
return OPERATOR_CANCELLED;
}
-void LOGIC_OT_sensor_remove(wmOperatorType *ot)
+static void LOGIC_OT_sensor_remove(wmOperatorType *ot)
{
ot->name= "Remove Sensor";
ot->description= "Remove a sensor from the active object";
return OPERATOR_FINISHED;
}
-void LOGIC_OT_sensor_add(wmOperatorType *ot)
+static void LOGIC_OT_sensor_add(wmOperatorType *ot)
{
PropertyRNA *prop;
return OPERATOR_CANCELLED;
}
-void LOGIC_OT_controller_remove(wmOperatorType *ot)
+static void LOGIC_OT_controller_remove(wmOperatorType *ot)
{
ot->name= "Remove Controller";
ot->description= "Remove a controller from the active object";
return OPERATOR_FINISHED;
}
-void LOGIC_OT_controller_add(wmOperatorType *ot)
+static void LOGIC_OT_controller_add(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Add Controller";
return OPERATOR_CANCELLED;
}
-void LOGIC_OT_actuator_remove(wmOperatorType *ot)
+static void LOGIC_OT_actuator_remove(wmOperatorType *ot)
{
ot->name= "Remove Actuator";
ot->description= "Remove a actuator from the active object";
return OPERATOR_FINISHED;
}
-void LOGIC_OT_actuator_add(wmOperatorType *ot)
+static void LOGIC_OT_actuator_add(wmOperatorType *ot)
{
PropertyRNA *prop;
return OPERATOR_CANCELLED;
}
-void LOGIC_OT_sensor_move(wmOperatorType *ot)
+static void LOGIC_OT_sensor_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Sensor";
return OPERATOR_CANCELLED;
}
-void LOGIC_OT_controller_move(wmOperatorType *ot)
+static void LOGIC_OT_controller_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Controller";
return OPERATOR_CANCELLED;
}
-void LOGIC_OT_actuator_move(wmOperatorType *ot)
+static void LOGIC_OT_actuator_move(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Move Actuator";
}
}
-void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
+static void do_logic_buts(bContext *C, void *UNUSED(arg), int event)
{
Main *bmain= CTX_data_main(C);
bSensor *sens;
but->retval = B_REDR;
}
-void update_object_actuator_PID(bContext *UNUSED(C), void *act, void *UNUSED(arg))
+static void update_object_actuator_PID(bContext *UNUSED(C), void *act, void *UNUSED(arg))
{
bObjectActuator *oa = act;
oa->forcerot[0] = 60.0f*oa->forcerot[1];
}
-char *get_state_name(Object *ob, short bit)
+static char *get_state_name(Object *ob, short bit)
{
bController *cont;
unsigned int mask;
uiItemR(layout, ptr, "material", 0, NULL, ICON_NULL);
}
-void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C)
+static void draw_brick_sensor(uiLayout *layout, PointerRNA *ptr, bContext *C)
{
uiLayout *box;
}
-void draw_brick_controller(uiLayout *layout, PointerRNA *ptr)
+static void draw_brick_controller(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *box;
uiItemR(row, ptr, "apply_to_children", 0, NULL, ICON_NULL);
}
-void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C)
+static void draw_brick_actuator(uiLayout *layout, PointerRNA *ptr, bContext *C)
{
uiLayout *box;
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
return (SpaceLink *)slogicn;
}
-void logic_operatortypes(void)
+static void logic_operatortypes(void)
{
WM_operatortype_append(LOGIC_OT_properties);
WM_operatortype_append(LOGIC_OT_links_cut);
}
-void logic_keymap(struct wmKeyConfig *keyconf)
+static void logic_keymap(struct wmKeyConfig *keyconf)
{
wmKeyMap *keymap= WM_keymap_find(keyconf, "Logic Editor", SPACE_LOGIC, 0);
return OPERATOR_FINISHED;
}
-void NLA_OT_bake (wmOperatorType *ot)
+static void NLA_OT_bake (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Bake Strips";
/* Moves the start-point of the selected strips to the specified places */
/* defines for snap keyframes tool */
-EnumPropertyItem prop_nlaedit_snap_types[] = {
+static EnumPropertyItem prop_nlaedit_snap_types[] = {
{NLAEDIT_SNAP_CFRA, "CFRA", 0, "Current frame", ""},
{NLAEDIT_SNAP_NEAREST_FRAME, "NEAREST_FRAME", 0, "Nearest Frame", ""}, // XXX as single entry?
{NLAEDIT_SNAP_NEAREST_SECOND, "NEAREST_SECOND", 0, "Nearest Second", ""}, // XXX as single entry?
* 3) (de)select all - no testing is done; only for use internal tools as normal function...
*/
-enum {
+static enum {
DESELECT_STRIPS_NOTEST = 0,
DESELECT_STRIPS_TEST,
DESELECT_STRIPS_CLEARACTIVE,
*/
/* defines for borderselect mode */
-enum {
+static enum {
NLA_BORDERSEL_ALLSTRIPS = 0,
NLA_BORDERSEL_FRAMERANGE,
NLA_BORDERSEL_CHANNELS,
#include "BKE_main.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_anim_api.h"
#include "ED_markers.h"
#include "ED_screen.h"
}
static float *_sample_col= NULL; // bad bad, 2.5 will do better?
-void node_curvemap_sample(float *col)
+static void node_curvemap_sample(float *col)
{
_sample_col= col;
}
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_node.h"
#include "ED_gpencil.h"
#include "UI_interface.h"
}
/* also checks for edited groups */
-bNode *editnode_get_active(bNodeTree *ntree)
+static bNode *editnode_get_active(bNodeTree *ntree)
{
bNode *node;
/* return 0, nothing done */
-/*static*/ int node_mouse_groupheader(SpaceNode *snode)
+static int node_mouse_groupheader(SpaceNode *snode)
{
bNode *gnode;
float mx=0, my=0;
struct bNode *node;
} bNodeListItem;
-int sort_nodes_locx(void *a, void *b)
+static int sort_nodes_locx(void *a, void *b)
{
bNodeListItem *nli1 = (bNodeListItem *)a;
bNodeListItem *nli2 = (bNodeListItem *)b;
#include "BKE_context.h"
+#include "ED_node.h"
#include "ED_screen.h"
#include "ED_transform.h"
#include "BKE_screen.h"
#include "BKE_node.h"
+#include "ED_space_api.h"
#include "ED_render.h"
#include "ED_screen.h"
}
/* Helped function to put duplicate sequence in the same tree. */
-int need_add_seq_dup(Sequence *seq)
+static int need_add_seq_dup(Sequence *seq)
{
Sequence *p;
return(1);
}
-void add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index)
+static void add_seq_dup(SpaceOops *soops, Sequence *seq, TreeElement *te, short index)
{
TreeElement *ch;
Sequence *p;
return 1;
}
-void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
+static void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Base *base= (Base *)te->directdata;
Object *ob = (Object *)tselem->id;
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
+static void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Base *base= (Base *)te->directdata;
#endif
// XXX just use View2D ops for this?
-void outliner_page_up_down(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int up)
+static void outliner_page_up_down(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int up)
{
int dy= ar->v2d.mask.ymax-ar->v2d.mask.ymin;
}
}
-void outliner_del(bContext *C, Scene *scene, ARegion *UNUSED(ar), SpaceOops *soops)
+static void outliner_del(bContext *C, Scene *scene, ARegion *UNUSED(ar), SpaceOops *soops)
{
if(soops->outlinevis==SO_SEQUENCE)
/* These operators are only available in databrowser mode for now, as
* they depend on having RNA paths and/or hierarchies available.
*/
-enum {
+static enum {
DRIVERS_EDITMODE_ADD = 0,
DRIVERS_EDITMODE_REMOVE,
} eDrivers_EditModes;
/* These operators are only available in databrowser mode for now, as
* they depend on having RNA paths and/or hierarchies available.
*/
-enum {
+static enum {
KEYINGSET_EDITMODE_ADD = 0,
KEYINGSET_EDITMODE_REMOVE,
} eKeyingSet_EditModes;
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "WM_api.h"
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
/* Note, Dont use WHILE_SEQ while drawing! - it messes up transform, - Campbell */
-int no_rightbox=0, no_leftbox= 0;
+static int no_rightbox=0, no_leftbox= 0;
static void draw_shadedstrip(Sequence *seq, unsigned char col[3], float x1, float y1, float x2, float y2);
static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[3])
static Sequence *special_seq_update= 0;
-void set_special_seq_update(int val)
+static void set_special_seq_update(int val)
{
// int x;
{0, NULL, 0, NULL, NULL}
};
-EnumPropertyItem prop_side_lr_types[] = {
+static EnumPropertyItem prop_side_lr_types[] = {
{SEQ_SIDE_LEFT, "LEFT", 0, "Left", ""},
{SEQ_SIDE_RIGHT, "RIGHT", 0, "Right", ""},
{0, NULL, 0, NULL, NULL}
int len;
} TransSeq;
-Sequence *get_foreground_frame_seq(Scene *scene, int frame)
+static Sequence *get_foreground_frame_seq(Scene *scene, int frame)
{
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *seq, *best_seq=NULL;
}
-int mouse_frame_side(View2D *v2d, short mouse_x, int frame )
+static int mouse_frame_side(View2D *v2d, short mouse_x, int frame )
{
short mval[2];
float mouseloc[2];
return NULL;
}
-Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, int sel)
+static Sequence *find_next_prev_sequence(Scene *scene, Sequence *test, int lr, int sel)
{
/* sel - 0==unselected, 1==selected, -1==done care*/
Sequence *seq,*best_seq = NULL;
}
-void change_sequence(Scene *scene)
+static void change_sequence(Scene *scene)
{
Editing *ed= seq_give_editing(scene, FALSE);
Sequence *last_seq= seq_active_get(scene);
return did_something;
}
-int insert_gap(Scene *scene, int gap, int cfra)
+static int insert_gap(Scene *scene, int gap, int cfra)
{
Sequence *seq;
Editing *ed= seq_give_editing(scene, FALSE);
return done;
}
-void touch_seq_files(Scene *scene)
+static void touch_seq_files(Scene *scene)
{
Sequence *seq;
Editing *ed= seq_give_editing(scene, FALSE);
}
*/
-void seq_remap_paths(Scene *scene)
+static void seq_remap_paths(Scene *scene)
{
Sequence *seq, *last_seq = seq_active_get(scene);
Editing *ed= seq_give_editing(scene, FALSE);
}
-void no_gaps(Scene *scene)
+static void no_gaps(Scene *scene)
{
Editing *ed= seq_give_editing(scene, FALSE);
int cfra, first= 0, done;
return OPERATOR_FINISHED;
}
-int sequencer_effect_poll(bContext *C)
+static int sequencer_effect_poll(bContext *C)
{
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
#include "sequencer_intern.h"
static void *find_nearest_marker(int UNUSED(d1), int UNUSED(d2)) {return NULL;}
-void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */
+static void select_surrounding_handles(Scene *scene, Sequence *test) /* XXX BRING BACK */
{
Sequence *neighbor;
#endif
-void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */
+static void select_single_seq(Scene *scene, Sequence *seq, int deselect_all) /* BRING BACK */
{
Editing *ed= seq_give_editing(scene, FALSE);
// remove this function, replace with invert operator
//void swap_select_seq(Scene *scene)
-void select_neighbor_from_last(Scene *scene, int lr)
+static void select_neighbor_from_last(Scene *scene, int lr)
{
Sequence *seq= seq_active_get(scene);
Sequence *neighbor;
#include "BKE_sequencer.h"
#include "BKE_global.h"
+#include "ED_space_api.h"
+#include "ED_sequencer.h"
#include "ED_screen.h"
#include "ED_view3d.h" /* only for sequencer view3d drawing callback */
return arnew;
}
-ARegion *sequencer_find_region(ScrArea *sa, short type)
+static ARegion *sequencer_find_region(ScrArea *sa, short type)
{
ARegion *ar=NULL;
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
/* scrollers? */
}
-void sound_operatortypes(void)
+static void sound_operatortypes(void)
{
}
-void sound_keymap(struct wmKeyConfig *UNUSED(keyconf))
+static void sound_keymap(struct wmKeyConfig *UNUSED(keyconf))
{
}
#include "BKE_context.h"
#include "BKE_screen.h"
+#include "ED_space_api.h"
#include "ED_screen.h"
#include "BIF_gl.h"
/* Ensures the format string for the given line is long enough, reallocating
as needed. Allocation is done here, alone, to ensure consistency. */
-int text_check_format_len(TextLine *line, unsigned int len)
+static int text_check_format_len(TextLine *line, unsigned int len)
{
if(line->format) {
if(strlen(line->format) < len) {
/************************ word-wrap utilities *****************************/
/* cache should be updated in caller */
-int text_get_visible_lines_no(SpaceText *st, int lineno)
+static int text_get_visible_lines_no(SpaceText *st, int lineno)
{
DrawCache *drawcache= (DrawCache *)st->drawcache;
/************************** properties ******************************/
-ARegion *text_has_properties_region(ScrArea *sa)
+static ARegion *text_has_properties_region(ScrArea *sa)
{
ARegion *ar, *arnew;
#include "WM_api.h"
#include "WM_types.h"
+#include "ED_text.h"
#include "ED_curve.h"
#include "ED_screen.h"
#include "UI_interface.h"
}
/* quick enum for tsc->zone (scroller handles) */
-enum {
+static enum {
SCROLLHANDLE_BAR,
SCROLLHANDLE_MIN_OUTSIDE,
SCROLLHANDLE_MAX_OUTSIDE
// XXX
static int doc_scroll= 0;
-short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val)
+static short do_texttools(SpaceText *st, char ascii, unsigned short evnt, short val)
{
ARegion *ar= NULL; // XXX
int qual= 0; // XXX
; // XXX redraw_alltext();
#endif
-short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val)
+static short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val)
{
Text *text;
TextMarker *marker, *mrk, *nxt;
#include "UI_resources.h"
#include "UI_view2d.h"
+#include "ED_space_api.h"
#include "ED_markers.h"
#include "time_intern.h"
#include "WM_api.h"
#include "WM_types.h"
+#include "time_intern.h"
+
/* ****************** Start/End Frame Operators *******************************/
static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-void TIME_OT_start_frame_set (wmOperatorType *ot)
+static void TIME_OT_start_frame_set (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Start Frame";
return OPERATOR_FINISHED;
}
-void TIME_OT_end_frame_set (wmOperatorType *ot)
+static void TIME_OT_end_frame_set (wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set End Frame";
return OPERATOR_FINISHED;
}
-void TIME_OT_view_all (wmOperatorType *ot)
+static void TIME_OT_view_all (wmOperatorType *ot)
{
/* identifiers */
ot->name= "View All";
#include "BKE_screen.h"
#include "ED_screen.h"
+#include "ED_space_api.h"
#include "WM_api.h"
#include "WM_types.h"
ED_region_panels(C, ar, 1, NULL, -1);
}
-void userpref_operatortypes(void)
+static void userpref_operatortypes(void)
{
}
-void userpref_keymap(struct wmKeyConfig *UNUSED(keyconf))
+static void userpref_keymap(struct wmKeyConfig *UNUSED(keyconf))
{
}
return 1;
}
-void draw_mesh_text(Scene *scene, Object *ob, int glsl)
+static void draw_mesh_text(Scene *scene, Object *ob, int glsl)
{
Mesh *me = ob->data;
DerivedMesh *ddm;
}
/* uses boundbox, function used by Ketsji */
-void get_local_bounds(Object *ob, float *center, float *size)
+static void get_local_bounds(Object *ob, float *center, float *size)
{
BoundBox *bb= object_get_boundbox(ob);
/* ************************** WARP *************************** */
-void postInputWarp(TransInfo *t, float values[3])
+static void postInputWarp(TransInfo *t, float values[3])
{
mul_v3_fl(values, (float)(M_PI * 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);
}
/* ************************** 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);
}
-void NDofTransform(void)
+static void NDofTransform(void)
{
#if 0 // TRANSFORM_FIX_ME
float fval[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)
}
/* 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");
}
}
-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;
unit_m3(td->smtx);
}
-void createTransNodeData(bContext *C, TransInfo *t)
+static void createTransNodeData(bContext *C, TransInfo *t)
{
TransData *td;
TransData2D *td2d;
calculateCenter2D(t);
}
-void calculateCenterCursorGraph2D(TransInfo *t)
+static void calculateCenterCursorGraph2D(TransInfo *t)
{
SpaceIpo *sipo= (SpaceIpo *)t->sa->spacedata.first;
Scene *scene= t->scene;
/* ************************** 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)
}
-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)
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);
}
}
-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)
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;
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);
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;
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);
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;
}
}
-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];
}
/* 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;
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);
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},
return OPERATOR_FINISHED;
}
-void TRANSFORM_OT_snap_type(wmOperatorType *ot)
+static void TRANSFORM_OT_snap_type(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Snap Type";
return OPERATOR_CANCELLED;
}
-void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot)
+static void TRANSFORM_OT_select_orientation(struct wmOperatorType *ot)
{
PropertyRNA *prop;
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";
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";
return 0;
}
-void initSnappingMode(TransInfo *t)
+static void initSnappingMode(TransInfo *t)
{
ToolSettings *ts = t->settings;
Object *obedit = t->obedit;
}
/*================================================================*/
-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;
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;
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];
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];
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);
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;
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;
/******************** PEELING *********************************/
-int cmpPeel(void *arg1, void *arg2)
+static int cmpPeel(void *arg1, void *arg2)
{
DepthPeel *p1 = arg1;
DepthPeel *p2 = arg2;
return val;
}
-void removeDoublesPeel(ListBase *depth_peels)
+static void removeDoublesPeel(ListBase *depth_peels)
{
DepthPeel *peel;
}
}
-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");
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);
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;
#include "BLI_math.h"
#include "BLI_editVert.h"
+#include "ED_util.h"
+
#define TAN_MAKE_VEC(a, b, c) a[0]= b[0] + 0.2f*(b[0]-c[0]); a[1]= b[1] + 0.2f*(b[1]-c[1]); a[2]= b[2] + 0.2f*(b[2]-c[2])
static void set_crazy_vertex_quat(float *quat, float *v1, float *v2, float *v3, float *def1, float *def2, float *def3)
{
#include "BKE_depsgraph.h"
#include "BKE_global.h"
+#include "ED_util.h"
#include "ED_mesh.h"
#include "UI_interface.h"
#include "UI_resources.h"
+#include "util_intern.h"
+
/* ***************** generic editmode undo system ********************* */
/*
/* ********************************************************************* */
/* ****** XXX ***** */
-void error(const char *UNUSED(arg)) {}
+static void error(const char *UNUSED(arg)) {}
/* ****** XXX ***** */
return ed_undo_step(C, -1, NULL);
}
+#if 0 /* UNUSED */
void ED_undo_menu(bContext *C)
{
Object *obedit= CTX_data_edit_object(C);
}
}
}
+#endif
/* ********************** */
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "ED_util.h"
#include "ED_image.h"
#include "ED_mesh.h"
#include "ED_uvedit.h"
return sel;
}
-int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mode)
+static int uvedit_center(Scene *scene, Image *ima, Object *obedit, float *cent, int mode)
{
EditMesh *em= BKE_mesh_get_editmesh((Mesh*)obedit->data);
EditFace *efa;
return OPERATOR_FINISHED;
}
-void UV_OT_align(wmOperatorType *ot)
+static void UV_OT_align(wmOperatorType *ot)
{
static EnumPropertyItem axis_items[] = {
{'a', "ALIGN_AUTO", 0, "Align Auto", "Automatically choose the axis on which there is most alignment already"},
return OPERATOR_FINISHED;
}
-void UV_OT_weld(wmOperatorType *ot)
+static void UV_OT_weld(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Weld";
return OPERATOR_FINISHED;
}
-void UV_OT_stitch(wmOperatorType *ot)
+static void UV_OT_stitch(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Stitch";
return OPERATOR_FINISHED;
}
-void UV_OT_select_inverse(wmOperatorType *ot)
+static void UV_OT_select_inverse(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select Inverse";
return OPERATOR_FINISHED;
}
-void UV_OT_select_all(wmOperatorType *ot)
+static void UV_OT_select_all(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select or Deselect All";
return select_exec(C, op);
}
-void UV_OT_select(wmOperatorType *ot)
+static void UV_OT_select(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select";
return select_loop_exec(C, op);
}
-void UV_OT_select_loop(wmOperatorType *ot)
+static void UV_OT_select_loop(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Loop Select";
return select_linked_internal(C, op, NULL, 0);
}
-void UV_OT_select_linked(wmOperatorType *ot)
+static void UV_OT_select_linked(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select Linked";
return select_linked_internal(C, op, NULL, 1);
}
-void UV_OT_select_linked_pick(wmOperatorType *ot)
+static void UV_OT_select_linked_pick(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Select Linked Pick";
return OPERATOR_FINISHED;
}
-void UV_OT_unlink_selection(wmOperatorType *ot)
+static void UV_OT_unlink_selection(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Unlink Selection";
return OPERATOR_CANCELLED;
}
-void UV_OT_select_border(wmOperatorType *ot)
+static void UV_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Border Select";
}
}
-int circle_select_exec(bContext *C, wmOperator *op)
+static int circle_select_exec(bContext *C, wmOperator *op)
{
SpaceImage *sima= CTX_wm_space_image(C);
Scene *scene= CTX_data_scene(C);
return OPERATOR_FINISHED;
}
-void UV_OT_circle_select(wmOperatorType *ot)
+static void UV_OT_circle_select(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Circle Select";
return OPERATOR_FINISHED;
}
-void UV_OT_snap_cursor(wmOperatorType *ot)
+static void UV_OT_snap_cursor(wmOperatorType *ot)
{
static EnumPropertyItem target_items[] = {
{0, "PIXELS", 0, "Pixels", ""},
return OPERATOR_FINISHED;
}
-void UV_OT_snap_selection(wmOperatorType *ot)
+static void UV_OT_snap_selection(wmOperatorType *ot)
{
static EnumPropertyItem target_items[] = {
{0, "PIXELS", 0, "Pixels", ""},
return OPERATOR_FINISHED;
}
-void UV_OT_pin(wmOperatorType *ot)
+static void UV_OT_pin(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Pin";
return OPERATOR_FINISHED;
}
-void UV_OT_select_pinned(wmOperatorType *ot)
+static void UV_OT_select_pinned(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Selected Pinned";
return OPERATOR_FINISHED;
}
-void UV_OT_hide(wmOperatorType *ot)
+static void UV_OT_hide(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Hide Selected";
return OPERATOR_FINISHED;
}
-void UV_OT_reveal(wmOperatorType *ot)
+static void UV_OT_reveal(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Reveal Hidden";
return set_2d_cursor_exec(C, op);
}
-void UV_OT_cursor_set(wmOperatorType *ot)
+static void UV_OT_cursor_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set 2D Cursor";
return set_tile_exec(C, op);
}
-void UV_OT_tile_set(wmOperatorType *ot)
+static void UV_OT_tile_set(wmOperatorType *ot)
{
/* identifiers */
ot->name= "Set Tile";
/****************** Parametrizer Conversion ***************/
-ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit, short fill, short sel, short correct_aspect)
+static ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit, short fill, short sel, short correct_aspect)
{
ParamHandle *handle;
EditFace *efa;
"\n"
" Make this euler compatible with another, so interpolating between them works as intended.\n"
"\n"
-" :arg other: make compatible with this rotation.\n"
-" :type other: :class:`Euler`\n"
-"\n"
" .. note:: the rotation order is not taken into account for this function.\n"
;
static PyObject *Euler_make_compatible(EulerObject * self, PyObject *value)
if(strcmp(identifier, rna_attr) == 0) { \
item= PyObject_GetAttrString(py_class, py_attr); \
if(item && item != Py_None) { \
- if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class error:") != 0) { \
+ if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class:") != 0) { \
Py_DECREF(item); \
return -1; \
} \
else {
Py_DECREF(item); /* no need to keep a ref, the class owns it */
- if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class error:") != 0)
+ if(pyrna_py_to_prop(dummyptr, prop, NULL, item, "validating class:") != 0)
return -1;
}
}
return 0;
} /* end of int main(argc,argv) */
-static void error_cb(char *err)
+static void error_cb(const char *err)
{
printf("%s\n", err); /* XXX do this in WM too */