svn merge ^/trunk/blender -r49644:49653

This commit is contained in:
Campbell Barton
2012-08-07 13:38:35 +00:00
7 changed files with 49 additions and 35 deletions

View 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)

View 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__

View 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;
}

View 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);

View 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);
}

View 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"},

View 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);