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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-03 15:30:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-03 15:30:59 +0300
commitcd972535027a73ba70069051fe9038b6a8b5696a (patch)
treeb50696bddbc710192b89e34fcdd1e82e6c8073b7 /source/blender/editors
parentaca76ddb502cbf0ee7888c3356f9f35240919410 (diff)
- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings. - removed/renamed various shadowed vars. - removed BGE lamp.colour, only allow lamp.color attribute.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_ipo_utils.c4
-rw-r--r--source/blender/editors/animation/keyingsets.c2
-rw-r--r--source/blender/editors/armature/editarmature.c26
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c7
-rw-r--r--source/blender/editors/armature/meshlaplacian.c4
-rw-r--r--source/blender/editors/armature/poselib.c2
-rw-r--r--source/blender/editors/armature/poseobject.c4
-rw-r--r--source/blender/editors/armature/reeb.h4
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/include/BIF_glutil.h2
-rw-r--r--source/blender/editors/include/UI_interface_icons.h2
-rw-r--r--source/blender/editors/interface/interface_draw.c2
-rw-r--r--source/blender/editors/interface/interface_handlers.c14
-rw-r--r--source/blender/editors/interface/interface_icons.c6
-rw-r--r--source/blender/editors/interface/interface_layout.c18
-rw-r--r--source/blender/editors/interface/interface_regions.c2
-rw-r--r--source/blender/editors/interface/interface_templates.c17
-rw-r--r--source/blender/editors/interface/interface_widgets.c11
-rw-r--r--source/blender/editors/interface/resources.c2
-rw-r--r--source/blender/editors/interface/view2d_ops.c2
-rw-r--r--source/blender/editors/mesh/editmesh.c8
-rw-r--r--source/blender/editors/mesh/editmesh_loop.c4
-rw-r--r--source/blender/editors/mesh/editmesh_mods.c5
-rw-r--r--source/blender/editors/mesh/editmesh_tools.c10
-rw-r--r--source/blender/editors/mesh/meshtools.c1
-rw-r--r--source/blender/editors/object/object_edit.c16
-rw-r--r--source/blender/editors/object/object_lattice.c2
-rw-r--r--source/blender/editors/object/object_select.c16
-rw-r--r--source/blender/editors/physics/particle_edit.c38
-rw-r--r--source/blender/editors/render/render_preview.c8
-rw-r--r--source/blender/editors/render/render_shading.c14
-rw-r--r--source/blender/editors/screen/glutil.c13
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c2
-rw-r--r--source/blender/editors/space_action/action_draw.c2
-rw-r--r--source/blender/editors/space_console/console_draw.c4
-rw-r--r--source/blender/editors/space_console/console_ops.c5
-rw-r--r--source/blender/editors/space_file/file_intern.h2
-rw-r--r--source/blender/editors/space_file/filelist.h6
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c1
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_image/image_buttons.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c8
-rw-r--r--source/blender/editors/space_info/info_ops.c4
-rw-r--r--source/blender/editors/space_info/space_info.c2
-rw-r--r--source/blender/editors/space_logic/logic_window.c1
-rw-r--r--source/blender/editors/space_nla/nla_draw.c6
-rw-r--r--source/blender/editors/space_outliner/outliner.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c10
-rw-r--r--source/blender/editors/space_sequencer/sequencer_select.c12
-rw-r--r--source/blender/editors/space_text/text_draw.c6
-rw-r--r--source/blender/editors/space_text/text_intern.h2
-rw-r--r--source/blender/editors/space_text/text_python.c2
-rw-r--r--source/blender/editors/space_view3d/drawarmature.c2
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c2
-rw-r--r--source/blender/editors/space_view3d/drawobject.c11
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c12
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c7
-rw-r--r--source/blender/editors/space_view3d/view3d_snap.c10
-rw-r--r--source/blender/editors/transform/transform.c16
-rw-r--r--source/blender/editors/transform/transform_conversions.c10
-rw-r--r--source/blender/editors/transform/transform_generics.c7
-rw-r--r--source/blender/editors/transform/transform_manipulator.c5
-rw-r--r--source/blender/editors/transform/transform_orientations.c42
-rw-r--r--source/blender/editors/transform/transform_snap.c24
-rw-r--r--source/blender/editors/uvedit/uvedit_parametrizer.h2
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c2
70 files changed, 239 insertions, 271 deletions
diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c
index 4bc2654e581..13cbfeec2bb 100644
--- a/source/blender/editors/animation/anim_ipo_utils.c
+++ b/source/blender/editors/animation/anim_ipo_utils.c
@@ -172,14 +172,14 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu)
/* step between the major distinguishable color bands of the primary colors */
#define HSV_BANDWIDTH 0.3f
-/* used to determine the colour of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
+/* used to determine the color of F-Curves with FCURVE_COLOR_AUTO_RAINBOW set */
//void fcurve_rainbow (unsigned int cur, unsigned int tot, float *out)
void getcolor_fcurve_rainbow (int cur, int tot, float *out)
{
float hue, val, sat, fac;
int grouping;
- /* we try to divide the colours into groupings of n colors,
+ /* we try to divide the color into groupings of n colors,
* where n is:
* 3 - for 'odd' numbers of curves - there should be a majority of triplets of curves
* 4 - for 'even' numbers of curves - there should be a majority of quartets of curves
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index 5d96c015caa..9c801d97ba8 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -603,7 +603,7 @@ void ANIM_keyingset_info_unregister (const bContext *C, KeyingSetInfo *ksi)
/* --------------- */
-void ANIM_keyingset_infos_exit ()
+void ANIM_keyingset_infos_exit (void)
{
KeyingSetInfo *ksi, *next;
diff --git a/source/blender/editors/armature/editarmature.c b/source/blender/editors/armature/editarmature.c
index 2f6bccff404..9260a3a9953 100644
--- a/source/blender/editors/armature/editarmature.c
+++ b/source/blender/editors/armature/editarmature.c
@@ -1212,16 +1212,10 @@ void ARMATURE_OT_separate (wmOperatorType *ot)
/* only for opengl selection indices */
Bone *get_indexed_bone (Object *ob, int index)
{
- bPoseChannel *pchan;
- int a= 0;
-
if(ob->pose==NULL) return NULL;
index>>=16; // bone selection codes use left 2 bytes
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, a++) {
- if(a==index) return pchan->bone;
- }
- return NULL;
+ return BLI_findlink(&ob->pose->chanbase, index);
}
/* See if there are any selected bones in this buffer */
@@ -1780,7 +1774,7 @@ EditBone *ED_armature_bone_get_mirrored(ListBase *edbo, EditBone *ebo)
static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
{
bArmature *arm;
- EditBone *curBone, *next;
+ EditBone *curBone, *ebone_next;
bConstraint *con;
Object *obedit= CTX_data_edit_object(C); // XXX get from context
arm = obedit->data;
@@ -1794,9 +1788,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
for (curBone=arm->edbo->first; curBone; curBone=curBone->next) {
if (arm->layer & curBone->layer) {
if (curBone->flag & BONE_SELECTED) {
- next = ED_armature_bone_get_mirrored(arm->edbo, curBone);
- if (next)
- next->flag |= BONE_SELECTED;
+ ebone_next= ED_armature_bone_get_mirrored(arm->edbo, curBone);
+ if (ebone_next)
+ ebone_next->flag |= BONE_SELECTED;
}
}
}
@@ -1804,9 +1798,9 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
/* First erase any associated pose channel */
if (obedit->pose) {
- bPoseChannel *pchan, *next;
- for (pchan=obedit->pose->chanbase.first; pchan; pchan=next) {
- next= pchan->next;
+ bPoseChannel *pchan, *pchan_next;
+ for (pchan=obedit->pose->chanbase.first; pchan; pchan= pchan_next) {
+ pchan_next= pchan->next;
curBone = editbone_name_exists(arm->edbo, pchan->name);
if (curBone && (curBone->flag & BONE_SELECTED) && (arm->layer & curBone->layer)) {
@@ -1844,8 +1838,8 @@ static int armature_delete_selected_exec(bContext *C, wmOperator *UNUSED(op))
}
- for (curBone=arm->edbo->first;curBone;curBone=next) {
- next=curBone->next;
+ for (curBone=arm->edbo->first; curBone; curBone= ebone_next) {
+ ebone_next= curBone->next;
if (arm->layer & curBone->layer) {
if (curBone->flag & BONE_SELECTED) {
if(curBone==arm->act_edbone) arm->act_edbone= NULL;
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 5ef13bcdc1b..d043c2e472d 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -304,7 +304,7 @@ void RIG_freeRigGraph(BGraph *rg)
/************************************* ALLOCATORS ******************************************************/
-static RigGraph *newRigGraph()
+static RigGraph *newRigGraph(void)
{
RigGraph *rg;
int totthread;
@@ -1535,8 +1535,7 @@ RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
if (obedit == ob)
{
- bArmature *arm = obedit->data;
- rg->editbones = arm->edbo;
+ rg->editbones = ((bArmature *)obedit->data)->edbo;
}
else
{
@@ -2792,7 +2791,7 @@ int RIG_nbJoints(RigGraph *rg)
return total;
}
-void BIF_freeRetarget()
+void BIF_freeRetarget(void)
{
if (GLOBAL_RIGG)
{
diff --git a/source/blender/editors/armature/meshlaplacian.c b/source/blender/editors/armature/meshlaplacian.c
index f193defc129..e93775f593b 100644
--- a/source/blender/editors/armature/meshlaplacian.c
+++ b/source/blender/editors/armature/meshlaplacian.c
@@ -63,8 +63,8 @@
/* ************* XXX *************** */
static void waitcursor(int UNUSED(val)) {}
static void progress_bar(int UNUSED(dummy_val), const char *UNUSED(dummy)) {}
-static void start_progress_bar() {}
-static void end_progress_bar() {}
+static void start_progress_bar(void) {}
+static void end_progress_bar(void) {}
static void error(char *str) { printf("error: %s\n", str); }
/* ************* XXX *************** */
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c
index d1430808fca..2ec940d25bc 100644
--- a/source/blender/editors/armature/poselib.c
+++ b/source/blender/editors/armature/poselib.c
@@ -73,7 +73,7 @@
/* ******* XXX ********** */
-static void action_set_activemarker() {}
+static void action_set_activemarker(void *UNUSED(a), void *UNUSED(b), void *UNUSED(c)) {}
/* ************************************************************* */
/* == POSE-LIBRARY TOOL FOR BLENDER ==
diff --git a/source/blender/editors/armature/poseobject.c b/source/blender/editors/armature/poseobject.c
index 6b12bafc187..db2e8eb276a 100644
--- a/source/blender/editors/armature/poseobject.c
+++ b/source/blender/editors/armature/poseobject.c
@@ -833,9 +833,7 @@ void pose_copy_menu(Scene *scene)
* appending to list of constraints for this channel
*/
copy_constraints(&tmp_constraints, &const_copy, TRUE);
- if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
- bConstraint *con;
-
+ if ((ob->proxy) && (pchan->bone->layer & arm->layer_protected)) {
/* add proxy-local tags */
for (con= tmp_constraints.first; con; con= con->next)
con->flag |= CONSTRAINT_PROXY_LOCAL;
diff --git a/source/blender/editors/armature/reeb.h b/source/blender/editors/armature/reeb.h
index 3bebc423235..39f83407d74 100644
--- a/source/blender/editors/armature/reeb.h
+++ b/source/blender/editors/armature/reeb.h
@@ -149,7 +149,7 @@ void angleToVCol(struct EditMesh *em, int index);
void renormalizeWeight(struct EditMesh *em, float newmax);
ReebGraph * generateReebGraph(struct EditMesh *me, int subdivisions);
-ReebGraph * newReebGraph();
+ReebGraph * newReebGraph(void);
void initArcIterator(BArcIterator *iter, struct ReebArc *arc, struct ReebNode *head);
void initArcIterator2(BArcIterator *iter, struct ReebArc *arc, int start, int end);
@@ -195,7 +195,7 @@ ReebGraph *BIF_graphForMultiNode(ReebGraph *rg, ReebNode *node);
void REEB_freeGraph(ReebGraph *rg);
void REEB_freeArc(BArc *barc);
void REEB_exportGraph(ReebGraph *rg, int count);
-void REEB_draw();
+void REEB_draw(void);
#endif /*REEB_H_*/
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index a2441a82539..5a328d4f26d 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -5978,8 +5978,6 @@ Nurb *add_nurbs_primitive(bContext *C, float mat[4][4], int type, int newob)
break;
case CU_PRIM_TUBE: /* Cylinder */
if( cutype==CU_NURBS ) {
- Curve *cu= (Curve*)obedit->data;
-
nu= add_nurbs_primitive(C, mat, CU_NURBS|CU_PRIM_CIRCLE, 0); /* circle */
nu->resolu= cu->resolu;
nu->flag= CU_SMOOTH;
diff --git a/source/blender/editors/include/BIF_glutil.h b/source/blender/editors/include/BIF_glutil.h
index 8f37baf9af1..3fa07da0437 100644
--- a/source/blender/editors/include/BIF_glutil.h
+++ b/source/blender/editors/include/BIF_glutil.h
@@ -197,7 +197,7 @@ void gla2DSetMap(gla2DDrawInfo *di, struct rctf *rect);
/* use this for platform hacks. glPointSize is solved here */
void bglBegin(int mode);
void bglEnd(void);
-int bglPointHack();
+int bglPointHack(void);
void bglVertex3fv(float *vec);
void bglVertex3f(float x, float y, float z);
void bglVertex2fv(float *vec);
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index b698cd610a2..34a390b250e 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -62,7 +62,7 @@ void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspec
void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha);
void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb);
void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha);
-void UI_icons_free();
+void UI_icons_free(void);
void UI_icons_free_drawinfo(void *drawinfo);
struct ListBase *UI_iconfile_list(void);
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 0f298f5cbef..be54e6a2feb 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -386,7 +386,7 @@ void uiRoundRectFakeAA(float minx, float miny, float maxx, float maxy, float rad
float raddiff;
int i, passes=4;
- /* get the colour and divide up the alpha */
+ /* get the color and divide up the alpha */
glGetFloatv(GL_CURRENT_COLOR, color);
alpha = 1; //color[3];
color[3]= 0.5*alpha/(float)passes;
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 22f1771923b..8724b7fad28 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -1068,19 +1068,19 @@ static void ui_but_copy_paste(bContext *C, uiBut *but, uiHandleButtonData *data,
/* text/string and ID data */
else if(ELEM3(but->type, TEX, IDPOIN, SEARCH_MENU)) {
- uiHandleButtonData *data= but->active;
+ uiHandleButtonData *active_data= but->active;
if(but->poin==NULL && but->rnapoin.data==NULL);
else if(mode=='c') {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
- BLI_strncpy(buf, data->str, UI_MAX_DRAW_STR);
- WM_clipboard_text_set(data->str, 0);
- data->cancel= 1;
+ BLI_strncpy(buf, active_data->str, UI_MAX_DRAW_STR);
+ WM_clipboard_text_set(active_data->str, 0);
+ active_data->cancel= 1;
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
else {
button_activate_state(C, but, BUTTON_STATE_TEXT_EDITING);
- BLI_strncpy(data->str, buf, data->maxlen);
+ BLI_strncpy(active_data->str, buf, active_data->maxlen);
button_activate_state(C, but, BUTTON_STATE_EXIT);
}
}
@@ -1281,7 +1281,7 @@ static int ui_textedit_type_ascii(uiBut *but, uiHandleButtonData *data, char asc
return changed;
}
-void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump)
+static void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int select, int jump)
{
char *str;
int len;
@@ -1384,7 +1384,7 @@ void ui_textedit_move(uiBut *but, uiHandleButtonData *data, int direction, int s
}
}
-void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select)
+static void ui_textedit_move_end(uiBut *but, uiHandleButtonData *data, int direction, int select)
{
char *str;
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index e39e594af66..8533e5ba893 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -455,7 +455,7 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float UNUSED(alpha)
glDisable(GL_LINE_SMOOTH);
}
-static void init_brush_icons()
+static void init_brush_icons(void)
{
#define INIT_BRUSH_ICON(icon_id, name) \
@@ -500,7 +500,7 @@ static void init_brush_icons()
#undef INIT_BRUSH_ICON
}
-static void init_internal_icons()
+static void init_internal_icons(void)
{
bTheme *btheme= U.themes.first;
ImBuf *bbuf= NULL;
@@ -731,7 +731,7 @@ void UI_icons_free_drawinfo(void *drawinfo)
}
}
-static DrawInfo *icon_create_drawinfo()
+static DrawInfo *icon_create_drawinfo(void)
{
DrawInfo *di = NULL;
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c
index 4e669746c2f..4c166251268 100644
--- a/source/blender/editors/interface/interface_layout.c
+++ b/source/blender/editors/interface/interface_layout.c
@@ -716,17 +716,17 @@ void uiItemsFullEnumO(uiLayout *layout, const char *opname, const char *propname
for(i=0; i<totitem; i++) {
if(item[i].identifier[0]) {
if(properties) {
- PointerRNA ptr;
+ PointerRNA tptr;
- WM_operator_properties_create(&ptr, opname);
- if(ptr.data) {
- IDP_FreeProperty(ptr.data);
- MEM_freeN(ptr.data);
+ WM_operator_properties_create(&tptr, opname);
+ if(tptr.data) {
+ IDP_FreeProperty(tptr.data);
+ MEM_freeN(tptr.data);
}
- ptr.data= IDP_CopyProperty(properties);
- RNA_enum_set(&ptr, propname, item[i].value);
+ tptr.data= IDP_CopyProperty(properties);
+ RNA_enum_set(&tptr, propname, item[i].value);
- uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, ptr.data, context, flag);
+ uiItemFullO(column, opname, (char*)item[i].name, item[i].icon, tptr.data, context, flag);
}
else
uiItemEnumO(column, opname, (char*)item[i].name, item[i].icon, propname, item[i].value);
@@ -2548,7 +2548,7 @@ void uiBlockLayoutResolve(uiBlock *block, int *x, int *y)
/* XXX silly trick, interface_templates.c doesn't get linked
* because it's not used by other files in this module? */
{
- void ui_template_fix_linking();
+ void ui_template_fix_linking(void);
ui_template_fix_linking();
}
}
diff --git a/source/blender/editors/interface/interface_regions.c b/source/blender/editors/interface/interface_regions.c
index 0747d772cdf..6b834c08456 100644
--- a/source/blender/editors/interface/interface_regions.c
+++ b/source/blender/editors/interface/interface_regions.c
@@ -1833,7 +1833,7 @@ static void uiBlockPicker(uiBlock *block, float *rgb, PointerRNA *ptr, PropertyR
width= PICKER_TOTAL_W;
butwidth = width - UI_UNIT_X - 10;
- /* existence of profile means storage is in linear colour space, with display correction */
+ /* existence of profile means storage is in linear color space, with display correction */
if (block->color_profile == BLI_PR_NONE) {
sprintf(tip, "Value in Display Color Space");
copy_v3_v3(rgb_gamma, rgb);
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 75daa7633a4..ae75bd03d86 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -55,7 +55,7 @@
#include "BLF_api.h"
-void ui_template_fix_linking()
+void ui_template_fix_linking(void)
{
}
@@ -1959,7 +1959,6 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon)
static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, const char *activepropname)
{
- Object *ob;
uiBlock *block= uiLayoutGetBlock(layout);
uiBut *but;
uiLayout *split, *overlap, *sub, *row;
@@ -2024,7 +2023,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
}
}
else if(itemptr->type == &RNA_ShapeKey) {
- ob= (Object*)activeptr->data;
+ Object *ob= (Object*)activeptr->data;
split= uiLayoutSplit(sub, 0.75f, 0);
@@ -2324,9 +2323,9 @@ void uiTemplateRunningJobs(uiLayout *layout, bContext *C)
}
if(WM_jobs_test(wm, owner)) {
- uiLayout *abs;
+ uiLayout *ui_abs;
- abs = uiLayoutAbsolute(layout, 0);
+ ui_abs= uiLayoutAbsolute(layout, 0);
uiDefIconBut(block, BUT, handle_event, ICON_PANEL_CLOSE,
0, UI_UNIT_Y*0.1, UI_UNIT_X*0.8, UI_UNIT_Y*0.8, NULL, 0.0f, 0.0f, 0, 0, "Stop this job");
@@ -2349,7 +2348,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
Report *report= BKE_reports_last_displayable(reports);
ReportTimerInfo *rti;
- uiLayout *abs;
+ uiLayout *ui_abs;
uiBlock *block;
uiBut *but;
uiStyle *style= U.uistyles.first;
@@ -2363,8 +2362,8 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
if (!rti || rti->widthfac==0.0 || !report) return;
- abs = uiLayoutAbsolute(layout, 0);
- block= uiLayoutGetBlock(abs);
+ ui_abs= uiLayoutAbsolute(layout, 0);
+ block= uiLayoutGetBlock(ui_abs);
width = BLF_width(style->widget.uifont_id, report->message);
width = MIN2(rti->widthfac*width, width);
@@ -2373,7 +2372,7 @@ void uiTemplateReportsBanner(uiLayout *layout, bContext *C)
/* make a box around the report to make it stand out */
uiBlockBeginAlign(block);
but= uiDefBut(block, ROUNDBOX, 0, "", 0, 0, UI_UNIT_X+10, UI_UNIT_Y, NULL, 0.0f, 0.0f, 0, 0, "");
- /* set the report's bg colour in but->col - ROUNDBOX feature */
+ /* set the report's bg color in but->col - ROUNDBOX feature */
but->col[0]= FTOCHAR(rti->col[0]);
but->col[1]= FTOCHAR(rti->col[1]);
but->col[2]= FTOCHAR(rti->col[2]);
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c
index 2a6ab525f89..403c7001b3b 100644
--- a/source/blender/editors/interface/interface_widgets.c
+++ b/source/blender/editors/interface/interface_widgets.c
@@ -24,7 +24,6 @@
*/
#include <limits.h>
-#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
@@ -1120,7 +1119,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
*/
-static struct uiWidgetStateColors wcol_state= {
+static struct uiWidgetStateColors wcol_state_colors= {
{115, 190, 76, 255},
{90, 166, 51, 255},
{240, 235, 100, 255},
@@ -1390,7 +1389,7 @@ void ui_widget_color_init(ThemeUI *tui)
tui->wcol_list_item= wcol_list_item;
tui->wcol_progress= wcol_progress;
- tui->wcol_state= wcol_state;
+ tui->wcol_state= wcol_state_colors;
}
/* ************ button callbacks, state ***************** */
@@ -2325,10 +2324,10 @@ static void widget_swatch(uiBut *but, uiWidgetColors *wcol, rcti *rect, int stat
ui_get_but_vectorf(but, col);
if(state & (UI_BUT_ANIMATED|UI_BUT_ANIMATED_KEY|UI_BUT_DRIVEN|UI_BUT_REDALERT)) {
- // draw based on state - colour for keyed etc
+ // draw based on state - color for keyed etc
widgetbase_draw(&wtb, wcol);
- // inset to draw swatch colour
+ // inset to draw swatch color
rect->xmin+= SWATCH_KEYED_BORDER;
rect->xmax-= SWATCH_KEYED_BORDER;
rect->ymin+= SWATCH_KEYED_BORDER;
@@ -2496,7 +2495,7 @@ static void widget_box(uiBut *but, uiWidgetColors *wcol, rcti *rect, int UNUSED(
VECCOPY(old_col, wcol->inner);
- /* abuse but->hsv - if it's non-zero, use this colour as the box's background */
+ /* abuse but->hsv - if it's non-zero, use this color as the box's background */
if (but->col[3]) {
wcol->inner[0] = but->col[0];
wcol->inner[1] = but->col[1];
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c
index b6fa0916443..2bc72d717c0 100644
--- a/source/blender/editors/interface/resources.c
+++ b/source/blender/editors/interface/resources.c
@@ -1182,7 +1182,7 @@ void init_userdef_do_versions(void)
if ((bmain->versionfile < 245) || (bmain->versionfile == 245 && bmain->subversionfile < 11)) {
bTheme *btheme;
for (btheme= U.themes.first; btheme; btheme= btheme->next) {
- /* these should all use the same colour */
+ /* these should all use the same color */
SETCOL(btheme->tv3d.cframe, 0x60, 0xc0, 0x40, 255);
SETCOL(btheme->tipo.cframe, 0x60, 0xc0, 0x40, 255);
SETCOL(btheme->tact.cframe, 0x60, 0xc0, 0x40, 255);
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index 6be2a018b71..af63b9cf37e 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -1167,7 +1167,7 @@ typedef struct v2dScrollerMove {
ARegion *ar; /* region that the scroller is in */
short scroller; /* scroller that mouse is in ('h' or 'v') */
- short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active colour?)
+ short zone; /* -1 is min zoomer, 0 is bar, 1 is max zoomer */ // XXX find some way to provide visual feedback of this (active color?)
float fac; /* view adjustment factor, based on size of region */
float delta; /* amount moved by mouse on axis of interest */
diff --git a/source/blender/editors/mesh/editmesh.c b/source/blender/editors/mesh/editmesh.c
index 424b3c5467f..99b3d4e64ab 100644
--- a/source/blender/editors/mesh/editmesh.c
+++ b/source/blender/editors/mesh/editmesh.c
@@ -918,9 +918,9 @@ void make_editMesh(Scene *scene, Object *ob)
}
/* makes Mesh out of editmesh */
-void load_editMesh(Scene *scene, Object *ob)
+void load_editMesh(Scene *scene, Object *obedit)
{
- Mesh *me= ob->data;
+ Mesh *me= obedit->data;
MVert *mvert, *oldverts;
MEdge *medge;
MFace *mface;
@@ -1110,7 +1110,7 @@ void load_editMesh(Scene *scene, Object *ob)
Object *ob;
ModifierData *md;
EditVert **vertMap = NULL;
- int i,j;
+ int j;
for (ob=G.main->object.first; ob; ob=ob->id.next) {
if (ob->parent==ob && ELEM(ob->partype, PARVERT1,PARVERT3)) {
@@ -1310,7 +1310,7 @@ void load_editMesh(Scene *scene, Object *ob)
mesh_calc_normals(me->mvert, me->totvert, me->mface, me->totface, NULL);
/* topology could be changed, ensure mdisps are ok */
- multires_topology_changed(ob);
+ multires_topology_changed(obedit);
}
void remake_editMesh(Scene *scene, Object *ob)
diff --git a/source/blender/editors/mesh/editmesh_loop.c b/source/blender/editors/mesh/editmesh_loop.c
index 2e095af9c03..70fcca097ef 100644
--- a/source/blender/editors/mesh/editmesh_loop.c
+++ b/source/blender/editors/mesh/editmesh_loop.c
@@ -70,9 +70,9 @@ editmesh_loop: tools with own drawing subloops, select, knife, subdiv
/* **** XXX ******** */
static void BIF_undo_push(const char *UNUSED(arg)) {}
-static void BIF_undo() {}
+static void BIF_undo(void) {}
static void error(const char *UNUSED(arg)) {}
-static int qtest() {return 0;}
+static int qtest(void) {return 0;}
/* **** XXX ******** */
diff --git a/source/blender/editors/mesh/editmesh_mods.c b/source/blender/editors/mesh/editmesh_mods.c
index c9934275f3f..af03df34d5c 100644
--- a/source/blender/editors/mesh/editmesh_mods.c
+++ b/source/blender/editors/mesh/editmesh_mods.c
@@ -35,12 +35,10 @@ editmesh_mods.c, UI level access, no geometry changes
#include <stdlib.h>
#include <string.h>
-#include <math.h>
#include "MEM_guardedalloc.h"
-
#include "DNA_material_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
@@ -139,14 +137,13 @@ void EM_automerge(Scene *scene, Object *obedit, int update)
(obedit && obedit->type==OB_MESH && (obedit->mode & OB_MODE_EDIT)) &&
(me->mr==NULL)
) {
- Mesh *me= (Mesh*)obedit->data;
EditMesh *em= me->edit_mesh;
len = removedoublesflag(em, 1, 1, scene->toolsettings->doublimit);
if (len) {
em->totvert -= len; /* saves doing a countall */
if (update) {
- DAG_id_flush_update(obedit->data, OB_RECALC_DATA);
+ DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
}
}
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 2a04859f462..8adf504b7fd 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3554,7 +3554,7 @@ static const EnumPropertyItem direction_items[]= {
#define AXIS_X 1
#define AXIS_Y 2
-static const EnumPropertyItem axis_items[]= {
+static const EnumPropertyItem axis_items_xy[]= {
{AXIS_X, "X", 0, "X", ""},
{AXIS_Y, "Y", 0, "Y", ""},
{0, NULL, 0, NULL, NULL}};
@@ -6701,7 +6701,7 @@ void MESH_OT_uvs_mirror(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
+ RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror UVs around.");
}
void MESH_OT_colors_rotate(wmOperatorType *ot)
@@ -6737,7 +6737,7 @@ void MESH_OT_colors_mirror(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* props */
- RNA_def_enum(ot->srna, "axis", axis_items, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
+ RNA_def_enum(ot->srna, "axis", axis_items_xy, DIRECTION_CW, "Axis", "Axis to mirror colors around.");
}
/********************** Subdivide Operator *************************/
@@ -7493,7 +7493,7 @@ void MESH_OT_select_axis(wmOperatorType *ot)
{-1, "ALIGNED", 0, "Aligned Axis", ""},
{0, NULL, 0, NULL, NULL}};
- static EnumPropertyItem axis_items[] = {
+ static EnumPropertyItem axis_items_xyz[] = {
{0, "X_AXIS", 0, "X Axis", ""},
{1, "Y_AXIS", 0, "Y Axis", ""},
{2, "Z_AXIS", 0, "Z Axis", ""},
@@ -7513,6 +7513,6 @@ void MESH_OT_select_axis(wmOperatorType *ot)
/* properties */
RNA_def_enum(ot->srna, "mode", axis_mode_items, 0, "Axis Mode", "Axis side to use when selecting");
- RNA_def_enum(ot->srna, "axis", axis_items, 0, "Axis", "Select the axis to compare each vertex on");
+ RNA_def_enum(ot->srna, "axis", axis_items_xyz, 0, "Axis", "Select the axis to compare each vertex on");
}
diff --git a/source/blender/editors/mesh/meshtools.c b/source/blender/editors/mesh/meshtools.c
index b7c4011c538..820e287e945 100644
--- a/source/blender/editors/mesh/meshtools.c
+++ b/source/blender/editors/mesh/meshtools.c
@@ -33,7 +33,6 @@
#include <stddef.h>
#include <stdlib.h>
-#include <string.h>
#include <math.h>
#include <float.h>
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index d9e0140c699..a077e9890b0 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -102,8 +102,8 @@ static void waitcursor(int UNUSED(val)) {}
static int pupmenu(const char *UNUSED(msg)) {return 0;}
/* port over here */
-static bContext *C;
-static void error_libdata() {}
+static bContext *evil_C;
+static void error_libdata(void) {}
/* find the correct active object per context
@@ -1078,13 +1078,13 @@ static void copymenu_modifiers(Main *bmain, Scene *scene, View3D *v3d, Object *o
for (base= FIRSTBASE; base; base= base->next) {
if(base->object != ob) {
if(TESTBASELIB(v3d, base)) {
- ModifierData *md;
base->object->recalc |= OB_RECALC_OB|OB_RECALC_DATA;
if (base->object->type==ob->type) {
/* copy all */
if (event==NUM_MODIFIER_TYPES) {
+ ModifierData *md;
object_free_modifiers(base->object);
for (md=ob->modifiers.first; md; md=md->next) {
@@ -1805,7 +1805,7 @@ void ofs_timeoffs(Scene *scene, View3D *v3d)
// XXX if(fbutton(&offset, -10000.0f, 10000.0f, 10, 10, "Offset")==0) return;
/* make array of all bases, xco yco (screen) */
- CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
+ CTX_DATA_BEGIN(evil_C, Object*, ob, selected_editable_objects) {
ob->sf += offset;
if (ob->sf < -MAXFRAMEF) ob->sf = -MAXFRAMEF;
else if (ob->sf > MAXFRAMEF) ob->sf = MAXFRAMEF;
@@ -1818,17 +1818,17 @@ void ofs_timeoffs(Scene *scene, View3D *v3d)
void rand_timeoffs(Scene *scene, View3D *v3d)
{
Base *base;
- float rand=0.0f;
+ float rand_ofs=0.0f;
if(BASACT==0 || v3d==NULL) return;
-// XXX if(fbutton(&rand, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return;
+// XXX if(fbutton(&rand_ofs, 0.0f, 10000.0f, 10, 10, "Randomize")==0) return;
- rand *= 2;
+ rand_ofs *= 2;
for(base= FIRSTBASE; base; base= base->next) {
if(TESTBASELIB(v3d, base)) {
- base->object->sf += (BLI_drand()-0.5) * rand;
+ base->object->sf += (BLI_drand()-0.5) * rand_ofs;
if (base->object->sf < -MAXFRAMEF) base->object->sf = -MAXFRAMEF;
else if (base->object->sf > MAXFRAMEF) base->object->sf = MAXFRAMEF;
}
diff --git a/source/blender/editors/object/object_lattice.c b/source/blender/editors/object/object_lattice.c
index 5c68917a83a..22d1a2f6b9d 100644
--- a/source/blender/editors/object/object_lattice.c
+++ b/source/blender/editors/object/object_lattice.c
@@ -155,7 +155,7 @@ void load_editLatt(Object *obedit)
}
if(editlt->dvert) {
- int tot= lt->pntsu*lt->pntsv*lt->pntsw;
+ tot= lt->pntsu*lt->pntsv*lt->pntsw;
lt->dvert = MEM_mallocN (sizeof (MDeformVert)*tot, "Lattice MDeformVert");
copy_dverts(lt->dvert, editlt->dvert, tot);
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index b131a358ae7..deda2ce0129 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -51,6 +51,7 @@
#include "BKE_property.h"
#include "BKE_report.h"
#include "BKE_scene.h"
+#include "BKE_library.h"
#include "BKE_deform.h"
#include "WM_api.h"
@@ -826,21 +827,26 @@ void OBJECT_OT_select_same_group(wmOperatorType *ot)
/**************************** Select Mirror ****************************/
static int object_select_mirror_exec(bContext *C, wmOperator *op)
{
+ Scene *scene= CTX_data_scene(C);
short extend;
extend= RNA_boolean_get(op->ptr, "extend");
CTX_DATA_BEGIN(C, Base*, primbase, selected_bases) {
-
char tmpname[32];
+
flip_side_name(tmpname, primbase->object->id.name+2, TRUE);
+
+ if(strcmp(tmpname, primbase->object->id.name+2)!=0) { /* names differ */
+ Object *ob= (Object *)find_id("OB", tmpname);
+ if(ob) {
+ Base *secbase= object_in_scene(ob, scene);
- CTX_DATA_BEGIN(C, Base*, secbase, visible_bases) {
- if(!strcmp(secbase->object->id.name+2, tmpname)) {
- ED_base_object_select(secbase, BA_SELECT);
+ if(secbase) {
+ ED_base_object_select(secbase, BA_SELECT);
+ }
}
}
- CTX_DATA_END;
if (extend == 0) ED_base_object_select(primbase, BA_DESELECT);
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 12370e5b1ac..cba64fe6325 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -3245,8 +3245,8 @@ static int brush_add(PEData *data, short number)
if(tree) {
ParticleData *ppa;
- HairKey *hkey;
- ParticleKey key[3];
+ HairKey *thkey;
+ ParticleKey key3[3];
KDTreeNearest ptn[3];
int w, maxw;
float maxd, mind, dd, totw=0.0, weight[3];
@@ -3272,36 +3272,36 @@ static int brush_add(PEData *data, short number)
ppa= psys->particles+ptn[0].index;
for(k=0; k<pset->totaddkey; k++) {
- hkey= (HairKey*)pa->hair + k;
- hkey->time= pa->time + k * framestep;
+ thkey= (HairKey*)pa->hair + k;
+ thkey->time= pa->time + k * framestep;
- key[0].time= hkey->time/ 100.0f;
- psys_get_particle_on_path(&sim, ptn[0].index, key, 0);
- mul_v3_fl(key[0].co, weight[0]);
+ key3[0].time= thkey->time/ 100.0f;
+ psys_get_particle_on_path(&sim, ptn[0].index, key3, 0);
+ mul_v3_fl(key3[0].co, weight[0]);
/* TODO: interpolatint the weight would be nicer */
- hkey->weight= (ppa->hair+MIN2(k, ppa->totkey-1))->weight;
+ thkey->weight= (ppa->hair+MIN2(k, ppa->totkey-1))->weight;
if(maxw>1) {
- key[1].time= key[0].time;
- psys_get_particle_on_path(&sim, ptn[1].index, key + 1, 0);
- mul_v3_fl(key[1].co, weight[1]);
- VECADD(key[0].co, key[0].co, key[1].co);
+ key3[1].time= key3[0].time;
+ psys_get_particle_on_path(&sim, ptn[1].index, &key3[1], 0);
+ mul_v3_fl(key3[1].co, weight[1]);
+ VECADD(key3[0].co, key3[0].co, key3[1].co);
if(maxw>2) {
- key[2].time= key[0].time;
- psys_get_particle_on_path(&sim, ptn[2].index, key + 2, 0);
- mul_v3_fl(key[2].co, weight[2]);
- VECADD(key[0].co, key[0].co, key[2].co);
+ key3[2].time= key3[0].time;
+ psys_get_particle_on_path(&sim, ptn[2].index, &key3[2], 0);
+ mul_v3_fl(key3[2].co, weight[2]);
+ VECADD(key3[0].co, key3[0].co, key3[2].co);
}
}
if(k==0)
- VECSUB(co1, pa->state.co, key[0].co);
+ VECSUB(co1, pa->state.co, key3[0].co);
- VECADD(hkey->co, key[0].co, co1);
+ VECADD(thkey->co, key3[0].co, co1);
- hkey->time= key[0].time;
+ thkey->time= key3[0].time;
}
}
else {
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index 824ff8b154d..5697154998b 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -94,7 +94,7 @@
#define PR_YMAX 195
/* XXX */
-static int qtest() {return 0;}
+static int qtest(void) {return 0;}
/* XXX */
ImBuf* get_brush_icon(Brush *brush)
@@ -487,12 +487,12 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
Render *re;
RenderResult rres;
char name[32];
- int gamma_correct=0;
+ int do_gamma_correct=0;
int offx=0, newx= rect->xmax-rect->xmin, newy= rect->ymax-rect->ymin;
if (id && GS(id->name) != ID_TE) {
/* exception: don't color manage texture previews - show the raw values */
- if (sce) gamma_correct = sce->r.color_mgt_flag & R_COLOR_MANAGEMENT;
+ if (sce) do_gamma_correct = sce->r.color_mgt_flag & R_COLOR_MANAGEMENT;
}
if(!split || first) sprintf(name, "Preview %p", (void *)sa);
@@ -518,7 +518,7 @@ static int ed_preview_draw_rect(ScrArea *sa, Scene *sce, ID *id, int split, int
newrect->xmax= MAX2(newrect->xmax, rect->xmin + rres.rectx + offx);
newrect->ymax= MAX2(newrect->ymax, rect->ymin + rres.recty);
- glaDrawPixelsSafe_to32(rect->xmin+offx, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, gamma_correct);
+ glaDrawPixelsSafe_to32(rect->xmin+offx, rect->ymin, rres.rectx, rres.recty, rres.rectx, rres.rectf, do_gamma_correct);
RE_ReleaseResultImage(re);
return 1;
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 16bdaae2bf5..41aace4e0a7 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -735,12 +735,12 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
static int texture_slot_move(bContext *C, wmOperator *op)
{
ID *id= CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
- Material *ma = (Material *)id;
if(id) {
MTex **mtex_ar, *mtexswap;
short act;
int type= RNA_enum_get(op->ptr, "type");
+ struct AnimData *adt= BKE_animdata_from_id(id);
give_active_mtex(id, &mtex_ar, &act);
@@ -750,9 +750,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
mtex_ar[act] = mtex_ar[act-1];
mtex_ar[act-1] = mtexswap;
- BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act-1, -1, 0);
- BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act-1, 0);
- BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act-1, -1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act-1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
if(GS(id->name)==ID_MA) {
Material *ma= (Material *)id;
@@ -772,9 +772,9 @@ static int texture_slot_move(bContext *C, wmOperator *op)
mtex_ar[act] = mtex_ar[act+1];
mtex_ar[act+1] = mtexswap;
- BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act+1, -1, 0);
- BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, act, act+1, 0);
- BKE_animdata_fix_paths_rename(id, ma->adt, "texture_slots", NULL, NULL, -1, act, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act+1, -1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, act, act+1, 0);
+ BKE_animdata_fix_paths_rename(id, adt, "texture_slots", NULL, NULL, -1, act, 0);
if(GS(id->name)==ID_MA) {
Material *ma= (Material *)id;
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index a6c4c77e468..6a9fc1489f1 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -26,7 +26,6 @@
*/
#include <stdio.h>
-#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
@@ -528,7 +527,7 @@ void glaDrawPixelsTex(float x, float y, int img_w, int img_h, int format, void *
}
/* row_w is unused but kept for completeness */
-void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int gamma_correct)
+void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED(row_w), float *rectf, int do_gamma_correct)
{
unsigned char *rect32;
@@ -537,7 +536,7 @@ void glaDrawPixelsSafe_to32(float fx, float fy, int img_w, int img_h, int UNUSED
rect32= MEM_mallocN(img_w*img_h*sizeof(int), "temp 32 bits");
- if (gamma_correct) {
+ if (do_gamma_correct) {
floatbuf_to_srgb_byte(rectf, rect32, 0, img_w, 0, img_h, img_w);
} else {
floatbuf_to_byte(rectf, rect32, 0, img_w, 0, img_h, img_w);
@@ -767,13 +766,13 @@ void bglBegin(int mode)
int bglPointHack() {
float value[4];
- int pointhack;
+ int pointhack_px;
glGetFloatv(GL_POINT_SIZE_RANGE, value);
if(value[1]<2.0) {
glGetFloatv(GL_POINT_SIZE, value);
- pointhack= floor(value[0]+0.5);
- if(pointhack>4) pointhack= 4;
- return pointhack;
+ pointhack_px= floor(value[0]+0.5);
+ if(pointhack_px>4) pointhack_px= 4;
+ return pointhack_px;
}
return 0;
}
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index bd4bae23c7d..68a73e77a38 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -3964,7 +3964,7 @@ static int project_paint_stroke(ProjPaintState *ps, BrushPainter *painter, int *
/* Imagepaint Partial Redraw & Dirty Region */
-static void imapaint_clear_partial_redraw()
+static void imapaint_clear_partial_redraw(void)
{
memset(&imapaintpartial, 0, sizeof(imapaintpartial));
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index ac563621f30..89f44199914 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -451,7 +451,7 @@ void wpaint_fill(VPaint *wp, Object *ob, float paintweight)
DAG_id_flush_update(&me->id, OB_RECALC_DATA);
}
-/* XXX: should be re-implemented as a vertex/weight paint 'colour correct' operator
+/* XXX: should be re-implemented as a vertex/weight paint 'color correct' operator
void vpaint_dogamma(Scene *scene)
{
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 73ca3bad5c2..d15dd7902bf 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -3666,7 +3666,7 @@ static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-void ED_operatortypes_sculpt()
+void ED_operatortypes_sculpt(void)
{
WM_operatortype_append(SCULPT_OT_radial_control);
WM_operatortype_append(SCULPT_OT_brush_stroke);
diff --git a/source/blender/editors/space_action/action_draw.c b/source/blender/editors/space_action/action_draw.c
index ce9a96af38c..c1a5453abfe 100644
--- a/source/blender/editors/space_action/action_draw.c
+++ b/source/blender/editors/space_action/action_draw.c
@@ -228,7 +228,7 @@ void draw_channel_strips(bAnimContext *ac, SpaceAction *saction, ARegion *ar)
switch (ale->type) {
case ANIMTYPE_SUMMARY:
{
- // FIXME: hardcoded colours - reddish color from NLA
+ // FIXME: hardcoded colors - reddish color from NLA
glColor4f(0.8f, 0.2f, 0.0f, 0.4f);
}
break;
diff --git a/source/blender/editors/space_console/console_draw.c b/source/blender/editors/space_console/console_draw.c
index f26bc63f01d..d4d1429530c 100644
--- a/source/blender/editors/space_console/console_draw.c
+++ b/source/blender/editors/space_console/console_draw.c
@@ -146,7 +146,7 @@ static int console_textview_line_get(struct TextViewContext *tvc, const char **l
static int console_textview_line_color(struct TextViewContext *tvc, unsigned char fg[3], unsigned char UNUSED(bg[3]))
{
- ConsoleLine *cl= (ConsoleLine *)tvc->iter;
+ ConsoleLine *cl_iter= (ConsoleLine *)tvc->iter;
/* annoying hack, to draw the prompt */
if(tvc->iter_index == 0) {
@@ -181,7 +181,7 @@ static int console_textview_line_color(struct TextViewContext *tvc, unsigned cha
);
}
- console_line_color(fg, cl->type);
+ console_line_color(fg, cl_iter->type);
return TVC_LINE_FG;
}
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index e8c7cc6c926..405c965ecce 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -365,7 +365,7 @@ static int insert_exec(bContext *C, wmOperator *op)
// XXX, alligned tab key hack
if(str[0]=='\t' && str[1]=='\0') {
- int len= TAB_LENGTH - (ci->cursor % TAB_LENGTH);
+ len= TAB_LENGTH - (ci->cursor % TAB_LENGTH);
MEM_freeN(str);
str= MEM_mallocN(len + 1, "insert_exec");
memset(str, ' ', len);
@@ -380,7 +380,6 @@ static int insert_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else {
- SpaceConsole *sc= CTX_wm_space_console(C);
console_select_offset(sc, len);
}
@@ -468,7 +467,6 @@ static int delete_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
else {
- SpaceConsole *sc= CTX_wm_space_console(C);
console_select_offset(sc, -1);
}
@@ -616,7 +614,6 @@ static int history_append_exec(bContext *C, wmOperator *op)
int prev_len= ci->len;
if(rem_dupes) {
- SpaceConsole *sc= CTX_wm_space_console(C);
ConsoleLine *cl;
while((cl= console_history_find(sc, ci->line, ci)))
diff --git a/source/blender/editors/space_file/file_intern.h b/source/blender/editors/space_file/file_intern.h
index fc7ab289683..692953a18a3 100644
--- a/source/blender/editors/space_file/file_intern.h
+++ b/source/blender/editors/space_file/file_intern.h
@@ -96,7 +96,7 @@ void file_operator_to_sfile(struct SpaceFile *sfile, struct wmOperator *op);
float file_shorten_string(char* string, float w, int front);
float file_string_width(const char* str);
-float file_font_pointsize();
+float file_font_pointsize(void);
void file_change_dir(bContext *C, int checkdir);
int file_select_match(struct SpaceFile *sfile, const char *pattern);
void autocomplete_directory(struct bContext *C, char *str, void *arg_v);
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index 9dd7ab26625..eb1c46d652e 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -47,8 +47,8 @@ struct rcti;
struct ReportList;
struct FileList * filelist_new(short type);
-void filelist_init_icons();
-void filelist_free_icons();
+void filelist_init_icons(void);
+void filelist_free_icons(void);
int filelist_find(struct FileList* filelist, char *file);
void filelist_free(struct FileList* filelist);
void filelist_sort(struct FileList* filelist, short sort);
@@ -78,7 +78,7 @@ void filelist_from_library(struct FileList* filelist);
void filelist_freelib(struct FileList* filelist);
void filelist_hideparent(struct FileList* filelist, short hide);
-struct ListBase * folderlist_new();
+struct ListBase * folderlist_new(void);
void folderlist_free(struct ListBase* folderlist);
struct ListBase * folderlist_duplicate(ListBase* folderlist);
void folderlist_popdir(struct ListBase* folderlist, char *dir);
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index dd3672b656a..4d180d90992 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -620,7 +620,6 @@ static void graph_panel_drivers(const bContext *C, Panel *pa)
/* value of variable */
if (driver->flag & DRIVER_FLAG_SHOWDEBUG) {
- uiLayout *row;
char valBuf[32];
box= uiLayoutBox(col);
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 1f92f32cc88..d875aaafd33 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -70,7 +70,7 @@
*/
#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.25f )
-/* set the colour for some point from some value given packed into an int
+/* set the color for some point from some value given packed into an int
* - intV: integer value containing color info packed into an int
* - alpha: float value describing the
*/
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index cac56d76831..970be9feab6 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -484,7 +484,7 @@ static void image_panel_preview(ScrArea *sa, short cntrl) // IMAGE_HANDLER_PREVI
/* ********************* callbacks for standard image buttons *************** */
-static char *slot_menu()
+static char *slot_menu(void)
{
char *str;
int a, slot;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index be917f43735..dab486949ea 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -1628,16 +1628,16 @@ static void sample_apply(bContext *C, wmOperator *op, wmEvent *event)
ImBuf *ibuf= ED_space_image_acquire_buffer(sima, &lock);
ImageSampleInfo *info= op->customdata;
float fx, fy;
- int x, y;
+ int mx, my;
if(ibuf == NULL) {
ED_space_image_release_buffer(sima, lock);
return;
}
- x= event->x - ar->winrct.xmin;
- y= event->y - ar->winrct.ymin;
- UI_view2d_region_to_view(&ar->v2d, x, y, &fx, &fy);
+ mx= event->x - ar->winrct.xmin;
+ my= event->y - ar->winrct.ymin;
+ UI_view2d_region_to_view(&ar->v2d, mx, my, &fx, &fy);
if(fx>=0.0 && fy>=0.0 && fx<1.0 && fy<1.0) {
float *fp;
diff --git a/source/blender/editors/space_info/info_ops.c b/source/blender/editors/space_info/info_ops.c
index 6ffbf1455e4..b4a63d344ec 100644
--- a/source/blender/editors/space_info/info_ops.c
+++ b/source/blender/editors/space_info/info_ops.c
@@ -349,7 +349,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
}
if (rti->widthfac == 0.0) {
- /* initialise colours based on report type */
+ /* initialise colors based on report type */
if(report->type & RPT_ERROR_ALL) {
rti->col[0] = 1.0;
rti->col[1] = 0.2;
@@ -374,7 +374,7 @@ static int update_reports_display_invoke(bContext *C, wmOperator *UNUSED(op), wm
if(color_progress <= 1.0f) {
send_note= 1;
- /* fade colours out sharply according to progress through fade-out duration */
+ /* fade colors out sharply according to progress through fade-out duration */
interp_v3_v3v3(rti->col, rti->col, neutral_col, color_progress);
rti->greyscale = interpf(neutral_grey, rti->greyscale, color_progress);
}
diff --git a/source/blender/editors/space_info/space_info.c b/source/blender/editors/space_info/space_info.c
index 95c1614ffd5..ba417f0e97d 100644
--- a/source/blender/editors/space_info/space_info.c
+++ b/source/blender/editors/space_info/space_info.c
@@ -277,7 +277,7 @@ static void recent_files_menu_draw(const bContext *UNUSED(C), Menu *menu)
}
}
-void recent_files_menu_register()
+void recent_files_menu_register(void)
{
MenuType *mt;
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c
index 739b3b43360..e6ed3f6ec1f 100644
--- a/source/blender/editors/space_logic/logic_window.c
+++ b/source/blender/editors/space_logic/logic_window.c
@@ -2206,7 +2206,6 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
eoa= act->data;
if(eoa->type==ACT_EDOB_ADD_OBJECT) {
- int wval; /* just a temp width */
ysize = 92;
glRects(xco, yco-ysize, xco+width, yco);
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
diff --git a/source/blender/editors/space_nla/nla_draw.c b/source/blender/editors/space_nla/nla_draw.c
index 98550b7e452..d5a007fd506 100644
--- a/source/blender/editors/space_nla/nla_draw.c
+++ b/source/blender/editors/space_nla/nla_draw.c
@@ -171,7 +171,7 @@ static void nla_strip_get_color_inside (AnimData *adt, NlaStrip *strip, float co
}
else if (strip->type == NLASTRIP_TYPE_META) {
/* Meta Clip */
- // TODO: should temporary metas get different colours too?
+ // TODO: should temporary metas get different colors too?
if (strip->flag & NLASTRIP_FLAG_SELECT) {
/* selected - use a bold purple color */
// FIXME: hardcoded temp-hack colors
@@ -272,7 +272,7 @@ static void nla_draw_strip_curves (NlaStrip *strip, float yminc, float ymaxc)
}
/* time -------------------------- */
- // XXX do we want to draw this curve? in a different colour too?
+ // XXX do we want to draw this curve? in a different color too?
/* turn off AA'd lines */
glDisable(GL_LINE_SMOOTH);
@@ -431,7 +431,7 @@ static void nla_draw_strip_text (NlaTrack *UNUSED(nlt), NlaStrip *strip, int UNU
else
sprintf(str, "%s | %.2f %s %.2f", strip->name, strip->start, dir, strip->end);
- /* set text colour - if colours (see above) are light, draw black text, otherwise draw white */
+ /* set text color - if colors (see above) are light, draw black text, otherwise draw white */
if (strip->flag & (NLASTRIP_FLAG_ACTIVE|NLASTRIP_FLAG_SELECT|NLASTRIP_FLAG_TWEAKUSER))
glColor3f(0.0f, 0.0f, 0.0f);
else
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 38a29a18713..f9c5661b51d 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -340,7 +340,7 @@ static int treesort_alpha(const void *v1, const void *v2)
if(comp==1) return 1;
else if(comp==2) return -1;
else if(comp==3) {
- int comp= strcmp(x1->name, x2->name);
+ comp= strcmp(x1->name, x2->name);
if( comp>0 ) return 1;
else if( comp<0) return -1;
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 6b4ae406b2b..49d7e6a2f33 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -513,7 +513,7 @@ static void draw_seq_text(View2D *v2d, Sequence *seq, float x1, float x2, float
if(seq->flag & SELECT){
cpack(0xFFFFFF);
}else if ((((int)background_col[0] + (int)background_col[1] + (int)background_col[2]) / 3) < 50){
- cpack(0x505050); /* use lighter text colour for dark background */
+ cpack(0x505050); /* use lighter text color for dark background */
}else{
cpack(0);
}
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index 8b5580cf0c2..9cc98556cba 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -923,12 +923,12 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe
Sequence * (*cut_seq)(Scene *, Sequence *, int))
{
int did_something = FALSE;
- Sequence *seq, *seq_next;
+ Sequence *seq, *seq_next_iter;
seq= old->first;
while(seq) {
- seq_next = seq->next; /* we need this because we may remove seq */
+ seq_next_iter = seq->next; /* we need this because we may remove seq */
seq->tmp= NULL;
if(seq->flag & SELECT) {
@@ -947,7 +947,7 @@ static int cut_seq_list(Scene *scene, ListBase *old, ListBase *new, int cutframe
BLI_addtail(new, seq);
}
}
- seq = seq_next;
+ seq = seq_next_iter;
}
return did_something;
}
@@ -1781,7 +1781,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
Scene *scene= CTX_data_scene(C);
Editing *ed= seq_give_editing(scene, FALSE);
- Sequence *seq, *seq_new, *seq_next;
+ Sequence *seq, *seq_new, *seq_next_iter;
Strip *strip_new;
StripElem *se, *se_new;
int start_ofs, cfra, frame_end;
@@ -1793,7 +1793,7 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op)
if((seq->flag & SELECT) && (seq->type == SEQ_IMAGE) && (seq->len > 1)) {
/* remove seq so overlap tests dont conflict,
see seq_free_sequence below for the real free'ing */
- seq_next = seq->next;
+ seq_next_iter = seq->next;
BLI_remlink(ed->seqbasep, seq);
/* if(seq->ipo) seq->ipo->id.us--; */
/* XXX, remove fcurve and assign to split image strips */
diff --git a/source/blender/editors/space_sequencer/sequencer_select.c b/source/blender/editors/space_sequencer/sequencer_select.c
index 720aa098ff6..a2eefe6ee54 100644
--- a/source/blender/editors/space_sequencer/sequencer_select.c
+++ b/source/blender/editors/space_sequencer/sequencer_select.c
@@ -363,16 +363,16 @@ static int sequencer_select_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
SpaceSeq *sseq= CTX_wm_space_seq(C);
if (sseq && sseq->flag & SEQ_MARKER_TRANS) {
- TimeMarker *marker;
+ TimeMarker *tmarker;
- for (marker= scene->markers.first; marker; marker= marker->next) {
- if( ((x < CFRA) && marker->frame < CFRA) ||
- ((x >= CFRA) && marker->frame >= CFRA)
+ for (tmarker= scene->markers.first; tmarker; tmarker= tmarker->next) {
+ if( ((x < CFRA) && tmarker->frame < CFRA) ||
+ ((x >= CFRA) && tmarker->frame >= CFRA)
) {
- marker->flag |= SELECT;
+ tmarker->flag |= SELECT;
}
else {
- marker->flag &= ~SELECT;
+ tmarker->flag &= ~SELECT;
}
}
}
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index 3b0d8bb7a29..c5037d1226f 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -1418,7 +1418,7 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar)
UI_ThemeColor(TH_SHADE2);
glRecti(x+16, y-3, x+16+w, y+st->lheight-3);
}
- b=1; /* b=1 colour block, text is default. b=0 no block, colour text */
+ b=1; /* b=1 color block, text is default. b=0 no block, color text */
switch (item->type) {
case 'k': UI_ThemeColor(TH_SYNTAX_B); b=0; break;
case 'm': UI_ThemeColor(TH_TEXT); break;
@@ -1442,10 +1442,11 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
{
Text *text= st->text;
int vcurl, vcurc, vsell, vselc, hidden=0;
- int offl, offc, x, y, w, i;
+ int x, y, w, i;
/* Draw the selection */
if(text->curl!=text->sell || text->curc!=text->selc) {
+ int offl, offc;
/* Convert all to view space character coordinates */
wrap_offset(st, ar, text->curl, text->curc, &offl, &offc);
vcurl = txt_get_span(text->lines.first, text->curl) - st->top + offl;
@@ -1489,6 +1490,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar)
}
}
else {
+ int offl, offc;
wrap_offset(st, ar, text->sell, text->selc, &offl, &offc);
vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl;
vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc;
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index c229e685aba..3bfc1aa12da 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -99,7 +99,7 @@ void text_free_caches(struct SpaceText *st);
int text_file_modified(struct Text *text);
int text_do_suggest_select(struct SpaceText *st, struct ARegion *ar);
-void text_pop_suggest_list();
+void text_pop_suggest_list(void);
int text_get_visible_lines(struct SpaceText *st, struct ARegion *ar, char *str);
int text_get_span_wrap(struct SpaceText *st, struct ARegion *ar, struct TextLine *from, struct TextLine *to);
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index 720e80ec162..1c75e6f65ca 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -388,7 +388,7 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val)
/* Find the next temporary marker */
if(evnt==TABKEY) {
int lineno= txt_get_span(text->lines.first, text->curl);
- TextMarker *mrk= text->markers.first;
+ mrk= text->markers.first;
while(mrk) {
if(!marker && (mrk->flags & TMARK_TEMP)) marker= mrk;
if((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno==lineno && mrk->end > text->curc))) {
diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c
index e65751e1f9d..52a2cd24254 100644
--- a/source/blender/editors/space_view3d/drawarmature.c
+++ b/source/blender/editors/space_view3d/drawarmature.c
@@ -427,7 +427,7 @@ static void draw_bonevert_solid(void)
glCallList(displist);
}
-static void draw_bone_octahedral()
+static void draw_bone_octahedral(void)
{
static GLuint displist=0;
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 0fb7ff8ec38..67372821631 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -383,7 +383,7 @@ static void draw_textured_begin(Scene *scene, View3D *v3d, RegionView3D *rv3d, O
glShadeModel(GL_SMOOTH);
}
-static void draw_textured_end()
+static void draw_textured_end(void)
{
/* switch off textures */
GPU_set_tpage(NULL, 0);
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index a55e054c457..65b621b1d7a 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -413,9 +413,6 @@ void drawaxes(float size, char drawtype)
case OB_PLAINAXES:
for (axis=0; axis<3; axis++) {
- float v1[3]= {0.0, 0.0, 0.0};
- float v2[3]= {0.0, 0.0, 0.0};
-
glBegin(GL_LINES);
v1[axis]= size;
@@ -478,8 +475,6 @@ void drawaxes(float size, char drawtype)
case OB_ARROWS:
default:
for (axis=0; axis<3; axis++) {
- float v1[3]= {0.0, 0.0, 0.0};
- float v2[3]= {0.0, 0.0, 0.0};
int arrow_axis= (axis==0)?1:0;
glBegin(GL_LINES);
@@ -6278,10 +6273,10 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag)
if (list) {
bConstraint *curcon;
bConstraintOb *cob;
- char col[4], col2[4];
+ char col1[4], col2[4];
- UI_GetThemeColor3ubv(TH_GRID, col);
- UI_make_axis_color(col, col2, 'z');
+ UI_GetThemeColor3ubv(TH_GRID, col1);
+ UI_make_axis_color(col1, col2, 'z');
glColor3ubv((GLubyte *)col2);
cob= constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 96329ac5d68..267fcb637d0 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -824,7 +824,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
sprintf(info, "(%d) %s", CFRA, ob->id.name+2);
}
- /* colour depends on whether there is a keyframe */
+ /* color depends on whether there is a keyframe */
if (id_frame_has_keyframe((ID *)ob, /*BKE_curframe(scene)*/(float)(CFRA), v3d->keyflags))
UI_ThemeColor(TH_VERTEX_SELECT);
else
@@ -837,7 +837,7 @@ static void draw_selected_name(Scene *scene, Object *ob, View3D *v3d)
else
sprintf(info, "(%d)", CFRA);
- /* colour is always white */
+ /* color is always white */
UI_ThemeColor(TH_TEXT_HI);
}
@@ -2425,13 +2425,13 @@ void view3d_main_area_draw(const bContext *C, ARegion *ar)
}
if(v3d->lay_used != lay_used) { /* happens when loading old files or loading with UI load */
- ARegion *ar;
+ ARegion *ar_iter;
ScrArea *sa= CTX_wm_area(C);
/* find header and force tag redraw */
- for(ar= sa->regionbase.first; ar; ar= ar->next)
- if(ar->regiontype==RGN_TYPE_HEADER) {
- ED_region_tag_redraw(ar);
+ for(ar_iter= sa->regionbase.first; ar_iter; ar_iter= ar_iter->next)
+ if(ar_iter->regiontype==RGN_TYPE_HEADER) {
+ ED_region_tag_redraw(ar_iter);
break;
}
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 5a7616bb2ec..55675f8a64d 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -81,9 +81,6 @@
#define TEST_EDITMESH if(obedit==0) return; \
if( (v3d->lay & obedit->lay)==0 ) return;
-/* XXX port over */
-extern void borderselect();
-
/* view3d handler codes */
#define VIEW3D_HANDLER_BACKGROUND 1
#define VIEW3D_HANDLER_PROPERTIES 2
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 2159aef0695..a3289c4cdc0 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -365,11 +365,8 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, short mcords[][2],
}
}
- {
- bArmature *arm= ob->data;
- if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) {
- arm->act_bone= NULL;
- }
+ if(arm->act_bone && (arm->act_bone->flag & BONE_SELECTED)==0) {
+ arm->act_bone= NULL;
}
}
diff --git a/source/blender/editors/space_view3d/view3d_snap.c b/source/blender/editors/space_view3d/view3d_snap.c
index 9f6054a5d4f..5bedcfd793f 100644
--- a/source/blender/editors/space_view3d/view3d_snap.c
+++ b/source/blender/editors/space_view3d/view3d_snap.c
@@ -783,16 +783,16 @@ static int snap_curs_to_sel(bContext *C, wmOperator *UNUSED(op))
transvmain= NULL;
}
else {
- Object *ob= CTX_data_active_object(C);
+ Object *obact= CTX_data_active_object(C);
- if(ob && (ob->mode & OB_MODE_POSE)) {
- bArmature *arm= ob->data;
+ if(obact && (obact->mode & OB_MODE_POSE)) {
+ bArmature *arm= obact->data;
bPoseChannel *pchan;
- for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) {
+ for (pchan = obact->pose->chanbase.first; pchan; pchan=pchan->next) {
if(arm->layer & pchan->bone->layer) {
if(pchan->bone->flag & BONE_SELECTED) {
VECCOPY(vec, pchan->pose_head);
- mul_m4_v3(ob->obmat, vec);
+ mul_m4_v3(obact->obmat, vec);
add_v3_v3(centroid, vec);
DO_MINMAX(vec, min, max);
count++;
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index ccadf9704b7..c47d49de99f 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -4542,7 +4542,7 @@ static int createSlideVerts(TransInfo *t)
sv = BLI_ghash_lookup(vertgh, ev);
if(sv) {
- float co[3], co2[3], vec[3];
+ float co[3], co2[3], tvec[3];
ev = (EditVert*)look->link;
@@ -4559,12 +4559,12 @@ static int createSlideVerts(TransInfo *t)
}
if (ev == tempsv->up->v1) {
- sub_v3_v3v3(vec, co, co2);
+ sub_v3_v3v3(tvec, co, co2);
} else {
- sub_v3_v3v3(vec, co2, co);
+ sub_v3_v3v3(tvec, co2, co);
}
- add_v3_v3(start, vec);
+ add_v3_v3(start, tvec);
if (v3d) {
view3d_project_float(t->ar, tempsv->down->v1->co, co, projectMat);
@@ -4572,12 +4572,12 @@ static int createSlideVerts(TransInfo *t)
}
if (ev == tempsv->down->v1) {
- sub_v3_v3v3(vec, co2, co);
+ sub_v3_v3v3(tvec, co2, co);
} else {
- sub_v3_v3v3(vec, co, co2);
+ sub_v3_v3v3(tvec, co, co2);
}
- add_v3_v3(end, vec);
+ add_v3_v3(end, tvec);
totvec += 1.0f;
nearest = (EditVert*)look->link;
@@ -5853,7 +5853,7 @@ void BIF_TransformSetUndo(char *UNUSED(str))
}
-void NDofTransform()
+void NDofTransform(void)
{
#if 0 // TRANSFORM_FIX_ME
float fval[7];
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 305a9331d1d..1f05f8bb668 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -446,7 +446,7 @@ static short apply_targetless_ik(Object *ob)
/* apply and decompose, doesn't work for constraints or non-uniform scale well */
{
- float rmat3[3][3], qrmat[3][3], imat[3][3], smat[3][3];
+ float rmat3[3][3], qrmat[3][3], imat3[3][3], smat[3][3];
copy_m3_m4(rmat3, rmat);
@@ -473,8 +473,8 @@ static short apply_targetless_ik(Object *ob)
else
quat_to_mat3( qrmat,parchan->quat);
- invert_m3_m3(imat, qrmat);
- mul_m3_m3m3(smat, rmat3, imat);
+ invert_m3_m3(imat3, qrmat);
+ mul_m3_m3m3(smat, rmat3, imat3);
mat3_to_size( parchan->size,smat);
}
@@ -5051,10 +5051,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
for (i = 0; i < t->total; i++) {
TransData *td = t->data + i;
- Object *ob = td->ob;
ListBase pidlist;
PTCacheID *pid;
-
+ ob = td->ob;
+
if (td->flag & TD_NOACTION)
break;
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 9e37f289351..21ec46de6af 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -321,8 +321,7 @@ static int fcu_test_selected(FCurve *fcu)
/* called for updating while transform acts, once per redraw */
void recalcData(TransInfo *t)
{
- Scene *scene = t->scene;
- Base *base = scene->basact;
+ Base *base = t->scene->basact;
if (t->spacetype==SPACE_NODE) {
flushTransNodes(t);
@@ -785,9 +784,9 @@ void recalcData(TransInfo *t)
DAG_id_flush_update(&ob->id, OB_RECALC_DATA); /* sets recalc flags */
}
else
- where_is_pose(scene, ob);
+ where_is_pose(t->scene, ob);
}
- else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(scene, base->object)) {
+ else if(base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, base->object)) {
if(t->state != TRANS_CANCEL) {
applyProject(t);
}
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index 25d19f18d34..ce8a484eb88 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -793,7 +793,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
GLUquadricObj *qobj;
double plane[4];
float matt[4][4];
- float size, vec[3], unitmat[4][4];
+ float size, unitmat[4][4];
float cywid= 0.33f*0.01f*(float)U.tw_handlesize;
float cusize= cywid*0.65f;
int arcs= (G.rt!=2);
@@ -814,8 +814,7 @@ static void draw_manipulator_rotate(View3D *v3d, RegionView3D *rv3d, int moving,
gluQuadricDrawStyle(qobj, GLU_FILL);
/* prepare for screen aligned draw */
- VECCOPY(vec, rv3d->twmat[0]);
- size= normalize_v3(vec);
+ size= len_v3(rv3d->twmat[0]);
glPushMatrix();
glTranslatef(rv3d->twmat[3][0], rv3d->twmat[3][1], rv3d->twmat[3][2]);
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index dcfad455575..de6c56246a0 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -316,28 +316,24 @@ void BIF_removeTransformOrientation(bContext *C, TransformOrientation *target) {
void BIF_removeTransformOrientationIndex(bContext *C, int index) {
ListBase *transform_spaces = &CTX_data_scene(C)->transform_spaces;
- TransformOrientation *ts = transform_spaces->first;
- int i;
-
- for (i = 0, ts = transform_spaces->first; ts; ts = ts->next, i++) {
- if (i == index) {
- View3D *v3d = CTX_wm_view3d(C);
- if(v3d) {
- int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
-
- // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
- if (selected_index == i) {
- v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
- }
- else if (selected_index > i) {
- v3d->twmode--;
- }
-
- }
+ TransformOrientation *ts= BLI_findlink(transform_spaces, index);
- BLI_freelinkN(transform_spaces, ts);
- break;
+ if (ts) {
+ View3D *v3d = CTX_wm_view3d(C);
+ if(v3d) {
+ int selected_index = (v3d->twmode - V3D_MANIP_CUSTOM);
+
+ // Transform_fix_me NEED TO DO THIS FOR ALL VIEW3D
+ if (selected_index == index) {
+ v3d->twmode = V3D_MANIP_GLOBAL; /* fallback to global */
+ }
+ else if (selected_index > index) {
+ v3d->twmode--;
+ }
+
}
+
+ BLI_freelinkN(transform_spaces, ts);
}
}
@@ -809,14 +805,14 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
{
if (ebone->flag & BONE_SELECTED)
{
- float mat[3][3];
+ float tmat[3][3];
float vec[3];
sub_v3_v3v3(vec, ebone->tail, ebone->head);
normalize_v3(vec);
add_v3_v3(normal, vec);
- vec_roll_to_mat3(vec, ebone->roll, mat);
- add_v3_v3(plane, mat[2]);
+ vec_roll_to_mat3(vec, ebone->roll, tmat);
+ add_v3_v3(plane, tmat[2]);
}
}
}
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index 6128c62f670..f2beb5b1053 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -706,7 +706,7 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
ListBase depth_peels;
DepthPeel *p1, *p2;
float *last_p = NULL;
- float dist = FLT_MAX;
+ float max_dist = FLT_MAX;
float p[3] = {0.0f, 0.0f, 0.0f};
depth_peels.first = depth_peels.last = NULL;
@@ -770,21 +770,21 @@ void CalcSnapGeometry(TransInfo *t, float *UNUSED(vec))
if (last_p == NULL)
{
VECCOPY(p, vec);
- dist = 0;
+ max_dist = 0;
break;
}
new_dist = len_v3v3(last_p, vec);
- if (new_dist < dist)
+ if (new_dist < max_dist)
{
VECCOPY(p, vec);
- dist = new_dist;
+ max_dist = new_dist;
}
}
}
- if (dist != FLT_MAX)
+ if (max_dist != FLT_MAX)
{
VECCOPY(loc, p);
/* XXX, is there a correct normal in this case ???, for now just z up */
@@ -1814,25 +1814,25 @@ int peelObjects(Scene *scene, View3D *v3d, ARegion *ar, Object *obedit, ListBase
for(dupli_ob = lb->first; dupli_ob; dupli_ob = dupli_ob->next)
{
- Object *ob = dupli_ob->ob;
+ Object *dob = dupli_ob->ob;
- if (ob->type == OB_MESH) {
+ if (dob->type == OB_MESH) {
EditMesh *em;
DerivedMesh *dm = NULL;
int val;
- if (ob != obedit)
+ if (dob != obedit)
{
- dm = mesh_get_derived_final(scene, ob, CD_MASK_BAREMESH);
+ dm = mesh_get_derived_final(scene, dob, CD_MASK_BAREMESH);
- val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+ val = peelDerivedMesh(dob, dm, dob->obmat, ray_start, ray_normal, mval, depth_peels);
}
else
{
- em = ((Mesh *)ob->data)->edit_mesh;
+ em = ((Mesh *)dob->data)->edit_mesh;
dm = editmesh_get_derived_cage(scene, obedit, em, CD_MASK_BAREMESH);
- val = peelDerivedMesh(ob, dm, ob->obmat, ray_start, ray_normal, mval, depth_peels);
+ val = peelDerivedMesh(dob, dm, dob->obmat, ray_start, ray_normal, mval, depth_peels);
}
retval = retval || val;
diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h
index 0fa54c64d95..147ea430b3b 100644
--- a/source/blender/editors/uvedit/uvedit_parametrizer.h
+++ b/source/blender/editors/uvedit/uvedit_parametrizer.h
@@ -26,7 +26,7 @@ typedef enum ParamBool {
- output will be written to the uv pointers
*/
-ParamHandle *param_construct_begin();
+ParamHandle *param_construct_begin(void);
void param_aspect_ratio(ParamHandle *handle, float aspx, float aspy);
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index e5e46d407c9..f4a6d6ed3e5 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -143,8 +143,8 @@ ParamHandle *construct_param_handle(Scene *scene, EditMesh *em, short implicit,
efa = EM_get_actFace(em, 1);
if(efa) {
- MTFace *tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
float aspx, aspy;
+ tf= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE);
ED_image_uv_aspect(tf->tpage, &aspx, &aspy);