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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-10-19 00:40:43 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2010-10-19 00:40:43 +0400
commit894daa01be1ba5b2f128b1e779d9a38c4c4e7700 (patch)
treee03309f3c35c2108fe8ac817336106b23e2301c2 /source/blender/editors/space_outliner/outliner.c
parent90b69a13a7f7b829c2eb314d1fd1efd56fd0a487 (diff)
parentbf09c851a97aba67b19a5fc85a91d874e28d1df1 (diff)
Merged changes in the trunk up to revision 32565.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner.c')
-rw-r--r--source/blender/editors/space_outliner/outliner.c261
1 files changed, 131 insertions, 130 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index d80291e199b..60431f0e36d 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -120,7 +120,7 @@
/* ************* XXX **************** */
-static void error(const char *dummy, ...) {}
+static void error(const char *UNUSED(arg), ...) {}
/* ********************************** */
@@ -1556,7 +1556,7 @@ static void outliner_set_flag(SpaceOops *soops, ListBase *lb, short flag, short
/* same check needed for both object operation and restrict column button func
* return 0 when in edit mode (cannot restrict view or select)
* otherwise return 1 */
-static int common_restrict_check(bContext *C, Scene *scene, Object *ob)
+static int common_restrict_check(bContext *C, Object *ob)
{
/* Don't allow hide an object in edit mode,
* check the bug #22153 and #21609, #23977
@@ -1575,13 +1575,13 @@ static int common_restrict_check(bContext *C, Scene *scene, Object *ob)
return 1;
}
-void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+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;
/* add check for edit mode */
- if(!common_restrict_check(C, scene, ob)) return;
+ if(!common_restrict_check(C, ob)) return;
if(base || (base= object_in_scene(ob, scene))) {
if((base->object->restrictflag ^= OB_RESTRICT_VIEW)) {
@@ -1590,7 +1590,7 @@ void object_toggle_visibility_cb(bContext *C, Scene *scene, TreeElement *te, Tre
}
}
-static int outliner_toggle_visibility_exec(bContext *C, wmOperator *op)
+static int outliner_toggle_visibility_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soops= CTX_wm_space_outliner(C);
Scene *scene= CTX_data_scene(C);
@@ -1620,7 +1620,7 @@ void OUTLINER_OT_visibility_toggle(wmOperatorType *ot)
/* --- */
-static void object_toggle_selectability_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void object_toggle_selectability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Base *base= (Base *)te->directdata;
@@ -1630,7 +1630,7 @@ static void object_toggle_selectability_cb(bContext *C, Scene *scene, TreeElemen
}
}
-static int outliner_toggle_selectability_exec(bContext *C, wmOperator *op)
+static int outliner_toggle_selectability_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soops= CTX_wm_space_outliner(C);
Scene *scene= CTX_data_scene(C);
@@ -1658,7 +1658,7 @@ void OUTLINER_OT_selectability_toggle(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-void object_toggle_renderability_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+void object_toggle_renderability_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Base *base= (Base *)te->directdata;
@@ -1668,7 +1668,7 @@ void object_toggle_renderability_cb(bContext *C, Scene *scene, TreeElement *te,
}
}
-static int outliner_toggle_renderability_exec(bContext *C, wmOperator *op)
+static int outliner_toggle_renderability_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soops= CTX_wm_space_outliner(C);
Scene *scene= CTX_data_scene(C);
@@ -1697,7 +1697,7 @@ void OUTLINER_OT_renderability_toggle(wmOperatorType *ot)
/* --- */
-static int outliner_toggle_expanded_exec(bContext *C, wmOperator *op)
+static int outliner_toggle_expanded_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soops= CTX_wm_space_outliner(C);
ARegion *ar= CTX_wm_region(C);
@@ -1728,7 +1728,7 @@ void OUTLINER_OT_expanded_toggle(wmOperatorType *ot)
/* --- */
-static int outliner_toggle_selected_exec(bContext *C, wmOperator *op)
+static int outliner_toggle_selected_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soops= CTX_wm_space_outliner(C);
ARegion *ar= CTX_wm_region(C);
@@ -1820,6 +1820,8 @@ void OUTLINER_OT_show_one_level(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "open", 1, "Open", "Expand all entries one level deep.");
}
+/* This is not used anywhere at the moment */
+#if 0
/* return 1 when levels were opened */
static int outliner_open_back(SpaceOops *soops, TreeElement *te)
{
@@ -1836,8 +1838,6 @@ static int outliner_open_back(SpaceOops *soops, TreeElement *te)
return retval;
}
-/* This is not used anywhere at the moment */
-#if 0
static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *teFind, int *found)
{
TreeElement *te;
@@ -1863,7 +1863,7 @@ static void outliner_open_reveal(SpaceOops *soops, ListBase *lb, TreeElement *te
#endif
// XXX just use View2D ops for this?
-void outliner_page_up_down(Scene *scene, ARegion *ar, SpaceOops *soops, int up)
+void outliner_page_up_down(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int up)
{
int dy= ar->v2d.mask.ymax-ar->v2d.mask.ymin;
@@ -2056,7 +2056,7 @@ static int tree_element_active_texture(bContext *C, Scene *scene, SpaceOops *soo
}
-static int tree_element_active_lamp(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set)
+static int tree_element_active_lamp(bContext *UNUSED(C), Scene *scene, SpaceOops *soops, TreeElement *te, int set)
{
Object *ob;
@@ -2204,7 +2204,7 @@ static int tree_element_active_bone(bContext *C, Scene *scene, TreeElement *te,
/* ebones only draw in editmode armature */
-static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
EditBone *ebone= te->directdata;
@@ -2229,7 +2229,7 @@ static int tree_element_active_ebone(bContext *C, Scene *scene, TreeElement *te,
return 0;
}
-static int tree_element_active_modifier(bContext *C, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_modifier(bContext *C, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
if(set) {
Object *ob= (Object *)tselem->id;
@@ -2242,7 +2242,7 @@ static int tree_element_active_modifier(bContext *C, TreeElement *te, TreeStoreE
return 0;
}
-static int tree_element_active_psys(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_psys(bContext *C, Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
if(set) {
Object *ob= (Object *)tselem->id;
@@ -2255,7 +2255,7 @@ static int tree_element_active_psys(bContext *C, Scene *scene, TreeElement *te,
return 0;
}
-static int tree_element_active_constraint(bContext *C, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_constraint(bContext *C, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
if(set) {
Object *ob= (Object *)tselem->id;
@@ -2267,7 +2267,7 @@ static int tree_element_active_constraint(bContext *C, TreeElement *te, TreeStor
return 0;
}
-static int tree_element_active_text(bContext *C, Scene *scene, SpaceOops *soops, TreeElement *te, int set)
+static int tree_element_active_text(bContext *UNUSED(C), Scene *UNUSED(scene), SpaceOops *UNUSED(soops), TreeElement *UNUSED(te), int UNUSED(set))
{
// XXX removed
return 0;
@@ -2292,7 +2292,7 @@ static int tree_element_active(bContext *C, Scene *scene, SpaceOops *soops, Tree
return 0;
}
-static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *tselem, int set)
{
Object *ob= (Object *)tselem->id;
Base *base= object_in_scene(ob, scene);
@@ -2312,7 +2312,7 @@ static int tree_element_active_pose(bContext *C, Scene *scene, TreeElement *te,
return 0;
}
-static int tree_element_active_sequence(bContext *C, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_sequence(TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
Sequence *seq= (Sequence*) te->directdata;
@@ -2326,7 +2326,7 @@ static int tree_element_active_sequence(bContext *C, TreeElement *te, TreeStoreE
return(0);
}
-static int tree_element_active_sequence_dup(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_sequence_dup(Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
Sequence *seq, *p;
Editing *ed= seq_give_editing(scene, FALSE);
@@ -2353,7 +2353,7 @@ static int tree_element_active_sequence_dup(bContext *C, Scene *scene, TreeEleme
return(0);
}
-static int tree_element_active_keymap_item(bContext *C, TreeElement *te, TreeStoreElem *tselem, int set)
+static int tree_element_active_keymap_item(bContext *UNUSED(C), TreeElement *te, TreeStoreElem *UNUSED(tselem), int set)
{
wmKeyMapItem *kmi= te->directdata;
@@ -2398,9 +2398,9 @@ static int tree_element_type_active(bContext *C, Scene *scene, SpaceOops *soops,
case TSE_POSEGRP:
return tree_element_active_posegroup(C, scene, te, tselem, set);
case TSE_SEQUENCE:
- return tree_element_active_sequence(C, te, tselem, set);
+ return tree_element_active_sequence(te, tselem, set);
case TSE_SEQUENCE_DUP:
- return tree_element_active_sequence_dup(C, scene, te, tselem, set);
+ return tree_element_active_sequence_dup(scene, te, tselem, set);
case TSE_KEYMAP_ITEM:
return tree_element_active_keymap_item(C, te, tselem, set);
@@ -2660,7 +2660,7 @@ static int do_outliner_item_rename(bContext *C, ARegion *ar, SpaceOops *soops, T
return 0;
}
-static int outliner_item_rename(bContext *C, wmOperator *op, wmEvent *event)
+static int outliner_item_rename(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
ARegion *ar= CTX_wm_region(C);
SpaceOops *soops= CTX_wm_space_outliner(C);
@@ -2687,39 +2687,6 @@ void OUTLINER_OT_item_rename(wmOperatorType *ot)
ot->poll= ED_operator_outliner_active;
}
-
-
-/* recursive helper for function below */
-static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te, int startx, int *starty)
-{
- TreeStoreElem *tselem= TREESTORE(te);
-
- /* store coord and continue, we need coordinates for elements outside view too */
- te->xs= (float)startx;
- te->ys= (float)(*starty);
- *starty-= OL_H;
-
- if((tselem->flag & TSE_CLOSED)==0) {
- TreeElement *ten;
- for(ten= te->subtree.first; ten; ten= ten->next) {
- outliner_set_coordinates_element(soops, ten, startx+OL_X, starty);
- }
- }
-
-}
-
-/* to retrieve coordinates with redrawing the entire tree */
-static void outliner_set_coordinates(ARegion *ar, SpaceOops *soops)
-{
- TreeElement *te;
- int starty= (int)(ar->v2d.tot.ymax)-OL_H;
- int startx= 0;
-
- for(te= soops->tree.first; te; te= te->next) {
- outliner_set_coordinates_element(soops, te, startx, &starty);
- }
-}
-
static TreeElement *outliner_find_id(SpaceOops *soops, ListBase *lb, ID *id)
{
TreeElement *te, *tes;
@@ -2739,7 +2706,7 @@ static TreeElement *outliner_find_id(SpaceOops *soops, ListBase *lb, ID *id)
return NULL;
}
-static int outliner_show_active_exec(bContext *C, wmOperator *op)
+static int outliner_show_active_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *so= CTX_wm_space_outliner(C);
Scene *scene= CTX_data_scene(C);
@@ -2789,6 +2756,66 @@ void OUTLINER_OT_show_active(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
+/* tse is not in the treestore, we use its contents to find a match */
+static TreeElement *outliner_find_tse(SpaceOops *soops, TreeStoreElem *tse)
+{
+ TreeStore *ts= soops->treestore;
+ TreeStoreElem *tselem;
+ int a;
+
+ if(tse->id==NULL) return NULL;
+
+ /* check if 'tse' is in treestore */
+ tselem= ts->data;
+ for(a=0; a<ts->usedelem; a++, tselem++) {
+ if((tse->type==0 && tselem->type==0) || (tselem->type==tse->type && tselem->nr==tse->nr)) {
+ if(tselem->id==tse->id) {
+ break;
+ }
+ }
+ }
+ if(tselem)
+ return outliner_find_tree_element(&soops->tree, a);
+
+ return NULL;
+}
+
+
+/* Called to find an item based on name.
+ */
+#if 0
+
+/* recursive helper for function below */
+static void outliner_set_coordinates_element(SpaceOops *soops, TreeElement *te, int startx, int *starty)
+{
+ TreeStoreElem *tselem= TREESTORE(te);
+
+ /* store coord and continue, we need coordinates for elements outside view too */
+ te->xs= (float)startx;
+ te->ys= (float)(*starty);
+ *starty-= OL_H;
+
+ if((tselem->flag & TSE_CLOSED)==0) {
+ TreeElement *ten;
+ for(ten= te->subtree.first; ten; ten= ten->next) {
+ outliner_set_coordinates_element(soops, ten, startx+OL_X, starty);
+ }
+ }
+
+}
+
+/* to retrieve coordinates with redrawing the entire tree */
+static void outliner_set_coordinates(ARegion *ar, SpaceOops *soops)
+{
+ TreeElement *te;
+ int starty= (int)(ar->v2d.tot.ymax)-OL_H;
+ int startx= 0;
+
+ for(te= soops->tree.first; te; te= te->next) {
+ outliner_set_coordinates_element(soops, te, startx, &starty);
+ }
+}
+
/* find next element that has this name */
static TreeElement *outliner_find_named(SpaceOops *soops, ListBase *lb, char *name, int flags, TreeElement *prev, int *prevFound)
{
@@ -2818,34 +2845,7 @@ static TreeElement *outliner_find_named(SpaceOops *soops, ListBase *lb, char *na
return NULL;
}
-/* tse is not in the treestore, we use its contents to find a match */
-static TreeElement *outliner_find_tse(SpaceOops *soops, TreeStoreElem *tse)
-{
- TreeStore *ts= soops->treestore;
- TreeStoreElem *tselem;
- int a;
-
- if(tse->id==NULL) return NULL;
-
- /* check if 'tse' is in treestore */
- tselem= ts->data;
- for(a=0; a<ts->usedelem; a++, tselem++) {
- if((tse->type==0 && tselem->type==0) || (tselem->type==tse->type && tselem->nr==tse->nr)) {
- if(tselem->id==tse->id) {
- break;
- }
- }
- }
- if(tselem)
- return outliner_find_tree_element(&soops->tree, a);
-
- return NULL;
-}
-
-
-/* Called to find an item based on name.
- */
-void outliner_find_panel(Scene *scene, ARegion *ar, SpaceOops *soops, int again, int flags)
+static void outliner_find_panel(Scene *UNUSED(scene), ARegion *ar, SpaceOops *soops, int again, int flags)
{
TreeElement *te= NULL;
TreeElement *last_find;
@@ -2917,6 +2917,7 @@ void outliner_find_panel(Scene *scene, ARegion *ar, SpaceOops *soops, int again,
error("Not found: %s", name);
}
}
+#endif
/* helper function for tree_element_shwo_hierarchy() - recursively checks whether subtrees have any objects*/
static int subtree_has_objects(SpaceOops *soops, ListBase *lb)
@@ -2959,7 +2960,7 @@ static void tree_element_show_hierarchy(Scene *scene, SpaceOops *soops, ListBase
}
/* show entire object level hierarchy */
-static int outliner_show_hierarchy_exec(bContext *C, wmOperator *op)
+static int outliner_show_hierarchy_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soops= CTX_wm_space_outliner(C);
ARegion *ar= CTX_wm_region(C);
@@ -3077,7 +3078,7 @@ static void set_operation_types(SpaceOops *soops, ListBase *lb,
}
}
-static void unlink_material_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void unlink_material_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem))
{
Material **matar=NULL;
int a, totcol=0;
@@ -3111,7 +3112,7 @@ static void unlink_material_cb(bContext *C, Scene *scene, TreeElement *te, TreeS
}
}
-static void unlink_texture_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void unlink_texture_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *UNUSED(tselem))
{
MTex **mtex= NULL;
int a;
@@ -3140,7 +3141,7 @@ static void unlink_texture_cb(bContext *C, Scene *scene, TreeElement *te, TreeSt
}
}
-static void unlink_group_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void unlink_group_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *tsep, TreeStoreElem *tselem)
{
Group *group= (Group *)tselem->id;
@@ -3177,7 +3178,7 @@ static void outliner_do_libdata_operation(bContext *C, Scene *scene, SpaceOops *
/* */
-static void object_select_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void object_select_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Base *base= (Base *)te->directdata;
@@ -3188,7 +3189,7 @@ static void object_select_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
}
}
-static void object_deselect_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void object_deselect_cb(bContext *UNUSED(C), Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Base *base= (Base *)te->directdata;
@@ -3199,7 +3200,7 @@ static void object_deselect_cb(bContext *C, Scene *scene, TreeElement *te, TreeS
}
}
-static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Base *base= (Base *)te->directdata;
@@ -3217,7 +3218,7 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
}
-static void id_local_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void id_local_cb(bContext *UNUSED(C), Scene *UNUSED(scene), TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
if(tselem->id->lib && (tselem->id->flag & LIB_EXTERN)) {
tselem->id->lib= NULL;
@@ -3226,7 +3227,7 @@ static void id_local_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreEle
}
}
-static void group_linkobs2scene_cb(bContext *C, Scene *scene, TreeElement *te, TreeStoreElem *tsep, TreeStoreElem *tselem)
+static void group_linkobs2scene_cb(bContext *UNUSED(C), Scene *scene, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem)
{
Group *group= (Group *)tselem->id;
GroupObject *gob;
@@ -3279,7 +3280,7 @@ static void outliner_do_object_operation(bContext *C, Scene *scene_act, SpaceOop
/* ******************************************** */
-static void pchan_cb(int event, TreeElement *te, TreeStoreElem *tselem)
+static void pchan_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
bPoseChannel *pchan= (bPoseChannel *)te->directdata;
@@ -3295,7 +3296,7 @@ static void pchan_cb(int event, TreeElement *te, TreeStoreElem *tselem)
pchan->bone->flag &= ~BONE_HIDDEN_P;
}
-static void bone_cb(int event, TreeElement *te, TreeStoreElem *tselem)
+static void bone_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
Bone *bone= (Bone *)te->directdata;
@@ -3311,7 +3312,7 @@ static void bone_cb(int event, TreeElement *te, TreeStoreElem *tselem)
bone->flag &= ~BONE_HIDDEN_P;
}
-static void ebone_cb(int event, TreeElement *te, TreeStoreElem *tselem)
+static void ebone_cb(int event, TreeElement *te, TreeStoreElem *UNUSED(tselem))
{
EditBone *ebone= (EditBone *)te->directdata;
@@ -3327,7 +3328,7 @@ static void ebone_cb(int event, TreeElement *te, TreeStoreElem *tselem)
ebone->flag &= ~BONE_HIDDEN_A;
}
-static void sequence_cb(int event, TreeElement *te, TreeStoreElem *tselem)
+static void sequence_cb(int event, TreeElement *UNUSED(te), TreeStoreElem *UNUSED(tselem))
{
// Sequence *seq= (Sequence*) te->directdata;
if(event==1) {
@@ -3354,7 +3355,7 @@ static void outliner_do_data_operation(SpaceOops *soops, int type, int event, Li
}
}
-void outliner_del(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops)
+void outliner_del(bContext *C, Scene *scene, ARegion *UNUSED(ar), SpaceOops *soops)
{
if(soops->outlinevis==SO_SEQUENCE)
@@ -3714,7 +3715,7 @@ static int do_outliner_operation_event(bContext *C, Scene *scene, ARegion *ar, S
}
-static int outliner_operation(bContext *C, wmOperator *op, wmEvent *event)
+static int outliner_operation(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
{
Scene *scene= CTX_data_scene(C);
ARegion *ar= CTX_wm_region(C);
@@ -3764,7 +3765,7 @@ static int ed_operator_outliner_datablocks_active(bContext *C)
* this function does not do that yet
*/
static void tree_element_to_path(SpaceOops *soops, TreeElement *te, TreeStoreElem *tselem,
- ID **id, char **path, int *array_index, short *flag, short *groupmode)
+ ID **id, char **path, int *array_index, short *flag, short *UNUSED(groupmode))
{
ListBase hierarchy = {NULL, NULL};
LinkData *ld;
@@ -3980,7 +3981,7 @@ static void do_outliner_drivers_editop(SpaceOops *soops, ListBase *tree, short m
/* Add Operator ---------------------------------- */
-static int outliner_drivers_addsel_exec(bContext *C, wmOperator *op)
+static int outliner_drivers_addsel_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soutliner= CTX_wm_space_outliner(C);
@@ -4015,7 +4016,7 @@ void OUTLINER_OT_drivers_add_selected(wmOperatorType *ot)
/* Remove Operator ---------------------------------- */
-static int outliner_drivers_deletesel_exec(bContext *C, wmOperator *op)
+static int outliner_drivers_deletesel_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soutliner= CTX_wm_space_outliner(C);
@@ -4190,7 +4191,7 @@ void OUTLINER_OT_keyingset_add_selected(wmOperatorType *ot)
/* Remove Operator ---------------------------------- */
-static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *op)
+static int outliner_keyingset_removeitems_exec(bContext *C, wmOperator *UNUSED(op))
{
SpaceOops *soutliner= CTX_wm_space_outliner(C);
Scene *scene= CTX_data_scene(C);
@@ -4811,7 +4812,7 @@ static void outliner_draw_tree(bContext *C, uiBlock *block, Scene *scene, ARegio
}
-static void outliner_back(ARegion *ar, SpaceOops *soops)
+static void outliner_back(ARegion *ar)
{
int ystart;
@@ -4825,7 +4826,7 @@ static void outliner_back(ARegion *ar, SpaceOops *soops)
}
}
-static void outliner_draw_restrictcols(ARegion *ar, SpaceOops *soops)
+static void outliner_draw_restrictcols(ARegion *ar)
{
int ystart;
@@ -4868,7 +4869,7 @@ static void restrictbutton_view_cb(bContext *C, void *poin, void *poin2)
Scene *scene = (Scene *)poin;
Object *ob = (Object *)poin2;
- if(!common_restrict_check(C, scene, ob)) return;
+ if(!common_restrict_check(C, ob)) return;
/* deselect objects that are invisible */
if (ob->restrictflag & OB_RESTRICT_VIEW) {
@@ -4885,7 +4886,7 @@ static void restrictbutton_sel_cb(bContext *C, void *poin, void *poin2)
Scene *scene = (Scene *)poin;
Object *ob = (Object *)poin2;
- if(!common_restrict_check(C, scene, ob)) return;
+ if(!common_restrict_check(C, ob)) return;
/* if select restriction has just been turned on */
if (ob->restrictflag & OB_RESTRICT_SELECT) {
@@ -4897,17 +4898,17 @@ static void restrictbutton_sel_cb(bContext *C, void *poin, void *poin2)
}
-static void restrictbutton_rend_cb(bContext *C, void *poin, void *poin2)
+static void restrictbutton_rend_cb(bContext *C, void *poin, void *UNUSED(poin2))
{
WM_event_add_notifier(C, NC_SCENE|ND_OB_RENDER, poin);
}
-static void restrictbutton_r_lay_cb(bContext *C, void *poin, void *poin2)
+static void restrictbutton_r_lay_cb(bContext *C, void *poin, void *UNUSED(poin2))
{
WM_event_add_notifier(C, NC_SCENE|ND_RENDER_OPTIONS, poin);
}
-static void restrictbutton_modifier_cb(bContext *C, void *poin, void *poin2)
+static void restrictbutton_modifier_cb(bContext *C, void *UNUSED(poin), void *poin2)
{
Object *ob = (Object *)poin2;
@@ -4916,7 +4917,7 @@ static void restrictbutton_modifier_cb(bContext *C, void *poin, void *poin2)
WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
}
-static void restrictbutton_bone_cb(bContext *C, void *poin, void *poin2)
+static void restrictbutton_bone_cb(bContext *C, void *UNUSED(poin), void *poin2)
{
Bone *bone= (Bone *)poin2;
if(bone && (bone->flag & BONE_HIDDEN_P))
@@ -4924,7 +4925,7 @@ static void restrictbutton_bone_cb(bContext *C, void *poin, void *poin2)
WM_event_add_notifier(C, NC_OBJECT|ND_POSE, NULL);
}
-static void restrictbutton_ebone_cb(bContext *C, void *poin, void *poin2)
+static void restrictbutton_ebone_cb(bContext *C, void *UNUSED(poin), void *poin2)
{
EditBone *ebone= (EditBone *)poin2;
if(ebone && (ebone->flag & BONE_HIDDEN_A))
@@ -4956,7 +4957,7 @@ static int group_select_flag(Group *gr)
return 0;
}
-static void restrictbutton_gr_restrict_flag(bContext *C, void *poin, void *poin2, int flag)
+static void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag)
{
Scene *scene = (Scene *)poin;
GroupObject *gob;
@@ -4984,17 +4985,17 @@ static void restrictbutton_gr_restrict_flag(bContext *C, void *poin, void *poin2
static void restrictbutton_gr_restrict_view(bContext *C, void *poin, void *poin2)
{
- restrictbutton_gr_restrict_flag(C, poin, poin2, OB_RESTRICT_VIEW);
+ restrictbutton_gr_restrict_flag(poin, poin2, OB_RESTRICT_VIEW);
WM_event_add_notifier(C, NC_GROUP, NULL);
}
static void restrictbutton_gr_restrict_select(bContext *C, void *poin, void *poin2)
{
- restrictbutton_gr_restrict_flag(C, poin, poin2, OB_RESTRICT_SELECT);
+ restrictbutton_gr_restrict_flag(poin, poin2, OB_RESTRICT_SELECT);
WM_event_add_notifier(C, NC_GROUP, NULL);
}
static void restrictbutton_gr_restrict_render(bContext *C, void *poin, void *poin2)
{
- restrictbutton_gr_restrict_flag(C, poin, poin2, OB_RESTRICT_RENDER);
+ restrictbutton_gr_restrict_flag(poin, poin2, OB_RESTRICT_RENDER);
WM_event_add_notifier(C, NC_GROUP, NULL);
}
@@ -5029,7 +5030,7 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname)
if (te->idcode == ID_LI) {
char expanded[FILE_MAXDIR + FILE_MAXFILE];
BLI_strncpy(expanded, ((Library *)tselem->id)->name, FILE_MAXDIR + FILE_MAXFILE);
- BLI_path_abs(expanded, G.sce);
+ BLI_path_abs(expanded, G.main->name);
if (!BLI_exists(expanded)) {
error("This path does not exist, correct this before saving");
}
@@ -5240,7 +5241,7 @@ static void outliner_draw_restrictbuts(uiBlock *block, Scene *scene, ARegion *ar
}
}
-static void outliner_draw_rnacols(ARegion *ar, SpaceOops *soops, int sizex)
+static void outliner_draw_rnacols(ARegion *ar, int sizex)
{
View2D *v2d= &ar->v2d;
@@ -5292,7 +5293,7 @@ static void outliner_draw_rnabuts(uiBlock *block, Scene *scene, ARegion *ar, Spa
}
}
-static void operator_call_cb(struct bContext *C, void *arg_kmi, void *arg2)
+static void operator_call_cb(struct bContext *UNUSED(C), void *arg_kmi, void *arg2)
{
wmOperatorType *ot= arg2;
wmKeyMapItem *kmi= arg_kmi;
@@ -5301,7 +5302,7 @@ static void operator_call_cb(struct bContext *C, void *arg_kmi, void *arg2)
BLI_strncpy(kmi->idname, ot->idname, OP_MAX_TYPENAME);
}
-static void operator_search_cb(const struct bContext *C, void *arg_kmi, char *str, uiSearchItems *items)
+static void operator_search_cb(const struct bContext *UNUSED(C), void *UNUSED(arg_kmi), char *str, uiSearchItems *items)
{
wmOperatorType *ot = WM_operatortype_first();
@@ -5452,7 +5453,7 @@ static char *keymap_tweak_dir_menu(void)
}
-static void keymap_type_cb(bContext *C, void *kmi_v, void *unused_v)
+static void keymap_type_cb(bContext *C, void *kmi_v, void *UNUSED(arg_v))
{
wmKeyMapItem *kmi= kmi_v;
short maptype= keymap_menu_type(kmi->type);
@@ -5654,16 +5655,16 @@ void draw_outliner(const bContext *C)
UI_view2d_totRect_set(v2d, sizex, sizey);
/* set matrix for 2d-view controls */
- UI_view2d_view_ortho(C, v2d);
+ UI_view2d_view_ortho(v2d);
/* draw outliner stuff (background, hierachy lines and names) */
- outliner_back(ar, soops);
+ outliner_back(ar);
block= uiBeginBlock(C, ar, "outliner buttons", UI_EMBOSS);
outliner_draw_tree((bContext *)C, block, scene, ar, soops);
if(ELEM(soops->outlinevis, SO_DATABLOCKS, SO_USERDEF)) {
/* draw rna buttons */
- outliner_draw_rnacols(ar, soops, sizex_rna);
+ outliner_draw_rnacols(ar, sizex_rna);
outliner_draw_rnabuts(block, scene, ar, soops, sizex_rna, &soops->tree);
}
else if(soops->outlinevis == SO_KEYMAP) {
@@ -5671,7 +5672,7 @@ void draw_outliner(const bContext *C)
}
else if (!(soops->flag & SO_HIDE_RESTRICTCOLS)) {
/* draw restriction columns */
- outliner_draw_restrictcols(ar, soops);
+ outliner_draw_restrictcols(ar);
outliner_draw_restrictbuts(block, scene, ar, soops, &soops->tree);
}