svn merge ^/trunk/blender -r49644:49653
authorCampbell Barton <ideasman42@gmail.com>
Tue, 7 Aug 2012 13:38:35 +0000 (13:38 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Tue, 7 Aug 2012 13:38:35 +0000 (13:38 +0000)
CMakeLists.txt
intern/cycles/kernel/kernel_types.h
source/blender/blenkernel/intern/particle.c
source/blender/editors/mask/mask_draw.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/python/intern/bpy_props.c

index 194be8682cd87878d071123cf2b3faaba995b0d6..f01c625af10f72bd5359e1a8cc1953fb3b72d7c9 100644 (file)
@@ -1523,9 +1523,14 @@ endif()
 
 
 # set the endian define
-if(MSVC OR ${XCODE_VERSION} VERSION_GREATER 4.3) # no more ppc support in xcode > 4.3
+if(MSVC)
        # for some reason this fails on msvc
        add_definitions(-D__LITTLE_ENDIAN__)
+elseif(APPLE)
+       if (${XCODE_VERSION} VERSION_GREATER 4.3)
+               # no more ppc support in xcode > 4.3
+               add_definitions(-D__LITTLE_ENDIAN__)
+       endif()
 else()
        include(TestBigEndian)
        test_big_endian(_SYSTEM_BIG_ENDIAN)
index 7eab2176fa6bff983c417e2e02a4acfb4c990eae..30d45ad111895ffa0c295635e3031e80381ca3c7 100644 (file)
@@ -61,12 +61,12 @@ CCL_NAMESPACE_BEGIN
 #endif
 
 #ifdef __KERNEL_OPENCL_APPLE__
-#define __SVM__
-#define __EMISSION__
-#define __IMAGE_TEXTURES__
-#define __HOLDOUT__
-#define __PROCEDURAL_TEXTURES__
-#define __EXTRA_NODES__
+//#define __SVM__
+//#define __EMISSION__
+//#define __IMAGE_TEXTURES__
+//#define __HOLDOUT__
+//#define __PROCEDURAL_TEXTURES__
+//#define __EXTRA_NODES__
 #endif
 
 #ifdef __KERNEL_OPENCL_AMD__
index c8b07e2ec1110052cfeae126a881a55aca6a2198..ac0625d1bade33b43dba34ceffded629d1c66df8 100644 (file)
@@ -3876,7 +3876,10 @@ void psys_get_texture(ParticleSimulationData *sim, ParticleData *pa, ParticleTex
                                case TEXCO_PARTICLE:
                                        /* texture coordinates in range [-1, 1] */
                                        texvec[0] = 2.f * (cfra - pa->time) / (pa->dietime - pa->time) - 1.f;
-                                       texvec[1] = 0.f;
+                                       if (sim->psys->totpart > 0)
+                                               texvec[1] = 2.f * (float)(pa - sim->psys->particles) / (float)sim->psys->totpart - 1.f;
+                                       else
+                                               texvec[1] = 0.0f;
                                        texvec[2] = 0.f;
                                        break;
                        }
index 2f5a918a488746904a29445a43277fa4982f2671..703ae70eb0f7dbc99d155a5781ddc0ee2b261a62 100644 (file)
@@ -368,6 +368,7 @@ static void draw_spline_curve(MaskLayer *masklay, MaskSpline *spline,
 
        const short is_spline_sel = (spline->flag & SELECT) && (masklay->restrictflag & MASK_RESTRICT_SELECT) == 0;
        const short is_smooth = (draw_flag & MASK_DRAWFLAG_SMOOTH);
+       const short is_fill = (spline->flag & MASK_SPLINE_NOFILL) == 0;
 
        int tot_diff_point;
        float (*diff_points)[2];
@@ -394,7 +395,25 @@ static void draw_spline_curve(MaskLayer *masklay, MaskSpline *spline,
                             TRUE, is_smooth, is_active,
                             rgb_tmp, draw_type);
 
-       /* TODO, draw mirror values when MASK_SPLINE_NOFILL is set */
+       if (!is_fill) {
+
+               float *fp         = &diff_points[0][0];
+               float *fp_feather = &feather_points[0][0];
+               float tvec[2];
+               int i;
+
+               BLI_assert(tot_diff_point == tot_feather_point);
+
+               for (i = 0; i < tot_diff_point; i++, fp += 2, fp_feather += 2) {
+                       sub_v2_v2v2(tvec, fp, fp_feather);
+                       add_v2_v2v2(fp_feather, fp, tvec);
+               }
+
+               /* same as above */
+               mask_draw_curve_type(spline, feather_points, tot_feather_point,
+                                    TRUE, is_smooth, is_active,
+                                    rgb_tmp, draw_type);
+       }
 
        MEM_freeN(feather_points);
 
index 4d636e64430257d12cd73dcf3bccd059cb3edf51..229bbdbefb73e701146a5b1fbe73df743275bd5f 100644 (file)
@@ -339,14 +339,13 @@ static KnifeVert *get_bm_knife_vert(KnifeTool_OpData *kcd, BMVert *v)
        return kfv;
 }
 
-/**
- * get a KnifeEdge wrapper for an existing BMEdge
- * \note #knife_get_face_kedges / #get_bm_knife_edge are called recursively - KEEP STACK MEM USAGE LOW */
+/* get a KnifeEdge wrapper for an existing BMEdge */
 static KnifeEdge *get_bm_knife_edge(KnifeTool_OpData *kcd, BMEdge *e)
 {
        KnifeEdge *kfe = BLI_ghash_lookup(kcd->origedgemap, e);
        if (!kfe) {
-               BMLoop *l_iter, *l_first;
+               BMIter bmiter;
+               BMFace *f;
 
                kfe = new_knife_edge(kcd);
                kfe->e = e;
@@ -357,17 +356,9 @@ static KnifeEdge *get_bm_knife_edge(KnifeTool_OpData *kcd, BMEdge *e)
 
                BLI_ghash_insert(kcd->origedgemap, e, kfe);
 
-               /* avoid BM_ITER because of stack memory usage
-                * otherwise we could use BM_FACES_OF_EDGE */
-               l_iter = l_first = e->l;
-               do {
-                       knife_append_list(kcd, &kfe->faces, l_iter->f);
-
-                       /* ensures the kedges lst for this f is initialized,
-                        * it automatically adds kfe by itself */
-                       knife_get_face_kedges(kcd, l_iter->f);
-
-               } while ((l_iter = l_iter->radial_next) != l_first);
+               BM_ITER_ELEM(f, &bmiter, e, BM_FACES_OF_EDGE) {
+                       knife_append_list(kcd, &kfe->faces, f);
+               }
        }
 
        return kfe;
@@ -397,23 +388,19 @@ static void knife_start_cut(KnifeTool_OpData *kcd)
        }
 }
 
-/**
- * \note #knife_get_face_kedges / #get_bm_knife_edge are called recursively - KEEP STACK MEM USAGE LOW */
 static ListBase *knife_get_face_kedges(KnifeTool_OpData *kcd, BMFace *f)
 {
        ListBase *lst = BLI_ghash_lookup(kcd->kedgefacemap, f);
 
        if (!lst) {
-               BMLoop *l_iter, *l_first;
+               BMIter bmiter;
+               BMEdge *e;
 
                lst = knife_empty_list(kcd);
 
-               /* avoid BM_ITER because of stack memory usage
-                * otherwise we could use BM_EDGES_OF_FACE */
-               l_iter = l_first = BM_FACE_FIRST_LOOP(f);
-               do {
-                       knife_append_list(kcd, lst, get_bm_knife_edge(kcd, l_iter->e));
-               } while ((l_iter = l_iter->next) != l_first);
+               BM_ITER_ELEM(e, &bmiter, f, BM_EDGES_OF_FACE) {
+                       knife_append_list(kcd, lst, get_bm_knife_edge(kcd, e));
+               }
 
                BLI_ghash_insert(kcd->kedgefacemap, f, lst);
        }
index 03fd144f7dd47c591451d7f2cfa880514830da68..0ffdd15df5a67fe1162b7e9df5aa87741030c270 100644 (file)
@@ -3450,7 +3450,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
        StructRNA *srna;
        
        static EnumPropertyItem anim_player_presets[] = {
-               {0, "INTERNAL", 0, "Internal", "Built-in animation player"}, /* doesn't work yet! */
+               {0, "INTERNAL", 0, "Internal", "Built-in animation player"},
                {1, "BLENDER24", 0, "Blender 2.4", "Blender command line animation playback - path to Blender 2.4"},
                {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"},
                {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"},
index f9c39ad24b0e8e3029972f304831fa05c4fac95d..abf609cd23542e01e78540badd7399048f23f744 100644 (file)
@@ -1327,7 +1327,7 @@ static PyObject *BPy_EnumProperty(PyObject *self, PyObject *args, PyObject *kw)
 
                if (is_itemf == FALSE) {
                        /* note: this must be postponed until after #RNA_def_property_duplicate_pointers
-                        * otherwise if this is a generator it may free the strings before we get copy them */
+                        * otherwise if this is a generator it may free the strings before we copy them */
                        Py_DECREF(items_fast);
 
                        MEM_freeN(eitems);