Merging r48992 through r48995 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 17 Jul 2012 10:46:32 +0000 (10:46 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 17 Jul 2012 10:46:32 +0000 (10:46 +0000)
source/blender/blenkernel/intern/mask.c
source/blender/editors/space_node/CMakeLists.txt
source/blender/editors/space_node/SConscript
source/blender/editors/space_node/node_draw.c
source/blender/windowmanager/CMakeLists.txt
source/blender/windowmanager/SConscript
source/blender/windowmanager/intern/wm_init_exit.c

index c92a811243206e8edc7598993b1a4c64ec4221b9..d345ba581720bf4763b210f43e2d9f390e580071 100644 (file)
@@ -524,6 +524,14 @@ static void spline_feather_collapse_inner_loops(float (*feather_points)[2], int
        int i;
        float min[2], max[2];
 
+       if (tot_feather_point < 4) {
+               /* self-intersection works only for quads at least,
+                * in other cases polygon can't be self-intersecting anyway
+                */
+
+               return;
+       }
+
        /* find min/max corners of mask to build buckets in that space */
        INIT_MINMAX2(min, max);
 
index 9c48ce4034d71c712ef064974db0c637f2363b1a..2d926a50f988c96b3cf8093479162bfed1f521ff 100644 (file)
@@ -59,4 +59,8 @@ if(WITH_INTERNATIONAL)
        add_definitions(-DWITH_INTERNATIONAL)
 endif()
 
+if(WITH_COMPOSITOR)
+       add_definitions(-DWITH_COMPOSITOR)
+endif()
+
 blender_add_lib(bf_editor_space_node "${SRC}" "${INC}" "${INC_SYS}")
index 4c6e94484e4f88fde468a5c2e066bff0fb18b401..7e311b1329d7ca5fb1ec802683e850b0c2ea16e7 100644 (file)
@@ -25,4 +25,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', '
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
+if env['WITH_BF_COMPOSITOR']:
+    defs.append("WITH_COMPOSITOR")
+
 env.BlenderLib ( 'bf_editors_space_node', sources, Split(incs), defs, libtype=['core'], priority=[55], compileflags=cf )
index 57ce303313be05914e820a8741e879cc4328c010..4a0bbe7910068b0e6a89daedba37dc3f24786123 100644 (file)
@@ -721,11 +721,14 @@ static void node_draw_basis(const bContext *C, ARegion *ar, SpaceNode *snode, bN
        if (node->flag & NODE_MUTED)
                UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
 
+#ifdef WITH_COMPOSITOR
        if (ntree->type == NTREE_COMPOSIT && (snode->flag & SNODE_SHOW_HIGHLIGHT)) {
                if (COM_isHighlightedbNode(node)) {
                        UI_ThemeColorBlend(color_id, TH_ACTIVE, 0.5f);
                }
        }
+#endif
+
        uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
        uiRoundBox(rct->xmin, rct->ymax - NODE_DY, rct->xmax, rct->ymax, BASIS_RAD);
        
@@ -885,11 +888,15 @@ static void node_draw_hidden(const bContext *C, ARegion *ar, SpaceNode *snode, b
        if (node->flag & NODE_MUTED)
                UI_ThemeColorBlend(color_id, TH_REDALERT, 0.5f);
 
+#ifdef WITH_COMPOSITOR
        if (ntree->type == NTREE_COMPOSIT && (snode->flag & SNODE_SHOW_HIGHLIGHT)) {
                if (COM_isHighlightedbNode(node)) {
                        UI_ThemeColorBlend(color_id, TH_ACTIVE, 0.5f);
                }
        }
+#else
+       (void)ntree;
+#endif
        
        uiRoundBox(rct->xmin, rct->ymin, rct->xmax, rct->ymax, hiddenrad);
        
@@ -1136,9 +1143,13 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d)
                }
                
                node_update_nodetree(C, snode->nodetree, 0.0f, 0.0f);
+
+#ifdef WITH_COMPOSITOR
                if (snode->nodetree->type == NTREE_COMPOSIT) {
                        COM_startReadHighlights();
                } 
+#endif
+
                node_draw_nodetree(C, ar, snode, snode->nodetree);
                
                #if 0
index 8fbd345bfd231c1a36bfd68adb43bbf9f2423a8f..f44ec2f5dc8b0fbd255ff455328c2b52c9297369 100644 (file)
@@ -144,4 +144,8 @@ if(WIN322)
        )
 endif()
 
+if(WITH_COMPOSITOR)
+       add_definitions(-DWITH_COMPOSITOR)
+endif()
+
 blender_add_lib_nolist(bf_windowmanager "${SRC}" "${INC}" "${INC_SYS}")
index 57d632c7d042693c1bd6c422100de16925c514e2..bf219bb9c06db11e8b44c8e813a3fac5e1cd23a6 100644 (file)
@@ -43,4 +43,7 @@ if env['BF_BUILDINFO']:
 if env['WITH_BF_INTERNATIONAL']:
     defs.append('WITH_INTERNATIONAL')
 
+if env['WITH_BF_COMPOSITOR']:
+    defs.append("WITH_COMPOSITOR")
+
 env.BlenderLib ( 'bf_windowmanager', sources, Split(incs), defines=defs, libtype=['core'], priority=[5] )
index 5e3d5acfe868e6d75c4163097b73215531155e14..18c9866da93a9f97dc8194d5e691bb9c56e31f17 100644 (file)
@@ -206,11 +206,13 @@ void WM_init(bContext *C, int argc, const char **argv)
 
        BLI_strncpy(G.lib, G.main->name, FILE_MAX);
 
+#ifdef WITH_COMPOSITOR
        if (1) {
                extern void *COM_linker_hack;
                extern void *COM_execute;
                COM_linker_hack = COM_execute;
        }
+#endif
 }
 
 void WM_init_splash(bContext *C)