style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Sat, 4 Aug 2012 12:54:27 +0000 (12:54 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 4 Aug 2012 12:54:27 +0000 (12:54 +0000)
24 files changed:
source/blender/editors/curve/editfont.c
source/blender/editors/io/io_collada.c
source/blender/editors/object/object_modifier.c
source/blender/editors/render/render_shading.c
source/blender/editors/screen/screendump.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_buttons/buttons_ops.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_info/info_ops.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_add.c
source/blender/editors/space_node/node_buttons.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/node_intern.h
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_view.c
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_text/text_ops.c
source/blender/windowmanager/intern/wm_operators.c

index eb9246d..b11d640 100644 (file)
@@ -422,7 +422,8 @@ void FONT_OT_file_paste(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
 }
 
 /******************* text to object operator ********************/
@@ -1708,7 +1709,8 @@ void FONT_OT_open(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | FTFONTFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
 }
 
 /******************* delete operator *********************/
index 6e4da6b..ebfc052 100644 (file)
@@ -242,7 +242,8 @@ void WM_OT_collada_export(wmOperatorType *ot)
 
        ot->ui = wm_collada_export_draw;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
 
        RNA_def_boolean(ot->srna,
                        "apply_modifiers", 0, "Apply Modifiers",
@@ -319,6 +320,7 @@ void WM_OT_collada_import(wmOperatorType *ot)
        ot->exec = wm_collada_import_exec;
        ot->poll = WM_operator_winactive;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | COLLADAFILE, FILE_BLENDER, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
 }
 #endif
index 81639d0..1b18bfe 100644 (file)
@@ -1361,7 +1361,8 @@ void OBJECT_OT_multires_external_save(wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 
-       WM_operator_properties_filesel(ot, FOLDERFILE | BTXFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | BTXFILE, FILE_SPECIAL, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
        edit_modifier_properties(ot);
 }
 
index 21cd02c..8bdd4e5 100644 (file)
@@ -750,7 +750,8 @@ void TEXTURE_OT_envmap_save(wmOperatorType *ot)
        prop = RNA_def_float_array(ot->srna, "layout", 12, default_envmap_layout, 0.0f, 0.0f, "File layout", "Flat array describing the X,Y position of each cube face in the output image, where 1 is the size of a face - order is [+Z -Z +Y -X -Y +X] (use -1 to skip a face)", 0.0f, 0.0f);
        RNA_def_property_flag(prop, PROP_HIDDEN);
 
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
 }
 
 static int envmap_clear_exec(bContext *C, wmOperator *UNUSED(op))
index 7728936..79ff516 100644 (file)
@@ -266,7 +266,8 @@ void SCREEN_OT_screenshot(wmOperatorType *ot)
        
        ot->flag = 0;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
        RNA_def_boolean(ot->srna, "full", 1, "Full Screen", "Screenshot the whole Blender window");
 }
 
index 9827ffd..53ca256 100644 (file)
@@ -186,7 +186,8 @@ static void SOUND_OT_open(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
        RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
        RNA_def_boolean(ot->srna, "mono", FALSE, "Mono", "Mixdown the sound to mono");
 }
@@ -207,7 +208,8 @@ static void SOUND_OT_open_mono(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
        RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
        RNA_def_boolean(ot->srna, "mono", TRUE, "Mono", "Mixdown the sound to mono");
 }
@@ -659,7 +661,8 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE, FILE_SPECIAL, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
 #ifdef WITH_AUDASPACE
        RNA_def_int(ot->srna, "accuracy", 1024, 1, 16777216, "Accuracy", "Sample accuracy, important for animation data (the lower the value, the more accurate)", 1, 16777216);
        RNA_def_enum(ot->srna, "container", container_items, AUD_CONTAINER_FLAC, "Container", "File format");
index c29a8c3..c8cf69e 100644 (file)
@@ -230,7 +230,8 @@ void BUTTONS_OT_file_browse(wmOperatorType *ot)
        ot->cancel = file_browse_cancel;
 
        /* properties */
-       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
 }
 
 /* second operator, only difference from BUTTONS_OT_file_browse is WM_FILESEL_DIRECTORY */
@@ -247,5 +248,6 @@ void BUTTONS_OT_directory_browse(wmOperatorType *ot)
        ot->cancel = file_browse_cancel;
 
        /* properties */
-       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
 }
index 20d4706..e211b61 100644 (file)
@@ -275,8 +275,7 @@ void CLIP_OT_open(wmOperatorType *ot)
 
        /* properties */
        WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
-                                      WM_FILESEL_RELPATH | WM_FILESEL_FILES | WM_FILESEL_DIRECTORY,
-                                      FILE_DEFAULTDISPLAY);
+                                      WM_FILESEL_RELPATH | WM_FILESEL_FILES | WM_FILESEL_DIRECTORY, FILE_DEFAULTDISPLAY);
 }
 
 /******************* reload clip operator *********************/
index b1e1b6e..55dca72 100644 (file)
@@ -1214,7 +1214,8 @@ void GRAPH_OT_sound_bake(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
        RNA_def_float(ot->srna, "low", 0.0f, 0.0, 100000.0, "Lowest frequency", "", 0.1, 1000.00);
        RNA_def_float(ot->srna, "high", 100000.0, 0.0, 100000.0, "Highest frequency", "", 0.1, 1000.00);
        RNA_def_float(ot->srna, "attack", 0.005, 0.0, 2.0, "Attack time", "", 0.01, 0.1);
index aa44caa..38a2e97 100644 (file)
@@ -961,7 +961,8 @@ void IMAGE_OT_open(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
 }
 
 /******************** Match movie length operator ********************/
@@ -1073,7 +1074,8 @@ void IMAGE_OT_replace(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
 }
 
 /******************** save image as operator ********************/
@@ -1417,7 +1419,8 @@ void IMAGE_OT_save_as(wmOperatorType *ot)
        /* properties */
        RNA_def_boolean(ot->srna, "copy", 0, "Copy", "Create a new image file without modifying the current image in blender");
 
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
 }
 
 /******************** save image operator ********************/
index 33a2d5c..805ff17 100644 (file)
@@ -315,7 +315,8 @@ void FILE_OT_find_missing_files(wmOperatorType *ot)
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        /* properties */
-       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
 }
 
 /********************* report box operator *********************/
index 35c0ad9..7ddee03 100644 (file)
@@ -2537,7 +2537,7 @@ static void node_composit_buts_keying(uiLayout *layout, bContext *UNUSED(C), Poi
 
 static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRNA *ptr)
 {
-       bNode *node= ptr->data;
+       bNode *node = ptr->data;
 
        uiTemplateID(layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL);
 
index c7bc914..221a0b1 100644 (file)
@@ -319,7 +319,8 @@ void NODE_OT_add_file(wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);  //XXX TODO, relative_path
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);  //XXX TODO, relative_path
        RNA_def_string(ot->srna, "name", "Image", MAX_ID_NAME - 2, "Name", "Datablock name to assign");
 }
 
index 6221168..3297b78 100644 (file)
@@ -60,7 +60,7 @@
 /* poll for active nodetree */
 static int active_nodetree_poll(const bContext *C, PanelType *UNUSED(pt))
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        
        return (snode && snode->nodetree);
 }
@@ -68,7 +68,7 @@ static int active_nodetree_poll(const bContext *C, PanelType *UNUSED(pt))
 /* poll callback for active node */
 static int active_node_poll(const bContext *C, PanelType *UNUSED(pt))
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        
        return (snode && snode->edittree && nodeGetActive(snode->edittree));
 }
@@ -76,8 +76,8 @@ static int active_node_poll(const bContext *C, PanelType *UNUSED(pt))
 /* active node */
 static void active_node_panel(const bContext *C, Panel *pa)
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
-       bNodeTree *ntree= (snode) ? snode->edittree : NULL;
+       SpaceNode *snode = CTX_wm_space_node(C);
+       bNodeTree *ntree = (snode) ? snode->edittree : NULL;
        bNode *node = (ntree) ? nodeGetActive(ntree) : NULL; // xxx... for editing group nodes
        uiLayout *layout, *row, *col, *sub;
        PointerRNA ptr, opptr;
@@ -88,7 +88,7 @@ static void active_node_panel(const bContext *C, Panel *pa)
        //if (node->id) /* for group nodes */
        //      RNA_pointer_create(node->id, &RNA_Node, node, &ptr);
        //else
-               RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr); 
+       RNA_pointer_create(&ntree->id, &RNA_Node, node, &ptr);
        
        layout = uiLayoutColumn(pa->layout, FALSE);
        uiLayoutSetContextPointer(layout, "node", &ptr);
@@ -134,24 +134,24 @@ static void active_node_panel(const bContext *C, Panel *pa)
 
 static int node_sockets_poll(const bContext *C, PanelType *UNUSED(pt))
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        
        return (snode && snode->nodetree && G.rt == 777);
 }
 
 static void node_sockets_panel(const bContext *C, Panel *pa)
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
-       bNodeTree *ntree= (snode) ? snode->edittree : NULL;
+       SpaceNode *snode = CTX_wm_space_node(C);
+       bNodeTree *ntree = (snode) ? snode->edittree : NULL;
        bNode *node = (ntree) ? nodeGetActive(ntree) : NULL;
        bNodeSocket *sock;
-       uiLayout *layout= pa->layout, *split;
+       uiLayout *layout = pa->layout, *split;
        char name[UI_MAX_NAME_STR];
        
        if (ELEM(NULL, ntree, node))
                return;
        
-       for (sock=node->inputs.first; sock; sock=sock->next) {
+       for (sock = node->inputs.first; sock; sock = sock->next) {
                BLI_snprintf(name, sizeof(name), "%s:", sock->name);
 
                split = uiLayoutSplit(layout, 0.35f, FALSE);
@@ -166,33 +166,33 @@ void node_buttons_register(ARegionType *art)
 {
        PanelType *pt;
        
-       pt= MEM_callocN(sizeof(PanelType), "spacetype node panel active node");
+       pt = MEM_callocN(sizeof(PanelType), "spacetype node panel active node");
        strcpy(pt->idname, "NODE_PT_item");
        strcpy(pt->label, IFACE_("Active Node"));
-       pt->draw= active_node_panel;
-       pt->poll= active_node_poll;
+       pt->draw = active_node_panel;
+       pt->poll = active_node_poll;
        BLI_addtail(&art->paneltypes, pt);
 
-       pt= MEM_callocN(sizeof(PanelType), "spacetype node panel node sockets");
+       pt = MEM_callocN(sizeof(PanelType), "spacetype node panel node sockets");
        strcpy(pt->idname, "NODE_PT_sockets");
        strcpy(pt->label, "Sockets");
-       pt->draw= node_sockets_panel;
-       pt->poll= node_sockets_poll;
+       pt->draw = node_sockets_panel;
+       pt->poll = node_sockets_poll;
        pt->flag |= PNL_DEFAULT_CLOSED;
        BLI_addtail(&art->paneltypes, pt);
        
-       pt= MEM_callocN(sizeof(PanelType), "spacetype node panel gpencil");
+       pt = MEM_callocN(sizeof(PanelType), "spacetype node panel gpencil");
        strcpy(pt->idname, "NODE_PT_gpencil");
        strcpy(pt->label, "Grease Pencil");
-       pt->draw= gpencil_panel_standard;
-       pt->poll= active_nodetree_poll;
+       pt->draw = gpencil_panel_standard;
+       pt->poll = active_nodetree_poll;
        BLI_addtail(&art->paneltypes, pt);
 }
 
 static int node_properties(bContext *C, wmOperator *UNUSED(op))
 {
-       ScrArea *sa= CTX_wm_area(C);
-       ARegion *ar= node_has_buttons_region(sa);
+       ScrArea *sa = CTX_wm_area(C);
+       ARegion *ar = node_has_buttons_region(sa);
        
        if (ar)
                ED_region_toggle_hidden(C, ar);
@@ -203,7 +203,7 @@ static int node_properties(bContext *C, wmOperator *UNUSED(op))
 /* non-standard poll operator which doesn't care if there are any nodes */
 static int node_properties_poll(bContext *C)
 {
-       ScrArea *sa= CTX_wm_area(C);
+       ScrArea *sa = CTX_wm_area(C);
        return (sa && (sa->spacetype == SPACE_NODE));
 }
 
index fe10a52..85ad590 100644 (file)
@@ -2082,5 +2082,5 @@ void NODE_OT_clipboard_paste(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
 
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
index 6114323..27ee600 100644 (file)
 
 static void do_node_add(bContext *C, bNodeTemplate *ntemp)
 {
-       Main *bmain= CTX_data_main(C);
-       Scene *scene= CTX_data_scene(C);
-       SpaceNode *snode= CTX_wm_space_node(C);
-       ScrArea *sa= CTX_wm_area(C);
+       Main *bmain = CTX_data_main(C);
+       Scene *scene = CTX_data_scene(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
+       ScrArea *sa = CTX_wm_area(C);
        ARegion *ar;
        bNode *node;
        
        /* get location to add node at mouse */
-       for (ar=sa->regionbase.first; ar; ar=ar->next) {
+       for (ar = sa->regionbase.first; ar; ar = ar->next) {
                if (ar->regiontype == RGN_TYPE_WINDOW) {
-                       wmWindow *win= CTX_wm_window(C);
-                       int x= win->eventstate->x - ar->winrct.xmin;
-                       int y= win->eventstate->y - ar->winrct.ymin;
+                       wmWindow *win = CTX_wm_window(C);
+                       int x = win->eventstate->x - ar->winrct.xmin;
+                       int y = win->eventstate->y - ar->winrct.ymin;
                        
-                       if (y < 60) y+= 60;
+                       if (y < 60) y += 60;
                        UI_view2d_region_to_view(&ar->v2d, x, y, &snode->mx, &snode->my);
                }
        }
        
        /* store selection in temp test flag */
-       for (node= snode->edittree->nodes.first; node; node= node->next) {
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
                if (node->flag & NODE_SELECT) node->flag |= NODE_TEST;
                else node->flag &= ~NODE_TEST;
        }
@@ -87,12 +87,12 @@ static void do_node_add(bContext *C, bNodeTemplate *ntemp)
        /* node= */ node_add_node(snode, bmain, scene, ntemp, snode->mx, snode->my);
        
        /* select previous selection before autoconnect */
-       for (node= snode->edittree->nodes.first; node; node= node->next) {
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
                if (node->flag & NODE_TEST) node->flag |= NODE_SELECT;
        }
        
        /* deselect after autoconnection */
-       for (node= snode->edittree->nodes.first; node; node= node->next) {
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
                if (node->flag & NODE_TEST) node->flag &= ~NODE_SELECT;
        }
                
@@ -115,29 +115,29 @@ static void do_node_add_static(bContext *C, void *UNUSED(arg), int event)
 
 static void do_node_add_group(bContext *C, void *UNUSED(arg), int event)
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
        bNodeTemplate ntemp;
        
-       if (event>=0) {
-               ntemp.ngroup= BLI_findlink(&G.main->nodetree, event);
+       if (event >= 0) {
+               ntemp.ngroup = BLI_findlink(&G.main->nodetree, event);
                ntemp.type = ntemp.ngroup->nodetype;
        }
        else {
                ntemp.type = -event;
                switch (ntemp.type) {
-               case NODE_GROUP:
-                       ntemp.ngroup = ntreeAddTree("Group", snode->treetype, ntemp.type);
-                       break;
-               case NODE_FORLOOP:
-                       ntemp.ngroup = ntreeAddTree("For Loop", snode->treetype, ntemp.type);
-                       break;
-               case NODE_WHILELOOP:
-                       ntemp.ngroup = ntreeAddTree("While Loop", snode->treetype, ntemp.type);
-                       break;
-               default:
-                       ntemp.ngroup = NULL;
+                       case NODE_GROUP:
+                               ntemp.ngroup = ntreeAddTree("Group", snode->treetype, ntemp.type);
+                               break;
+                       case NODE_FORLOOP:
+                               ntemp.ngroup = ntreeAddTree("For Loop", snode->treetype, ntemp.type);
+                               break;
+                       case NODE_WHILELOOP:
+                               ntemp.ngroup = ntreeAddTree("While Loop", snode->treetype, ntemp.type);
+                               break;
+                       default:
+                               ntemp.ngroup = NULL;
                }
        }
        if (!ntemp.ngroup)
@@ -151,10 +151,10 @@ static void do_node_add_group(bContext *C, void *UNUSED(arg), int event)
 
 static int node_tree_has_type(int treetype, int nodetype)
 {
-       bNodeTreeType *ttype= ntreeGetType(treetype);
+       bNodeTreeType *ttype = ntreeGetType(treetype);
        bNodeType *ntype;
-       for (ntype=ttype->node_types.first; ntype; ntype=ntype->next) {
-               if (ntype->type==nodetype)
+       for (ntype = ttype->node_types.first; ntype; ntype = ntype->next) {
+               if (ntype->type == nodetype)
                        return 1;
        }
        return 0;
@@ -162,12 +162,12 @@ static int node_tree_has_type(int treetype, int nodetype)
 
 static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
 {
-       Main *bmain= CTX_data_main(C);
-       Scene *scene= CTX_data_scene(C);
-       SpaceNode *snode= CTX_wm_space_node(C);
+       Main *bmain = CTX_data_main(C);
+       Scene *scene = CTX_data_scene(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        bNodeTree *ntree;
-       int nodeclass= GET_INT_FROM_POINTER(arg_nodeclass);
-       int event, compatibility= 0;
+       int nodeclass = GET_INT_FROM_POINTER(arg_nodeclass);
+       int event, compatibility = 0;
        
        ntree = snode->nodetree;
        
@@ -178,12 +178,12 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
 
        if (ntree->type == NTREE_SHADER) {
                if (BKE_scene_use_new_shading_nodes(scene))
-                       compatibility= NODE_NEW_SHADING;
+                       compatibility = NODE_NEW_SHADING;
                else
-                       compatibility= NODE_OLD_SHADING;
+                       compatibility = NODE_OLD_SHADING;
        }
        
-       if (nodeclass==NODE_CLASS_GROUP) {
+       if (nodeclass == NODE_CLASS_GROUP) {
                bNodeTree *ngroup;
                
                uiLayoutSetFunc(layout, do_node_add_group, NULL);
@@ -197,10 +197,10 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
                        uiItemV(layout, IFACE_("New While Loop"), 0, -NODE_WHILELOOP);
                uiItemS(layout);
                
-               for (ngroup=bmain->nodetree.first, event=0; ngroup; ngroup= ngroup->id.next, ++event) {
+               for (ngroup = bmain->nodetree.first, event = 0; ngroup; ngroup = ngroup->id.next, ++event) {
                        /* only use group trees */
-                       if (ngroup->type==ntree->type && ELEM3(ngroup->nodetype, NODE_GROUP, NODE_FORLOOP, NODE_WHILELOOP)) {
-                               uiItemV(layout, ngroup->id.name+2, 0, event);
+                       if (ngroup->type == ntree->type && ELEM3(ngroup->nodetype, NODE_GROUP, NODE_FORLOOP, NODE_WHILELOOP)) {
+                               uiItemV(layout, ngroup->id.name + 2, 0, event);
                        }
                }
        }
@@ -209,26 +209,28 @@ static void node_add_menu(bContext *C, uiLayout *layout, void *arg_nodeclass)
                
                uiLayoutSetFunc(layout, do_node_add_static, NULL);
                
-               for (ntype=ntreeGetType(ntree->type)->node_types.first; ntype; ntype=ntype->next) {
-                       if (ntype->nclass==nodeclass && ntype->name)
-                               if (!compatibility || (ntype->compatibility & compatibility))
+               for (ntype = ntreeGetType(ntree->type)->node_types.first; ntype; ntype = ntype->next) {
+                       if (ntype->nclass == nodeclass && ntype->name) {
+                               if (!compatibility || (ntype->compatibility & compatibility)) {
                                        uiItemV(layout, IFACE_(ntype->name), 0, ntype->type);
+                               }
+                       }
                }
        }
 }
 
 static void node_menu_add_foreach_cb(void *calldata, int nclass, const char *name)
 {
-       uiLayout *layout= calldata;
+       uiLayout *layout = calldata;
        uiItemMenuF(layout, IFACE_(name), 0, node_add_menu, SET_INT_IN_POINTER(nclass));
 }
 
 static void node_menu_add(const bContext *C, Menu *menu)
 {
-       Scene *scene= CTX_data_scene(C);
-       SpaceNode *snode= CTX_wm_space_node(C);
-       uiLayout *layout= menu->layout;
-       bNodeTreeType *ntreetype= ntreeGetType(snode->treetype);
+       Scene *scene = CTX_data_scene(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
+       uiLayout *layout = menu->layout;
+       bNodeTreeType *ntreetype = ntreeGetType(snode->treetype);
 
        if (!snode->nodetree)
                uiLayoutSetActive(layout, FALSE);
@@ -241,9 +243,9 @@ void node_menus_register(void)
 {
        MenuType *mt;
 
-       mt= MEM_callocN(sizeof(MenuType), "spacetype node menu add");
+       mt = MEM_callocN(sizeof(MenuType), "spacetype node menu add");
        strcpy(mt->idname, "NODE_MT_add");
        strcpy(mt->label, "Add");
-       mt->draw= node_menu_add;
+       mt->draw = node_menu_add;
        WM_menutype_add(mt);
 }
index 16a3192..a6bf819 100644 (file)
@@ -120,8 +120,8 @@ void NODE_OT_backimage_sample(wmOperatorType *ot);
 
 /* drawnode.c */
 void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link);
-void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
-int node_link_bezier_points(View2D *v2d, SpaceNode *snode, bNodeLink *link, float coord_array[][2], int resol);
+void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3);
+int node_link_bezier_points(View2D * v2d, SpaceNode * snode, bNodeLink * link, float coord_array[][2], int resol);
 // void node_draw_link_straight(View2D *v2d, SpaceNode *snode, bNodeLink *link, int th_col1, int do_shaded, int th_col2, int do_triple, int th_col3 );
 void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage);
 
@@ -209,18 +209,18 @@ extern const char *node_context_dir[];
 // XXXXXX
 
 // XXX from BSE_node.h
-#define HIDDEN_RAD             15.0f
-#define BASIS_RAD              8.0f
-#define NODE_DYS               (U.widget_unit/2)
-#define NODE_DY                        U.widget_unit
+#define HIDDEN_RAD      15.0f
+#define BASIS_RAD       8.0f
+#define NODE_DYS        (U.widget_unit / 2)
+#define NODE_DY         U.widget_unit
 #define NODE_MARGIN_X   15
-#define NODE_SOCKSIZE  5
+#define NODE_SOCKSIZE   5
 #define NODE_LINK_RESOL 12
 
 // XXX button events (butspace)
 enum {
        B_NOP = 0,
-       B_REDR  = 1,
+       B_REDR = 1,
        B_NODE_USEMAT,
        B_NODE_USESCENE,
        B_NODE_USETEX,
index 0d0b7ec..cfd3732 100644 (file)
@@ -130,14 +130,14 @@ void ED_operatormacros_node(void)
 
        ot = WM_operatortype_append_macro("NODE_OT_translate_attach", "Move and Attach",
                                          "Move nodes and attach to frame",
-                                         OPTYPE_UNDO|OPTYPE_REGISTER);
+                                         OPTYPE_UNDO | OPTYPE_REGISTER);
        mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_boolean_set(mot->ptr, "release_confirm", TRUE);
        WM_operatortype_macro_define(ot, "NODE_OT_attach");
 
        ot = WM_operatortype_append_macro("NODE_OT_detach_translate_attach", "Detach and Move",
                                          "Detach nodes, move and attach to frame",
-                                         OPTYPE_UNDO|OPTYPE_REGISTER);
+                                         OPTYPE_UNDO | OPTYPE_REGISTER);
        WM_operatortype_macro_define(ot, "NODE_OT_detach");
        mot = WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
        RNA_boolean_set(mot->ptr, "release_confirm", TRUE);
@@ -145,25 +145,25 @@ void ED_operatormacros_node(void)
 
        ot = WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate",
                                          "Duplicate selected nodes and move them",
-                                         OPTYPE_UNDO|OPTYPE_REGISTER);
+                                         OPTYPE_UNDO | OPTYPE_REGISTER);
        WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
        WM_operatortype_macro_define(ot, "NODE_OT_translate_attach");
 
        /* modified operator call for duplicating with input links */
        ot = WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate",
                                          "Duplicate selected nodes keeping input links and move them",
-                                         OPTYPE_UNDO|OPTYPE_REGISTER);
+                                         OPTYPE_UNDO | OPTYPE_REGISTER);
        mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
        RNA_boolean_set(mot->ptr, "keep_inputs", TRUE);
        WM_operatortype_macro_define(ot, "NODE_OT_translate_attach");
 
        ot = WM_operatortype_append_macro("NODE_OT_move_detach_links", "Detach", "Move a node to detach links",
-                                         OPTYPE_UNDO|OPTYPE_REGISTER);
+                                         OPTYPE_UNDO | OPTYPE_REGISTER);
        WM_operatortype_macro_define(ot, "NODE_OT_links_detach");
        WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 
        ot = WM_operatortype_append_macro("NODE_OT_move_detach_links_release", "Detach", "Move a node to detach links",
-                                         OPTYPE_UNDO|OPTYPE_REGISTER);
+                                         OPTYPE_UNDO | OPTYPE_REGISTER);
        WM_operatortype_macro_define(ot, "NODE_OT_links_detach");
        mot = WM_operatortype_macro_define(ot, "NODE_OT_translate_attach");
 }
@@ -172,18 +172,18 @@ void ED_operatormacros_node(void)
 static void node_select_keymap(wmKeyMap *keymap, int extend)
 {
        /* modifier combinations */
-       const int mod_single[] = { 0, KM_CTRL, KM_ALT, KM_CTRL|KM_ALT,
+       const int mod_single[] = { 0, KM_CTRL, KM_ALT, KM_CTRL | KM_ALT,
                                   -1 /* terminator */
-                                };
-       const int mod_extend[] = { KM_SHIFT, KM_SHIFT|KM_CTRL,
-                                  KM_SHIFT|KM_ALT, KM_SHIFT|KM_CTRL|KM_ALT,
+       };
+       const int mod_extend[] = { KM_SHIFT, KM_SHIFT | KM_CTRL,
+                                  KM_SHIFT | KM_ALT, KM_SHIFT | KM_CTRL | KM_ALT,
                                   -1 /* terminator */
-                                };
+       };
        const int *mod = (extend ? mod_extend : mod_single);
        wmKeyMapItem *kmi;
        int i;
        
-       for (i=0; mod[i] >= 0; ++i) {
+       for (i = 0; mod[i] >= 0; ++i) {
                kmi = WM_keymap_add_item(keymap, "NODE_OT_select", ACTIONMOUSE, KM_PRESS, mod[i], 0);
                RNA_boolean_set(kmi->ptr, "extend", extend);
                kmi = WM_keymap_add_item(keymap, "NODE_OT_select", SELECTMOUSE, KM_PRESS, mod[i], 0);
@@ -214,23 +214,23 @@ void node_keymap(struct wmKeyConfig *keyconf)
        node_select_keymap(keymap, TRUE);
        
        kmi = WM_keymap_add_item(keymap, "NODE_OT_select_border", EVT_TWEAK_S, KM_ANY, 0, 0);
-               RNA_boolean_set(kmi->ptr, "tweak", TRUE);
+       RNA_boolean_set(kmi->ptr, "tweak", TRUE);
        
        /* each of these falls through if not handled... */
        WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, 0, 0);
        kmi = WM_keymap_add_item(keymap, "NODE_OT_link", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
-               RNA_boolean_set(kmi->ptr, "detach", TRUE);
+       RNA_boolean_set(kmi->ptr, "detach", TRUE);
        WM_keymap_add_item(keymap, "NODE_OT_resize", LEFTMOUSE, KM_PRESS, 0, 0);
        
        WM_keymap_add_item(keymap, "NODE_OT_add_reroute", LEFTMOUSE, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "NODE_OT_links_cut", LEFTMOUSE, KM_PRESS, KM_CTRL, 0);
-       WM_keymap_add_item(keymap, "NODE_OT_select_link_viewer", LEFTMOUSE, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "NODE_OT_select_link_viewer", LEFTMOUSE, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
        
        WM_keymap_add_item(keymap, "NODE_OT_backimage_move", MIDDLEMOUSE, KM_PRESS, KM_ALT, 0);
        kmi = WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, 0, 0);
-               RNA_float_set(kmi->ptr, "factor", 0.83333f);
+       RNA_float_set(kmi->ptr, "factor", 0.83333f);
        kmi = WM_keymap_add_item(keymap, "NODE_OT_backimage_zoom", VKEY, KM_PRESS, KM_ALT, 0);
-               RNA_float_set(kmi->ptr, "factor", 1.2f);
+       RNA_float_set(kmi->ptr, "factor", 1.2f);
        WM_keymap_add_item(keymap, "NODE_OT_backimage_sample", ACTIONMOUSE, KM_PRESS, KM_ALT, 0);
 
        kmi = WM_keymap_add_item(keymap, "NODE_OT_link_make", FKEY, KM_PRESS, 0, 0);
@@ -241,7 +241,7 @@ void node_keymap(struct wmKeyConfig *keyconf)
        WM_keymap_add_menu(keymap, "NODE_MT_add", AKEY, KM_PRESS, KM_SHIFT, 0);
        WM_keymap_add_item(keymap, "NODE_OT_duplicate_move", DKEY, KM_PRESS, KM_SHIFT, 0);
        /* modified operator call for duplicating with input links */
-       WM_keymap_add_item(keymap, "NODE_OT_duplicate_move_keep_inputs", DKEY, KM_PRESS, KM_SHIFT|KM_CTRL, 0);
+       WM_keymap_add_item(keymap, "NODE_OT_duplicate_move_keep_inputs", DKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
        
        WM_keymap_add_item(keymap, "NODE_OT_parent_set", PKEY, KM_PRESS, KM_CTRL, 0);
        WM_keymap_add_item(keymap, "NODE_OT_parent_clear", PKEY, KM_PRESS, KM_ALT, 0);
index 1fd50fd..43676ff 100644 (file)
@@ -57,7 +57,7 @@ static bNode *node_under_mouse_select(bNodeTree *ntree, int mx, int my)
 {
        bNode *node;
        
-       for (node=ntree->nodes.last; node; node=node->prev) {
+       for (node = ntree->nodes.last; node; node = node->prev) {
                if (node->typeinfo->select_area_func) {
                        if (node->typeinfo->select_area_func(node, mx, my))
                                return node;
@@ -70,7 +70,7 @@ static bNode *node_under_mouse_tweak(bNodeTree *ntree, int mx, int my)
 {
        bNode *node;
        
-       for (node=ntree->nodes.last; node; node=node->prev) {
+       for (node = ntree->nodes.last; node; node = node->prev) {
                if (node->typeinfo->tweak_area_func) {
                        if (node->typeinfo->tweak_area_func(node, mx, my))
                                return node;
@@ -91,9 +91,9 @@ void node_deselect(bNode *node)
        node->flag &= ~SELECT;
        
        /* deselect sockets too */
-       for (sock=node->inputs.first; sock; sock=sock->next)
+       for (sock = node->inputs.first; sock; sock = sock->next)
                sock->flag &= ~SELECT;
-       for (sock=node->outputs.first; sock; sock=sock->next)
+       for (sock = node->outputs.first; sock; sock = sock->next)
                sock->flag &= ~SELECT;
 }
 
@@ -119,16 +119,16 @@ void node_socket_deselect(bNode *node, bNodeSocket *sock, int deselect_node)
        sock->flag &= ~SELECT;
        
        if (node && deselect_node) {
-               int sel=0;
+               int sel = 0;
                
                /* if no selected sockets remain, also deselect the node */
-               for (sock=node->inputs.first; sock; sock=sock->next) {
+               for (sock = node->inputs.first; sock; sock = sock->next) {
                        if (sock->flag & SELECT) {
                                sel = 1;
                                break;
                        }
                }
-               for (sock=node->outputs.first; sock; sock=sock->next) {
+               for (sock = node->outputs.first; sock; sock = sock->next) {
                        if (sock->flag & SELECT) {
                                sel = 1;
                                break;
@@ -153,7 +153,7 @@ void node_deselect_all(SpaceNode *snode)
 {
        bNode *node;
        
-       for (node= snode->edittree->nodes.first; node; node= node->next)
+       for (node = snode->edittree->nodes.first; node; node = node->next)
                node_deselect(node);
 }
 
@@ -167,15 +167,15 @@ void node_deselect_all_input_sockets(SpaceNode *snode, int deselect_nodes)
         * We can do that more efficiently here.
         */
        
-       for (node= snode->edittree->nodes.first; node; node= node->next) {
-               int sel=0;
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
+               int sel = 0;
                
-               for (sock= node->inputs.first; sock; sock=sock->next)
+               for (sock = node->inputs.first; sock; sock = sock->next)
                        sock->flag &= ~SELECT;
                
                /* if no selected sockets remain, also deselect the node */
                if (deselect_nodes) {
-                       for (sock= node->outputs.first; sock; sock=sock->next) {
+                       for (sock = node->outputs.first; sock; sock = sock->next) {
                                if (sock->flag & SELECT) {
                                        sel = 1;
                                        break;
@@ -187,7 +187,7 @@ void node_deselect_all_input_sockets(SpaceNode *snode, int deselect_nodes)
                }
        }
        
-       for (sock= snode->edittree->outputs.first; sock; sock=sock->next)
+       for (sock = snode->edittree->outputs.first; sock; sock = sock->next)
                sock->flag &= ~SELECT;
 }
 
@@ -201,15 +201,15 @@ void node_deselect_all_output_sockets(SpaceNode *snode, int deselect_nodes)
         * We can do that more efficiently here.
         */
        
-       for (node= snode->edittree->nodes.first; node; node= node->next) {
-               int sel=0;
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
+               int sel = 0;
                
-               for (sock= node->outputs.first; sock; sock=sock->next)
+               for (sock = node->outputs.first; sock; sock = sock->next)
                        sock->flag &= ~SELECT;
                
                /* if no selected sockets remain, also deselect the node */
                if (deselect_nodes) {
-                       for (sock= node->inputs.first; sock; sock=sock->next) {
+                       for (sock = node->inputs.first; sock; sock = sock->next) {
                                if (sock->flag & SELECT) {
                                        sel = 1;
                                        break;
@@ -221,7 +221,7 @@ void node_deselect_all_output_sockets(SpaceNode *snode, int deselect_nodes)
                }
        }
        
-       for (sock= snode->edittree->inputs.first; sock; sock=sock->next)
+       for (sock = snode->edittree->inputs.first; sock; sock = sock->next)
                sock->flag &= ~SELECT;
 }
 
@@ -232,7 +232,7 @@ int node_select_same_type(SpaceNode *snode)
        int redraw;
 
        /* search for the active node. */
-       for (nac= snode->edittree->nodes.first; nac; nac= nac->next) {
+       for (nac = snode->edittree->nodes.first; nac; nac = nac->next) {
                if (nac->flag & SELECT)
                        break;
        }
@@ -241,16 +241,16 @@ int node_select_same_type(SpaceNode *snode)
        if (!nac)
                return(0);
 
-       redraw= 0;
-       for (p= snode->edittree->nodes.first; p; p= p->next) {
+       redraw = 0;
+       for (p = snode->edittree->nodes.first; p; p = p->next) {
                if (p->type != nac->type && p->flag & SELECT) {
                        /* if it's selected but different type, unselect */
-                       redraw= 1;
+                       redraw = 1;
                        node_deselect(p);
                }
                else if (p->type == nac->type && (!(p->flag & SELECT))) {
                        /* if it's the same type and is not selected, select! */
-                       redraw= 1;
+                       redraw = 1;
                        node_select(p);
                }
        }
@@ -265,7 +265,7 @@ int node_select_same_type_np(SpaceNode *snode, int dir)
        bNode *nac, *p, *tnode;
 
        /* search the active one. */
-       for (nac= snode->edittree->nodes.first; nac; nac= nac->next) {
+       for (nac = snode->edittree->nodes.first; nac; nac = nac->next) {
                if (nac->flag & SELECT)
                        break;
        }
@@ -275,9 +275,9 @@ int node_select_same_type_np(SpaceNode *snode, int dir)
                return(0);
 
        if (dir == 0)
-               p= nac->next;
+               p = nac->next;
        else
-               p= nac->prev;
+               p = nac->prev;
 
        while (p) {
                /* Now search the next with the same type. */
@@ -285,14 +285,14 @@ int node_select_same_type_np(SpaceNode *snode, int dir)
                        break;
 
                if (dir == 0)
-                       p= p->next;
+                       p = p->next;
                else
-                       p= p->prev;
+                       p = p->prev;
        }
 
        if (p) {
-               for (tnode=snode->edittree->nodes.first; tnode; tnode=tnode->next)
-                       if (tnode!=p)
+               for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next)
+                       if (tnode != p)
                                node_deselect(tnode);
                node_select(p);
                return(1);
@@ -302,12 +302,12 @@ int node_select_same_type_np(SpaceNode *snode, int dir)
 
 void node_select_single(bContext *C, bNode *node)
 {
-       Main *bmain= CTX_data_main(C);
-       SpaceNode *snode= CTX_wm_space_node(C);
+       Main *bmain = CTX_data_main(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        bNode *tnode;
        
-       for (tnode=snode->edittree->nodes.first; tnode; tnode=tnode->next)
-               if (tnode!=node)
+       for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next)
+               if (tnode != node)
                        node_deselect(tnode);
        node_select(node);
        
@@ -315,7 +315,7 @@ void node_select_single(bContext *C, bNode *node)
        
        ED_node_sort(snode->edittree);
        
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
 }
 
 /* ****** Click Select ****** */
@@ -350,7 +350,7 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
                                 * allows selecting outputs from different nodes though.
                                 */
                                if (node) {
-                                       for (tsock=node->outputs.first; tsock; tsock=tsock->next)
+                                       for (tsock = node->outputs.first; tsock; tsock = tsock->next)
                                                node_socket_deselect(node, tsock, 1);
                                }
                                node_socket_select(node, sock);
@@ -377,13 +377,13 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
                        }
                }
        }
-       else {  /* extend==0 */
+       else {  /* extend==0 */
                
                /* find the closest visible node */
                node = node_under_mouse_select(snode->edittree, mx, my);
                
                if (node) {
-                       for (tnode=snode->edittree->nodes.first; tnode; tnode=tnode->next)
+                       for (tnode = snode->edittree->nodes.first; tnode; tnode = tnode->next)
                                node_deselect(tnode);
                        node_select(node);
                        ED_node_set_active(bmain, snode->edittree, node);
@@ -400,9 +400,9 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
 
 static int node_select_exec(bContext *C, wmOperator *op)
 {
-       Main *bmain= CTX_data_main(C);
-       SpaceNode *snode= CTX_wm_space_node(C);
-       ARegion *ar= CTX_wm_region(C);
+       Main *bmain = CTX_data_main(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
+       ARegion *ar = CTX_wm_region(C);
        int mval[2];
        short extend;
        
@@ -415,14 +415,14 @@ static int node_select_exec(bContext *C, wmOperator *op)
        /* perform the select */
        if (node_mouse_select(bmain, snode, ar, mval, extend)) {
                /* send notifiers */
-               WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+               WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
                
                /* allow tweak event to work too */
-               return OPERATOR_FINISHED|OPERATOR_PASS_THROUGH;
+               return OPERATOR_FINISHED | OPERATOR_PASS_THROUGH;
        }
        else {
                /* allow tweak event to work too */
-               return OPERATOR_CANCELLED|OPERATOR_PASS_THROUGH;
+               return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH;
        }
 }
 
@@ -447,7 +447,7 @@ void NODE_OT_select(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
        /* properties */
        RNA_def_int(ot->srna, "mouse_x", 0, INT_MIN, INT_MAX, "Mouse X", "", INT_MIN, INT_MAX);
@@ -459,13 +459,13 @@ void NODE_OT_select(wmOperatorType *ot)
 
 static int node_borderselect_exec(bContext *C, wmOperator *op)
 {
-       SpaceNode *snode= CTX_wm_space_node(C);
-       ARegion *ar= CTX_wm_region(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
+       ARegion *ar = CTX_wm_region(C);
        bNode *node;
        rcti rect;
        rctf rectf;
-       int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
-       int extend= RNA_boolean_get(op->ptr, "extend");
+       int gesture_mode = RNA_int_get(op->ptr, "gesture_mode");
+       int extend = RNA_boolean_get(op->ptr, "extend");
        
        rect.xmin = RNA_int_get(op->ptr, "xmin");
        rect.ymin = RNA_int_get(op->ptr, "ymin");
@@ -475,9 +475,9 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
        rect.ymax = RNA_int_get(op->ptr, "ymax");
        UI_view2d_region_to_view(&ar->v2d, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
        
-       for (node= snode->edittree->nodes.first; node; node= node->next) {
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
                if (BLI_rctf_isect(&rectf, &node->totr, NULL)) {
-                       if (gesture_mode==GESTURE_MODAL_SELECT)
+                       if (gesture_mode == GESTURE_MODAL_SELECT)
                                node_select(node);
                        else
                                node_deselect(node);
@@ -489,7 +489,7 @@ static int node_borderselect_exec(bContext *C, wmOperator *op)
        
        ED_node_sort(snode->edittree);
        
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -501,14 +501,14 @@ static int node_border_select_invoke(bContext *C, wmOperator *op, wmEvent *event
        if (tweak) {
                /* prevent initiating the border select if the mouse is over a node */
                /* this allows border select on empty space, but drag-translate on nodes */
-               SpaceNode *snode= CTX_wm_space_node(C);
-               ARegion *ar= CTX_wm_region(C);
+               SpaceNode *snode = CTX_wm_space_node(C);
+               ARegion *ar = CTX_wm_region(C);
                float mx, my;
 
                UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &mx, &my);
                
                if (node_under_mouse_tweak(snode->edittree, mx, my))
-                       return OPERATOR_CANCELLED|OPERATOR_PASS_THROUGH;
+                       return OPERATOR_CANCELLED | OPERATOR_PASS_THROUGH;
        }
        
        return WM_border_select_invoke(C, op, event);
@@ -530,7 +530,7 @@ void NODE_OT_select_border(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
        /* rna */
        WM_operator_properties_gesture_border(ot, TRUE);
@@ -569,7 +569,7 @@ static int node_select_all_exec(bContext *C, wmOperator *op)
 
        ED_node_sort(snode->edittree);
        
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -585,7 +585,7 @@ void NODE_OT_select_all(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
        WM_operator_properties_select_all(ot);
 }
@@ -598,22 +598,22 @@ static int node_select_linked_to_exec(bContext *C, wmOperator *UNUSED(op))
        bNodeLink *link;
        bNode *node;
        
-       for (node=snode->edittree->nodes.first; node; node=node->next)
+       for (node = snode->edittree->nodes.first; node; node = node->next)
                node->flag &= ~NODE_TEST;
 
-       for (link=snode->edittree->links.first; link; link=link->next) {
+       for (link = snode->edittree->links.first; link; link = link->next) {
                if (link->fromnode && link->tonode && (link->fromnode->flag & NODE_SELECT))
                        link->tonode->flag |= NODE_TEST;
        }
        
-       for (node=snode->edittree->nodes.first; node; node=node->next) {
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
                if (node->flag & NODE_TEST)
                        node_select(node);
        }
        
        ED_node_sort(snode->edittree);
        
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -629,7 +629,7 @@ void NODE_OT_select_linked_to(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
 /* ****** Select Linked From ****** */
@@ -640,22 +640,22 @@ static int node_select_linked_from_exec(bContext *C, wmOperator *UNUSED(op))
        bNodeLink *link;
        bNode *node;
        
-       for (node=snode->edittree->nodes.first; node; node=node->next)
+       for (node = snode->edittree->nodes.first; node; node = node->next)
                node->flag &= ~NODE_TEST;
 
-       for (link=snode->edittree->links.first; link; link=link->next) {
+       for (link = snode->edittree->links.first; link; link = link->next) {
                if (link->fromnode && link->tonode && (link->tonode->flag & NODE_SELECT))
                        link->fromnode->flag |= NODE_TEST;
        }
        
-       for (node=snode->edittree->nodes.first; node; node=node->next) {
+       for (node = snode->edittree->nodes.first; node; node = node->next) {
                if (node->flag & NODE_TEST)
                        node_select(node);
        }
        
        ED_node_sort(snode->edittree);
        
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -671,7 +671,7 @@ void NODE_OT_select_linked_from(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
 /* ****** Select Same Type ****** */
@@ -684,7 +684,7 @@ static int node_select_same_type_exec(bContext *C, wmOperator *UNUSED(op))
 
        ED_node_sort(snode->edittree);
 
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -700,7 +700,7 @@ void NODE_OT_select_same_type(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
 /* ****** Select The Next/Prev Node Of The Same Type ****** */
@@ -713,7 +713,7 @@ static int node_select_same_type_next_exec(bContext *C, wmOperator *UNUSED(op))
 
        ED_node_sort(snode->edittree);
 
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
 
        return OPERATOR_FINISHED;
 }
@@ -730,7 +730,7 @@ void NODE_OT_select_same_type_next(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
 static int node_select_same_type_prev_exec(bContext *C, wmOperator *UNUSED(op))
@@ -741,7 +741,7 @@ static int node_select_same_type_prev_exec(bContext *C, wmOperator *UNUSED(op))
 
        ED_node_sort(snode->edittree);
 
-       WM_event_add_notifier(C, NC_NODE|NA_SELECTED, NULL);
+       WM_event_add_notifier(C, NC_NODE | NA_SELECTED, NULL);
        return OPERATOR_FINISHED;
 }
 
@@ -757,5 +757,5 @@ void NODE_OT_select_same_type_prev(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
index 872fd19..0c3a537 100644 (file)
 
 /* **************** View All Operator ************** */
 
-static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNodesnode)
+static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode *snode)
 {
        bNode *node;
        rctf *cur;
        float oldwidth, oldheight, width, height;
-       int first= 1;
+       int first = 1;
        
-       cur= &ar->v2d.cur;
+       cur = &ar->v2d.cur;
        
-       oldwidth= cur->xmax - cur->xmin;
-       oldheight= cur->ymax - cur->ymin;
+       oldwidth = cur->xmax - cur->xmin;
+       oldheight = cur->ymax - cur->ymin;
        
        cur->xmin = cur->ymin = 0.0f;
-       cur->xmax=ar->winx;
-       cur->ymax=ar->winy;
+       cur->xmax = ar->winx;
+       cur->ymax = ar->winy;
        
        if (snode->edittree) {
-               for (node= snode->edittree->nodes.first; node; node= node->next) {
+               for (node = snode->edittree->nodes.first; node; node = node->next) {
                        if (first) {
-                               first= 0;
-                               ar->v2d.cur= node->totr;
+                               first = 0;
+                               ar->v2d.cur = node->totr;
                        }
                        else {
                                BLI_rctf_union(cur, &node->totr);
@@ -88,33 +88,33 @@ static void snode_home(ScrArea *UNUSED(sa), ARegion *ar, SpaceNode* snode)
                }
        }
        
-       snode->xof= 0;
-       snode->yof= 0;
-       width= cur->xmax - cur->xmin;
-       height= cur->ymax- cur->ymin;
+       snode->xof = 0;
+       snode->yof = 0;
+       width = cur->xmax - cur->xmin;
+       height = cur->ymax - cur->ymin;
 
        if (width > height) {
                float newheight;
-               newheight= oldheight * width/oldwidth;
-               cur->ymin = cur->ymin - newheight/4;
-               cur->ymax = cur->ymax + newheight/4;
+               newheight = oldheight * width / oldwidth;
+               cur->ymin = cur->ymin - newheight / 4;
+               cur->ymax = cur->ymax + newheight / 4;
        }
        else {
                float newwidth;
-               newwidth= oldwidth * height/oldheight;
-               cur->xmin = cur->xmin - newwidth/4;
-               cur->xmax = cur->xmax + newwidth/4;
+               newwidth = oldwidth * height / oldheight;
+               cur->xmin = cur->xmin - newwidth / 4;
+               cur->xmax = cur->xmax + newwidth / 4;
        }
 
-       ar->v2d.tot= ar->v2d.cur;
+       ar->v2d.tot = ar->v2d.cur;
        UI_view2d_curRect_validate(&ar->v2d);
 }
 
 static int node_view_all_exec(bContext *C, wmOperator *UNUSED(op))
 {
-       ScrArea *sa= CTX_wm_area(C);
-       ARegion *ar= CTX_wm_region(C);
-       SpaceNode *snode= CTX_wm_space_node(C);
+       ScrArea *sa = CTX_wm_area(C);
+       ARegion *ar = CTX_wm_region(C);
+       SpaceNode *snode = CTX_wm_space_node(C);
        
        snode_home(sa, ar, snode);
        ED_region_tag_redraw(ar);
@@ -134,7 +134,7 @@ void NODE_OT_view_all(wmOperatorType *ot)
        ot->poll = ED_operator_node_active;
        
        /* flags */
-       ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+       ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 }
 
 
index 26bedd1..c52f4ca 100644 (file)
@@ -613,7 +613,8 @@ void SEQUENCER_OT_movie_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
        RNA_def_boolean(ot->srna, "sound", TRUE, "Sound", "Load sound with the movie");
 }
@@ -667,7 +668,8 @@ void SEQUENCER_OT_sound_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | SOUNDFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME);
        RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory");
 }
@@ -772,7 +774,8 @@ void SEQUENCER_OT_image_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME);
 }
 
@@ -928,7 +931,8 @@ void SEQUENCER_OT_effect_strip_add(struct wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
        
-       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, 0, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH | WM_FILESEL_RELPATH, FILE_DEFAULTDISPLAY);
        sequencer_generic_props__internal(ot, SEQPROP_STARTFRAME | SEQPROP_ENDFRAME);
        RNA_def_enum(ot->srna, "type", sequencer_prop_effect_types, SEQ_TYPE_CROSS, "Type", "Sequencer effect type");
        RNA_def_float_vector(ot->srna, "color", 3, NULL, 0.0f, 1.0f, "Color", "Initialize the strip with this color (only used when type='COLOR')", 0.0f, 1.0f);
index 4034c9f..16a83cb 100644 (file)
@@ -3074,6 +3074,8 @@ void SEQUENCER_OT_change_path(struct wmOperatorType *ot)
        /* flags */
        ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
 
-       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILEPATH | WM_FILESEL_FILES, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | IMAGEFILE | MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_DIRECTORY | WM_FILESEL_RELPATH | WM_FILESEL_FILEPATH | WM_FILESEL_FILES,
+                                      FILE_DEFAULTDISPLAY);
 }
 
index 1eba2de..df90ce2 100644 (file)
@@ -310,7 +310,8 @@ void TEXT_OT_open(wmOperatorType *ot)
        ot->flag = OPTYPE_UNDO;
        
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE | PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);  //XXX TODO, relative_path
+       WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE | PYSCRIPTFILE, FILE_SPECIAL, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);  //XXX TODO, relative_path
        RNA_def_boolean(ot->srna, "internal", 0, "Make internal", "Make text file internal after loading");
 }
 
@@ -570,7 +571,8 @@ void TEXT_OT_save_as(wmOperatorType *ot)
        ot->poll = text_edit_poll;
 
        /* properties */
-       WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE | PYSCRIPTFILE, FILE_SPECIAL, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);  //XXX TODO, relative_path
+       WM_operator_properties_filesel(ot, FOLDERFILE | TEXTFILE | PYSCRIPTFILE, FILE_SPECIAL, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);  //XXX TODO, relative_path
 }
 
 /******************* run script operator *********************/
index dcb6407..78495f9 100644 (file)
@@ -1862,9 +1862,9 @@ static void WM_OT_link_append(wmOperatorType *ot)
        ot->flag |= OPTYPE_UNDO;
 
        WM_operator_properties_filesel(
-           ot, FOLDERFILE | BLENDERFILE, FILE_LOADLIB, FILE_OPENFILE,
-           WM_FILESEL_FILEPATH | WM_FILESEL_DIRECTORY | WM_FILESEL_FILENAME | WM_FILESEL_RELPATH | WM_FILESEL_FILES,
-           FILE_DEFAULTDISPLAY);
+               ot, FOLDERFILE | BLENDERFILE, FILE_LOADLIB, FILE_OPENFILE,
+               WM_FILESEL_FILEPATH | WM_FILESEL_DIRECTORY | WM_FILESEL_FILENAME | WM_FILESEL_RELPATH | WM_FILESEL_FILES,
+               FILE_DEFAULTDISPLAY);
        
        RNA_def_boolean(ot->srna, "link", 1, "Link", "Link the objects or datablocks rather than appending");
        RNA_def_boolean(ot->srna, "autoselect", 1, "Select", "Select the linked objects");
@@ -1945,7 +1945,8 @@ static void WM_OT_recover_auto_save(wmOperatorType *ot)
        ot->invoke = wm_recover_auto_save_invoke;
        ot->poll = WM_operator_winactive;
 
-       WM_operator_properties_filesel(ot, BLENDERFILE, FILE_BLENDER, FILE_OPENFILE, WM_FILESEL_FILEPATH, FILE_LONGDISPLAY);
+       WM_operator_properties_filesel(ot, BLENDERFILE, FILE_BLENDER, FILE_OPENFILE,
+                                      WM_FILESEL_FILEPATH, FILE_LONGDISPLAY);
 }
 
 /* *************** save file as **************** */
@@ -2065,8 +2066,8 @@ static void WM_OT_save_as_mainfile(wmOperatorType *ot)
        ot->check = blend_save_check;
        /* ommit window poll so this can work in background mode */
 
-       WM_operator_properties_filesel(ot, FOLDERFILE | BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH,
-                                      FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | BLENDERFILE, FILE_BLENDER, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
        RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
        RNA_def_boolean(ot->srna, "relative_remap", 1, "Remap Relative",
                        "Remap relative paths when saving in a different directory");
@@ -2137,7 +2138,8 @@ static void WM_OT_save_mainfile(wmOperatorType *ot)
        ot->check = blend_save_check;
        /* ommit window poll so this can work in background mode */
        
-       WM_operator_properties_filesel(ot, FOLDERFILE | BLENDERFILE, FILE_BLENDER, FILE_SAVE, WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
+       WM_operator_properties_filesel(ot, FOLDERFILE | BLENDERFILE, FILE_BLENDER, FILE_SAVE,
+                                      WM_FILESEL_FILEPATH, FILE_DEFAULTDISPLAY);
        RNA_def_boolean(ot->srna, "compress", 0, "Compress", "Write compressed .blend file");
        RNA_def_boolean(ot->srna, "relative_remap", 0, "Remap Relative", "Remap relative paths when saving in a different directory");
 }