From de7592b48900221844fa8d687e9d850294c90746 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 10 Jul 2011 17:04:56 +0000 Subject: Fix for [#26873] Animated displacement modifier on an object doesn't work with hair particle objects * Noise is now considered an animated texture as it changes with every frame * Converted a few places in particles code to use the particle system's own random table instead of BLI_frand. --- source/blender/blenkernel/intern/boids.c | 6 +++--- source/blender/blenkernel/intern/particle.c | 2 -- source/blender/blenkernel/intern/particle_system.c | 5 ----- source/blender/blenkernel/intern/texture.c | 4 ++++ 4 files changed, 7 insertions(+), 10 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/boids.c b/source/blender/blenkernel/intern/boids.c index 9f808704eee..a0f38e675f9 100644 --- a/source/blender/blenkernel/intern/boids.c +++ b/source/blender/blenkernel/intern/boids.c @@ -937,6 +937,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa) BoidValues val; BoidState *state = get_boid_state(boids, pa); BoidParticle *bpa = pa->boid; + ParticleSystem *psys = bbd->sim->psys; int rand; //BoidCondition *cond; @@ -959,9 +960,8 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa) bbd->wanted_co[0]=bbd->wanted_co[1]=bbd->wanted_co[2]=bbd->wanted_speed=0.0f; /* create random seed for every particle & frame */ - BLI_srandom(bbd->sim->psys->seed + p); - rand = BLI_rand(); - BLI_srandom((int)bbd->cfra + rand); + rand = (int)(PSYS_FRAND(psys->seed + p) * 1000); + rand = (int)(PSYS_FRAND((int)bbd->cfra + rand) * 1000); set_boid_values(&val, bbd->part->boids, pa); diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 72c92eed312..5e615a28eb2 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2889,8 +2889,6 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) if(psys_in_edit_mode(sim->scene, psys)) if(psys->renderdata==0 && (psys->edit==NULL || pset->flag & PE_DRAW_PART)==0) return; - - BLI_srandom(psys->seed); keyed = psys->flag & PSYS_KEYED; baked = psys->pointcache->mem_cache.first && psys->part->type != PART_HAIR; diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index b2e5c059edf..50f39704488 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3514,8 +3514,6 @@ static void hair_step(ParticleSimulationData *sim, float cfra) PARTICLE_P; float disp = (float)psys_get_current_display_percentage(psys)/100.0f; - BLI_srandom(psys->seed); - LOOP_PARTICLES { if(PSYS_FRAND(p) > disp) pa->flag |= PARS_NO_DISP; @@ -3801,8 +3799,6 @@ static void cached_step(ParticleSimulationData *sim, float cfra) PARTICLE_P; float disp, dietime; - BLI_srandom(psys->seed); - psys_update_effectors(sim); disp= (float)psys_get_current_display_percentage(psys)/100.0f; @@ -4054,7 +4050,6 @@ static void system_step(ParticleSimulationData *sim, float cfra) /* set particles to be not calculated TODO: can't work with pointcache */ disp= (float)psys_get_current_display_percentage(psys)/100.0f; - BLI_srandom(psys->seed); LOOP_PARTICLES { if(PSYS_FRAND(p) > disp) pa->flag |= PARS_NO_DISP; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 64f3c111434..036ba34d0c8 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -1486,6 +1486,10 @@ int BKE_texture_dependsOnTime(const struct Tex *texture) // assume anything in adt means the texture is animated return 1; } + else if(texture->type == TEX_NOISE) { + // noise always varies with time + return 1; + } return 0; } -- cgit v1.2.3 From 2fb4a37baaac6c7045ea0d7ace2826f1112714c5 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 10 Jul 2011 17:30:31 +0000 Subject: Fix for [#27289] Hair: Render Option - Object does not point objects to end of "hair path" * Objects are now always rotated in the directions of the hair paths * Secondary fix: particle size wasn't updated for hair particles, so dupliobject size couldn't be change after the hair was edited --- source/blender/blenkernel/intern/particle.c | 75 +++++++++------------- source/blender/blenkernel/intern/particle_system.c | 6 +- 2 files changed, 36 insertions(+), 45 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 5e615a28eb2..5995b895061 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -4372,58 +4372,45 @@ void psys_get_dupli_path_transform(ParticleSimulationData *sim, ParticleData *pa Object *ob = sim->ob; ParticleSystem *psys = sim->psys; ParticleSystemModifierData *psmd = sim->psmd; - float loc[3], nor[3], vec[3], side[3], len, obrotmat[4][4], qmat[4][4]; - float xvec[3] = {-1.0, 0.0, 0.0}, q[4], nmat[3][3]; + float loc[3], nor[3], vec[3], side[3], len; + float xvec[3] = {-1.0, 0.0, 0.0}, nmat[3][3]; sub_v3_v3v3(vec, (cache+cache->steps)->co, cache->co); len= normalize_v3(vec); - if(psys->part->rotmode) { - if(pa == NULL) - pa= psys->particles+cpa->pa[0]; + if(pa == NULL && psys->part->childflat != PART_CHILD_FACES) + pa = psys->particles + cpa->pa[0]; - vec_to_quat( q,xvec, ob->trackflag, ob->upflag); - quat_to_mat4( obrotmat,q); - obrotmat[3][3]= 1.0f; - - quat_to_mat4( qmat,pa->state.rot); - mul_m4_m4m4(mat, obrotmat, qmat); - } - else { - if(pa == NULL && psys->part->childflat != PART_CHILD_FACES) - pa = psys->particles + cpa->pa[0]; - - if(pa) - psys_particle_on_emitter(psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,nor,0,0,0,0); - else - psys_particle_on_emitter(psmd,PART_FROM_FACE,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,loc,nor,0,0,0,0); + if(pa) + psys_particle_on_emitter(psmd,sim->psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,loc,nor,0,0,0,0); + else + psys_particle_on_emitter(psmd,PART_FROM_FACE,cpa->num,DMCACHE_ISCHILD,cpa->fuv,cpa->foffset,loc,nor,0,0,0,0); - copy_m3_m4(nmat, ob->imat); - transpose_m3(nmat); - mul_m3_v3(nmat, nor); - - /* make sure that we get a proper side vector */ - if(fabs(dot_v3v3(nor,vec))>0.999999) { - if(fabs(dot_v3v3(nor,xvec))>0.999999) { - nor[0] = 0.0f; - nor[1] = 1.0f; - nor[2] = 0.0f; - } - else { - nor[0] = 1.0f; - nor[1] = 0.0f; - nor[2] = 0.0f; - } - } - cross_v3_v3v3(side, nor, vec); - normalize_v3(side); - cross_v3_v3v3(nor, vec, side); + copy_m3_m4(nmat, ob->imat); + transpose_m3(nmat); + mul_m3_v3(nmat, nor); - unit_m4(mat); - VECCOPY(mat[0], vec); - VECCOPY(mat[1], side); - VECCOPY(mat[2], nor); + /* make sure that we get a proper side vector */ + if(fabs(dot_v3v3(nor,vec))>0.999999) { + if(fabs(dot_v3v3(nor,xvec))>0.999999) { + nor[0] = 0.0f; + nor[1] = 1.0f; + nor[2] = 0.0f; + } + else { + nor[0] = 1.0f; + nor[1] = 0.0f; + nor[2] = 0.0f; + } } + cross_v3_v3v3(side, nor, vec); + normalize_v3(side); + cross_v3_v3v3(nor, vec, side); + + unit_m4(mat); + VECCOPY(mat[0], vec); + VECCOPY(mat[1], side); + VECCOPY(mat[2], nor); *scale= len; } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 50f39704488..63a9c224971 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3510,11 +3510,15 @@ static void do_hair_dynamics(ParticleSimulationData *sim) static void hair_step(ParticleSimulationData *sim, float cfra) { ParticleSystem *psys = sim->psys; -/* ParticleSettings *part = psys->part; */ + ParticleSettings *part = psys->part; PARTICLE_P; float disp = (float)psys_get_current_display_percentage(psys)/100.0f; LOOP_PARTICLES { + pa->size = part->size; + if(part->randsize > 0.0f) + pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1); + if(PSYS_FRAND(p) > disp) pa->flag |= PARS_NO_DISP; else -- cgit v1.2.3 From 897cbe4b42a31ad7afe6ab3e4e89ac5318eef91a Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 10 Jul 2011 23:49:59 +0000 Subject: Fix for [#27398] Particle systems with animated groups render incorrectly in viewport * Hmph.. depsgraph and group duplication == illogical. --- source/blender/blenkernel/intern/depsgraph.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index c2800410657..d39be9d683c 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -599,7 +599,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O if(part->ren_as == PART_DRAW_GR && part->dup_group) { for(go=part->dup_group->gobject.first; go; go=go->next) { node2 = dag_get_node(dag, go->ob); - dag_add_relation(dag, node, node2, DAG_RL_OB_OB, "Particle Group Visualisation"); + dag_add_relation(dag, node2, node, DAG_RL_OB_OB, "Particle Group Visualisation"); } } -- cgit v1.2.3 From 8ca556a32a1ce2b90881aadfa88239dfb7bb5f9e Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 11 Jul 2011 09:05:10 +0000 Subject: Fix #27921: optimal display with 2 subsurf modifiers fails. --- source/blender/blenkernel/intern/subsurf_ccg.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index a66caf8879f..67d7e7bffd6 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -1176,7 +1176,8 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw CCGSubSurf *ss = ccgdm->ss; CCGEdgeIterator *ei = ccgSubSurf_getEdgeIterator(ss); CCGFaceIterator *fi = ccgSubSurf_getFaceIterator(ss); - int i, edgeSize = ccgSubSurf_getEdgeSize(ss); + int i, j, edgeSize = ccgSubSurf_getEdgeSize(ss); + int totedge = ccgSubSurf_getNumEdges(ss); int gridSize = ccgSubSurf_getGridSize(ss); int useAging; @@ -1184,13 +1185,16 @@ static void ccgDM_drawEdges(DerivedMesh *dm, int drawLooseEdges, int UNUSED(draw ccgSubSurf_getUseAgeCounts(ss, &useAging, NULL, NULL, NULL); - for (; !ccgEdgeIterator_isStopped(ei); ccgEdgeIterator_next(ei)) { - CCGEdge *e = ccgEdgeIterator_getCurrent(ei); + for (j=0; j< totedge; j++) { + CCGEdge *e = ccgdm->edgeMap[j].edge; DMGridData *edgeData = ccgSubSurf_getEdgeDataArray(ss, e); if (!drawLooseEdges && !ccgSubSurf_getEdgeNumFaces(e)) continue; + if(ccgdm->edgeFlags && !(ccgdm->edgeFlags[j] & ME_EDGEDRAW)) + continue; + if (useAging && !(G.f&G_BACKBUFSEL)) { int ageCol = 255-ccgSubSurf_getEdgeAge(ss, e)*4; glColor3ub(0, ageCol>0?ageCol:0, 0); -- cgit v1.2.3 From 7dfe34864e019fe08fbdfa62d4dacf158a0602bf Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 11 Jul 2011 09:08:08 +0000 Subject: Fix #27912: crash after mesh.materials.pop(). --- source/blender/blenkernel/intern/material.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c index 2f29074834b..962c7fd5e86 100644 --- a/source/blender/blenkernel/intern/material.c +++ b/source/blender/blenkernel/intern/material.c @@ -550,7 +550,7 @@ Material *material_pop_id(ID *id, int index) Material **mat; if(index + 1 != (*totcol)) - memmove((*matar), (*matar) + 1, (*totcol) - (index + 1)); + memmove((*matar), (*matar) + 1, sizeof(void *) * ((*totcol) - (index + 1))); (*totcol)--; -- cgit v1.2.3 From 5e841e4b4a30bbb242290407740b5ca3afbab972 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Jul 2011 17:24:33 +0000 Subject: fix for animation playback and build error when compiling without WITH_AUDASPACE --- source/blender/blenkernel/intern/sound.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/sound.c b/source/blender/blenkernel/intern/sound.c index f2e3537762f..1c61646a3d8 100644 --- a/source/blender/blenkernel/intern/sound.c +++ b/source/blender/blenkernel/intern/sound.c @@ -36,9 +36,6 @@ #include "BKE_animsys.h" -static int force_device = -1; - - struct bSound* sound_new_file(struct Main *bmain, const char *filename) { bSound* sound = NULL; @@ -94,6 +91,8 @@ void sound_free(struct bSound* sound) #ifdef WITH_AUDASPACE +static int force_device = -1; + #ifdef WITH_JACK static void sound_sync_callback(void* data, int mode, float time) { @@ -537,7 +536,7 @@ void sound_play_scene(struct Scene *UNUSED(scene)) {} void sound_stop_scene(struct Scene *UNUSED(scene)) {} void sound_seek_scene(struct bContext *UNUSED(C)) {} float sound_sync_scene(struct Scene *UNUSED(scene)) { return 0.0f; } -int sound_scene_playing(struct Scene *UNUSED(scene)) { return 0; } +int sound_scene_playing(struct Scene *UNUSED(scene)) { return -1; } int sound_read_sound_buffer(struct bSound* UNUSED(sound), float* UNUSED(buffer), int UNUSED(length), float UNUSED(start), float UNUSED(end)) { return 0; } int sound_get_channels(struct bSound* UNUSED(sound)) { return 1; } -- cgit v1.2.3 From 1fd33b6e777d54a3702e58253dabf94a752783e2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 13 Jul 2011 18:40:21 +0000 Subject: cmake option to build without smoke sim: WITH_MOD_SMOKE --- source/blender/blenkernel/CMakeLists.txt | 4 ++++ source/blender/blenkernel/SConscript | 2 ++ source/blender/blenkernel/intern/pointcache.c | 6 ++++++ source/blender/blenkernel/intern/smoke.c | 17 +++++++++++++++++ 4 files changed, 29 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index a19d48daa75..92c50242e74 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -306,6 +306,10 @@ if(NOT WITH_MOD_FLUID) add_definitions(-DDISABLE_ELBEEM) endif() +if(WITH_MOD_SMOKE) + add_definitions(-DWITH_SMOKE) +endif() + if(WITH_JACK) add_definitions(-DWITH_JACK) endif() diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index b5f845acacb..36afce7946c 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -21,6 +21,8 @@ incs += ' ' + env['BF_ZLIB_INC'] defs = [ 'GLEW_STATIC' ] +defs.append('WITH_SMOKE') # TODO, make optional + if env['WITH_BF_PYTHON']: incs += ' ../python' incs += ' ' + env['BF_PYTHON_INC'] diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 6b92c6e9540..b8f4b2d302f 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -516,6 +516,7 @@ static int ptcache_cloth_totpoint(void *cloth_v, int UNUSED(cfra)) return clmd->clothObject ? clmd->clothObject->numverts : 0; } +#ifdef WITH_SMOKE /* Smoke functions */ static int ptcache_smoke_totpoint(void *smoke_v, int UNUSED(cfra)) { @@ -652,6 +653,11 @@ static void ptcache_smoke_read(PTCacheFile *pf, void *smoke_v) } } } +#else // WITH_SMOKE +static int ptcache_smoke_totpoint(void *UNUSED(smoke_v), int UNUSED(cfra)) { return 0; }; +static void ptcache_smoke_read(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) {} +static int ptcache_smoke_write(PTCacheFile *UNUSED(pf), void *UNUSED(smoke_v)) { return 0; } +#endif // WITH_SMOKE /* Creating ID's */ void BKE_ptcache_id_from_softbody(PTCacheID *pid, Object *ob, SoftBody *sb) diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 4405bce3d51..6ab1574ca80 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -140,6 +140,19 @@ static void fill_scs_points(Object *ob, DerivedMesh *dm, SmokeCollSettings *scs) #define TRI_UVOFFSET (1./4.) +/* Stubs to use when smoke is disabled */ +#ifndef WITH_SMOKE +struct WTURBULENCE *smoke_turbulence_init(int *UNUSED(res), int UNUSED(amplify), int UNUSED(noisetype)) { return NULL; } +struct FLUID_3D *smoke_init(int *UNUSED(res), float *UNUSED(p0)) { return NULL; } +void smoke_free(struct FLUID_3D *UNUSED(fluid)) {} +void smoke_turbulence_free(struct WTURBULENCE *UNUSED(wt)) {} +void smoke_initWaveletBlenderRNA(struct WTURBULENCE *UNUSED(wt), float *UNUSED(strength)) {} +void smoke_initBlenderRNA(struct FLUID_3D *UNUSED(fluid), float *UNUSED(alpha), float *UNUSED(beta), float *UNUSED(dt_factor), float *UNUSED(vorticity), int *UNUSED(border_colli)) {} +long long smoke_get_mem_req(int UNUSED(xres), int UNUSED(yres), int UNUSED(zres), int UNUSED(amplify)) { return 0; } +void smokeModifier_do(SmokeModifierData *UNUSED(smd), Scene *UNUSED(scene), Object *UNUSED(ob), DerivedMesh *UNUSED(dm)) {} +#endif // WITH_SMOKE + + static int smokeModifier_init (SmokeModifierData *smd, Object *ob, Scene *scene, DerivedMesh *dm) { if((smd->type & MOD_SMOKE_TYPE_DOMAIN) && smd->domain && !smd->domain->fluid) @@ -805,6 +818,9 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData // forward decleration static void smoke_calc_transparency(float *result, float *input, float *p0, float *p1, int res[3], float dx, float *light, bresenham_callback cb, float correct); static float calc_voxel_transp(float *result, float *input, int res[3], int *pixel, float *tRay, float correct); + +#ifdef WITH_SMOKE + static int get_lamp(Scene *scene, float *light) { Base *base_tmp = NULL; @@ -1646,3 +1662,4 @@ static void smoke_calc_transparency(float *result, float *input, float *p0, floa } } +#endif // WITH_SMOKE -- cgit v1.2.3 From 410c5e3cd284eba6b17c79042b161eaa9efe6e71 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 16 Jul 2011 23:01:14 +0000 Subject: cmake source definitions: remove missing includes and use more strict formatting. --- source/blender/blenkernel/CMakeLists.txt | 51 +++++++++++++++++++++++--------- 1 file changed, 37 insertions(+), 14 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 92c50242e74..a3c3357508f 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -32,8 +32,10 @@ endif() set(INC . ../avi + ../blenfont ../blenlib ../blenloader + ../editors/include ../gpu ../ikplugin ../imbuf @@ -41,18 +43,19 @@ set(INC ../makesrna ../modifiers ../nodes - ../editors/include ../render/extern/include - ../../../intern/bsp/extern ../blenfont + ../../../intern/bsp/extern ../../../intern/decimation/extern ../../../intern/elbeem/extern ../../../intern/guardedalloc ../../../intern/iksolver/extern ../../../intern/memutil + ../../../intern/mikktspace ../../../intern/opennl/extern ../../../intern/smoke/extern - ../../../intern/mikktspace - ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h + + # XXX - BAD LEVEL CALL WM_api.h + ../../../source/blender/windowmanager ) set(INC_SYS @@ -243,12 +246,16 @@ if(WITH_AUDASPACE) endif() if(WITH_BULLET) - list(APPEND INC ../../../extern/bullet2/src) + list(APPEND INC + ../../../extern/bullet2/src + ) add_definitions(-DUSE_BULLET) endif() if(WITH_MOD_CLOTH_ELTOPO) - list(APPEND INC ../../../extern/eltopo) + list(APPEND INC + ../../../extern/eltopo + ) add_definitions(-DWITH_ELTOPO) endif() @@ -277,20 +284,32 @@ if(WITH_IMAGE_HDR) endif() if(WITH_CODEC_QUICKTIME) - list(APPEND INC ../quicktime) - list(APPEND INC_SYS ${QUICKTIME_INCLUDE_DIRS}) + list(APPEND INC + ../quicktime + ) + list(APPEND INC_SYS + ${QUICKTIME_INCLUDE_DIRS} + ) add_definitions(-DWITH_QUICKTIME) endif() if(WITH_CODEC_FFMPEG) - list(APPEND INC ../../../intern/ffmpeg) - list(APPEND INC_SYS ${FFMPEG_INCLUDE_DIRS}) + list(APPEND INC + ../../../intern/ffmpeg + ) + list(APPEND INC_SYS + ${FFMPEG_INCLUDE_DIRS} + ) add_definitions(-DWITH_FFMPEG) endif() if(WITH_PYTHON) - list(APPEND INC ../python) - list(APPEND INC_SYS ${PYTHON_INCLUDE_DIRS}) + list(APPEND INC + ../python + ) + list(APPEND INC_SYS + ${PYTHON_INCLUDE_DIRS} + ) add_definitions(-DWITH_PYTHON) if(WITH_PYTHON_SECURITY) @@ -315,12 +334,16 @@ if(WITH_JACK) endif() if(WITH_LZO) - list(APPEND INC_SYS ../../../extern/lzo/minilzo) + list(APPEND INC_SYS + ../../../extern/lzo/minilzo + ) add_definitions(-DWITH_LZO) endif() if(WITH_LZMA) - list(APPEND INC_SYS ../../../extern/lzma) + list(APPEND INC_SYS + ../../../extern/lzma + ) add_definitions(-DWITH_LZMA) endif() -- cgit v1.2.3 From 5792bd7cc74581a5ac37325207c1cc6a338be9c7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 17 Jul 2011 09:11:13 +0000 Subject: cmake: cleanup include paths, some duplicates and going up some unneeded dirs. --- source/blender/blenkernel/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index a3c3357508f..9a384c40e24 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -55,7 +55,7 @@ set(INC ../../../intern/smoke/extern # XXX - BAD LEVEL CALL WM_api.h - ../../../source/blender/windowmanager + ../windowmanager ) set(INC_SYS -- cgit v1.2.3 From 9469f0d0af61ce445e7eadf5b832a99baff0b976 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Mon, 18 Jul 2011 02:40:54 +0000 Subject: Bug fix: particle cache should only be cleared on the exact first integer frame, not in the case of a subframe between the first and second frame. --- source/blender/blenkernel/intern/particle_system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 63a9c224971..1423f520b95 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3987,7 +3987,7 @@ static void system_step(ParticleSimulationData *sim, float cfra) BKE_ptcache_id_time(pid, sim->scene, 0.0f, &startframe, &endframe, NULL); /* clear everythin on start frame */ - if((int)cfra == startframe) { + if(cfra == startframe) { BKE_ptcache_id_reset(sim->scene, pid, PTCACHE_RESET_OUTDATED); BKE_ptcache_validate(cache, startframe); cache->flag &= ~PTCACHE_REDO_NEEDED; -- cgit v1.2.3 From ce0ad0b40b93fc6074daaba6ead0e0e82867d4d2 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 19 Jul 2011 01:36:59 +0000 Subject: fix [#28018] Sequence Swap Data Operator does not work --- source/blender/blenkernel/intern/sequencer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 265cc3eeb79..d6a152a5280 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3232,9 +3232,10 @@ int seq_swap(Sequence *seq_a, Sequence *seq_b, const char **error_str) { char name[sizeof(seq_a->name)]; - if(seq_a->len != seq_b->len) + if(seq_a->len != seq_b->len) { *error_str= "Strips must be the same length"; return 0; + } /* type checking, could be more advanced but disalow sound vs non-sound copy */ if(seq_a->type != seq_b->type) { -- cgit v1.2.3 From 28780342eddb0e1e767bf64d69cb99bd138d621f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Jul 2011 00:41:00 +0000 Subject: fix/workaround [#28040] float images reduced to 256 levels per channel upon save Generated images would not be re-generated with a float buffer on load, even when selected on creation. Now save the float buffer setting as a generated image flag. This means you can enable before baking to enable baking to a float buffer. --- source/blender/blenkernel/intern/image.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index c48497c45a1..ab67d7e3f25 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -432,6 +432,7 @@ Image *BKE_add_image_size(unsigned int width, unsigned int height, const char *n ima->gen_x= width; ima->gen_y= height; ima->gen_type= uvtestgrid; + ima->gen_flag |= (floatbuf ? IMA_GEN_FLOAT : 0); ibuf= add_ibuf_size(width, height, name, depth, floatbuf, uvtestgrid, color); image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0); @@ -2172,7 +2173,7 @@ ImBuf *BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **lock_r) /* UV testgrid or black or solid etc */ if(ima->gen_x==0) ima->gen_x= 1024; if(ima->gen_y==0) ima->gen_y= 1024; - ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, 0, ima->gen_type, color); + ibuf= add_ibuf_size(ima->gen_x, ima->gen_y, ima->name, 24, (ima->gen_flag & IMA_GEN_FLOAT) != 0, ima->gen_type, color); image_assign_ibuf(ima, ibuf, IMA_NO_INDEX, 0); ima->ok= IMA_OK_LOADED; } -- cgit v1.2.3 From e6604288c8886b2c236c1765734a6ed71b8f0ae8 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 21 Jul 2011 23:06:51 +0000 Subject: cmake - option to disable the frame server --- source/blender/blenkernel/CMakeLists.txt | 4 ++++ source/blender/blenkernel/SConscript | 1 + source/blender/blenkernel/intern/writeframeserver.c | 2 ++ 3 files changed, 7 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index 9a384c40e24..defcef58463 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -279,6 +279,10 @@ if(WITH_IMAGE_CINEON) add_definitions(-DWITH_CINEON) endif() +if(WITH_IMAGE_FRAMESERVER) + add_definitions(-DWITH_FRAMESERVER) +endif() + if(WITH_IMAGE_HDR) add_definitions(-DWITH_HDR) endif() diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index 36afce7946c..5ea42ee65ae 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -22,6 +22,7 @@ incs += ' ' + env['BF_ZLIB_INC'] defs = [ 'GLEW_STATIC' ] defs.append('WITH_SMOKE') # TODO, make optional +defs.append('WITH_FRAMESERVER') # TODO, make optional if env['WITH_BF_PYTHON']: incs += ' ../python' diff --git a/source/blender/blenkernel/intern/writeframeserver.c b/source/blender/blenkernel/intern/writeframeserver.c index 2239f6d3147..d13d15d1269 100644 --- a/source/blender/blenkernel/intern/writeframeserver.c +++ b/source/blender/blenkernel/intern/writeframeserver.c @@ -22,6 +22,7 @@ * */ +#ifdef WITH_FRAMESERVER #include #include @@ -381,3 +382,4 @@ void end_frameserver(void) shutdown_socket_system(); } +#endif /* WITH_FRAMESERVER */ -- cgit v1.2.3 From 6040a28f039dc73cc62372fd329fe38e25b8f31f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 22 Jul 2011 00:34:03 +0000 Subject: missed this file when adding option to disable frameserver --- source/blender/blenkernel/intern/writeavi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index ba7f9bdd415..769a3f9b11e 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -105,13 +105,18 @@ bMovieHandle *BKE_get_movie_handle(int imtype) mh.get_movie_path = filepath_ffmpeg; } #endif +#ifdef WITH_FRAMESERVER if (imtype == R_FRAMESERVER) { mh.start_movie = start_frameserver; mh.append_movie = append_frameserver; mh.end_movie = end_frameserver; mh.get_next_frame = frameserver_loop; } - +#endif + + /* incase all above are disabled */ + (void)imtype; + return &mh; } -- cgit v1.2.3