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:
authorTon Roosendaal <ton@blender.org>2009-07-09 19:40:04 +0400
committerTon Roosendaal <ton@blender.org>2009-07-09 19:40:04 +0400
commit5e659c0b0895e07351bd2b2425deea342141e515 (patch)
tree7e6bd849591c0eb75fdefe37c061519806edf309 /source/blender/editors
parent77c61f545fb3248ae4e06afafa816764222405c4 (diff)
2.5
Monthly cleaning round to make it compile warning free. Mostly it was const stuff (strings, Context), but also a couple useful fixes, like wrong use of temp pointers. Only Mathutils callback struct I left alone... design issue.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/armature/BIF_retarget.h2
-rw-r--r--source/blender/editors/armature/editarmature_retarget.c2
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c18
-rw-r--r--source/blender/editors/include/ED_armature.h14
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/physics/ed_pointcache.c2
-rw-r--r--source/blender/editors/space_file/file_ops.c2
-rw-r--r--source/blender/editors/space_file/file_panels.c4
-rw-r--r--source/blender/editors/space_file/filelist.c2
-rw-r--r--source/blender/editors/space_file/filelist.h2
-rw-r--r--source/blender/editors/transform/transform_manipulator.c1
-rw-r--r--source/blender/editors/transform/transform_ndofinput.c10
12 files changed, 29 insertions, 32 deletions
diff --git a/source/blender/editors/armature/BIF_retarget.h b/source/blender/editors/armature/BIF_retarget.h
index c39f410424a..d950f073cf0 100644
--- a/source/blender/editors/armature/BIF_retarget.h
+++ b/source/blender/editors/armature/BIF_retarget.h
@@ -152,7 +152,7 @@ typedef struct RigControl {
} RigControl;
void BIF_retargetArc(struct bContext *C, ReebArc *earc, RigGraph *template_rigg);
-RigGraph *RIG_graphFromArmature(struct bContext *C, struct Object *ob, struct bArmature *arm);
+RigGraph *RIG_graphFromArmature(const struct bContext *C, struct Object *ob, struct bArmature *arm);
int RIG_nbJoints(RigGraph *rg);
char *RIG_nameBone(RigGraph *rg, int arc_index, int bone_index);
void RIG_freeRigGraph(BGraph *rg);
diff --git a/source/blender/editors/armature/editarmature_retarget.c b/source/blender/editors/armature/editarmature_retarget.c
index 68e8b45e7d2..6f5692dbf4c 100644
--- a/source/blender/editors/armature/editarmature_retarget.c
+++ b/source/blender/editors/armature/editarmature_retarget.c
@@ -1538,7 +1538,7 @@ void RIG_printGraph(RigGraph *rg)
/*******************************************************************************************************/
-RigGraph *RIG_graphFromArmature(bContext *C, Object *ob, bArmature *arm)
+RigGraph *RIG_graphFromArmature(const bContext *C, Object *ob, bArmature *arm)
{
Object *obedit = CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index 6e6e61dafc2..33351c99828 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -242,7 +242,7 @@ int TEMPLATES_CURRENT = 0;
GHash *TEMPLATES_HASH = NULL;
RigGraph *TEMPLATE_RIGG = NULL;
-void BIF_makeListTemplates(bContext *C)
+void BIF_makeListTemplates(const bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
Scene *scene = CTX_data_scene(C);
@@ -275,7 +275,7 @@ void BIF_makeListTemplates(bContext *C)
}
}
-char *BIF_listTemplates(bContext *C)
+char *BIF_listTemplates(const bContext *C)
{
GHashIterator ghi;
char menu_header[] = "Template%t|None%x0|";
@@ -307,7 +307,7 @@ char *BIF_listTemplates(bContext *C)
return TEMPLATES_MENU;
}
-int BIF_currentTemplate(bContext *C)
+int BIF_currentTemplate(const bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -334,7 +334,7 @@ int BIF_currentTemplate(bContext *C)
return TEMPLATES_CURRENT;
}
-RigGraph* sk_makeTemplateGraph(bContext *C, Object *ob)
+RigGraph* sk_makeTemplateGraph(const bContext *C, Object *ob)
{
Object *obedit = CTX_data_edit_object(C);
if (ob == obedit)
@@ -363,7 +363,7 @@ RigGraph* sk_makeTemplateGraph(bContext *C, Object *ob)
return TEMPLATE_RIGG;
}
-int BIF_nbJointsTemplate(bContext *C)
+int BIF_nbJointsTemplate(const bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
RigGraph *rg = sk_makeTemplateGraph(C, ts->skgen_template);
@@ -378,7 +378,7 @@ int BIF_nbJointsTemplate(bContext *C)
}
}
-char * BIF_nameBoneTemplate(bContext *C)
+char * BIF_nameBoneTemplate(const bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Sketch *stk = GLOBAL_sketch;
@@ -3033,7 +3033,7 @@ int BDR_drawSketchNames(ViewContext *vc)
return 0;
}
-void BDR_drawSketch(bContext *C)
+void BDR_drawSketch(const bContext *C)
{
if (ED_operator_sketch_mode(C))
{
@@ -3351,7 +3351,7 @@ int ED_operator_sketch_full_mode(bContext *C)
}
}
-int ED_operator_sketch_mode(bContext *C)
+int ED_operator_sketch_mode(const bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -3458,7 +3458,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot)
ot->modal = sketch_draw_stroke_modal;
ot->cancel = sketch_draw_stroke_cancel;
- ot->poll= ED_operator_sketch_mode;
+ ot->poll= (int (*)(bContext *))ED_operator_sketch_mode;
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index f28dbe2a619..1df9182fc9b 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -128,22 +128,22 @@ void ED_pose_deselectall(struct Object *ob, int test, int doundo);
int ED_operator_sketch_mode_active_stroke(struct bContext *C);
int ED_operator_sketch_full_mode(struct bContext *C);
-int ED_operator_sketch_mode(struct bContext *C);
+int ED_operator_sketch_mode(const struct bContext *C);
void BIF_freeSketch(struct bContext *C);
void BIF_convertSketch(struct bContext *C);
void BIF_deleteSketch(struct bContext *C);
void BIF_selectAllSketch(struct bContext *C, int mode); /* -1: deselect, 0: select, 1: toggle */
-void BIF_makeListTemplates(struct bContext *C);
-char *BIF_listTemplates(struct bContext *C);
-int BIF_currentTemplate(struct bContext *C);
+void BIF_makeListTemplates(const struct bContext *C);
+char *BIF_listTemplates(const struct bContext *C);
+int BIF_currentTemplate(const struct bContext *C);
void BIF_freeTemplates(struct bContext *C);
void BIF_setTemplate(struct bContext *C, int index);
-int BIF_nbJointsTemplate(struct bContext *C);
-char * BIF_nameBoneTemplate(struct bContext *C);
+int BIF_nbJointsTemplate(const struct bContext *C);
+char * BIF_nameBoneTemplate(const struct bContext *C);
-void BDR_drawSketch(struct bContext *vc);
+void BDR_drawSketch(const struct bContext *vc);
int BDR_drawSketchNames(struct ViewContext *vc);
#endif /* ED_ARMATURE_H */
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 6a5b743056a..11f6b443912 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -3581,9 +3581,7 @@ void special_editmenu(Scene *scene, View3D *v3d)
// XXX static short numcuts= 2;
Object *ob= OBACT;
Object *obedit= NULL; // XXX
- float fac;
int nr,ret=0;
- short randfac;
if(ob==NULL) return;
diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/ed_pointcache.c
index ad60be3ba7d..4bf6612df67 100644
--- a/source/blender/editors/physics/ed_pointcache.c
+++ b/source/blender/editors/physics/ed_pointcache.c
@@ -177,7 +177,7 @@ static int ptcache_bake_cloth_exec(bContext *C, wmOperator *op)
baker.quick_step = 1;
baker.break_test = cache_break_test;
baker.break_data = NULL;
- baker.progressbar = WM_timecursor;
+ baker.progressbar = (void (*)(void *, int))WM_timecursor;
baker.progresscontext = CTX_wm_window(C);
BKE_ptcache_make_cache(&baker);
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index bb56ec94d7b..9f703a9802b 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -358,9 +358,9 @@ void FILE_OT_add_bookmark(wmOperatorType *ot)
static int bookmark_delete_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
ScrArea *sa= CTX_wm_area(C);
- SpaceFile *sfile= (SpaceFile*)CTX_wm_space_data(C);
struct FSMenu* fsmenu = fsmenu_get();
int nentries = fsmenu_get_nentries(fsmenu, FS_CATEGORY_BOOKMARKS);
+
if(RNA_struct_find_property(op->ptr, "index")) {
int index = RNA_int_get(op->ptr, "index");
if ( (index >-1) && (index < nentries)) {
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 29c759d43c0..72a4133fe75 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -57,11 +57,9 @@ static void do_file_panel_events(bContext *C, void *arg, int event)
static void file_panel_category(const bContext *C, Panel *pa, FSMenuCategory category, int icon, int allow_delete)
{
uiBlock *block;
- uiStyle *style= U.uistyles.first;
- int i;
- int fontsize = file_font_pointsize();
struct FSMenu* fsmenu = fsmenu_get();
int nentries = fsmenu_get_nentries(fsmenu, category);
+ int i;
uiLayoutSetAlignment(pa->layout, UI_LAYOUT_ALIGN_LEFT);
block= uiLayoutFreeBlock(pa->layout);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index ab5dac1a727..6e442c654ca 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -367,7 +367,7 @@ struct ListBase* folderlist_new()
return p;
}
-void folderlist_popdir(struct ListBase* folderlist, const char *dir)
+void folderlist_popdir(struct ListBase* folderlist, char *dir)
{
const char *prev_dir;
struct FolderList *folder;
diff --git a/source/blender/editors/space_file/filelist.h b/source/blender/editors/space_file/filelist.h
index 0f8db98b7ab..dd3c2c766c1 100644
--- a/source/blender/editors/space_file/filelist.h
+++ b/source/blender/editors/space_file/filelist.h
@@ -73,7 +73,7 @@ void filelist_setfiletypes(struct FileList* filelist, short has_quicktime);
struct ListBase * folderlist_new();
void folderlist_free(struct ListBase* folderlist);
-void folderlist_popdir(struct ListBase* folderlist, const char *dir);
+void folderlist_popdir(struct ListBase* folderlist, char *dir);
void folderlist_pushdir(struct ListBase* folderlist, const char *dir);
int folderlist_clear_next(struct SpaceFile* sfile);
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index c4cca6eba07..7c71e89f948 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -1603,7 +1603,6 @@ int BIF_do_manipulator(bContext *C, struct wmEvent *event, wmOperator *op)
ScrArea *sa= CTX_wm_area(C);
View3D *v3d= sa->spacedata.first;
ARegion *ar= CTX_wm_region(C);
- RegionView3D *rv3d= ar->regiondata;
int constraint_axis[3] = {0, 0, 0};
int val;
int shift = event->shift;
diff --git a/source/blender/editors/transform/transform_ndofinput.c b/source/blender/editors/transform/transform_ndofinput.c
index 9c2a1a7db6d..f8567023e5f 100644
--- a/source/blender/editors/transform/transform_ndofinput.c
+++ b/source/blender/editors/transform/transform_ndofinput.c
@@ -37,7 +37,9 @@
#include "transform.h"
+#if 0
static int updateNDofMotion(NDofInput *n); // return 0 when motion is null
+#endif
static void resetNDofInput(NDofInput *n);
void initNDofInput(NDofInput *n)
@@ -121,6 +123,8 @@ void applyNDofInput(NDofInput *n, float *vec)
}
}
+// TRANSFORM_FIX_ME
+#if 0
static int updateNDofMotion(NDofInput *n)
{
@@ -128,14 +132,11 @@ static int updateNDofMotion(NDofInput *n)
int i;
int retval = 0;
-// TRANSFORM_FIX_ME
-#if 0
getndof(fval);
if (G.vd->ndoffilter)
filterNDOFvalues(fval);
-#endif
-
+
for(i = 0; i < 6; i++)
{
if (!retval && fval[i] != 0.0f)
@@ -150,6 +151,7 @@ static int updateNDofMotion(NDofInput *n)
return retval;
}
+#endif