From 0327b9a0cf9cac49936a09a9fc943be5e5337813 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 11 Feb 2012 19:43:06 +0000 Subject: minor include cleanup, add GPL header (copied from BKE_animsys.h --- source/blender/blenkernel/BKE_booleanops_mesh.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_booleanops_mesh.h b/source/blender/blenkernel/BKE_booleanops_mesh.h index 7c989ea17e6..4c4a2dc9998 100644 --- a/source/blender/blenkernel/BKE_booleanops_mesh.h +++ b/source/blender/blenkernel/BKE_booleanops_mesh.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PyBooleanOps_h -#define BKE_PyBooleanOps_h +#ifndef BKE_BOOLEANOPS_MESH_H +#define BKE_BOOLEANOPS_MESH_H /** \file BKE_booleanops_mesh.h * \ingroup bke -- cgit v1.2.3 From a7458742b1f87c918fad6e7f0081e5d2b2e94125 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 12 Feb 2012 00:25:52 +0000 Subject: Fix [#29265] Particle Instance: Create Along Paths + Children inconsistent with actual children hair particles * Hair particle rotations weren't calculated properly for particle locations along a path and the "particle on path" calculations were not correct in many other ways too. * Now the particle's location along a path is interpolated directly from the cached paths if it exist. These paths are always correctly calculated. * Paths are now cached if a particle instance modifier using the particle system with the path option exists. --- source/blender/blenkernel/intern/particle.c | 297 ++++++++++++--------- source/blender/blenkernel/intern/particle_system.c | 14 + 2 files changed, 190 insertions(+), 121 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index cd3933d3c44..8bd5b55e778 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -1365,6 +1365,35 @@ static void do_particle_interpolation(ParticleSystem *psys, int p, ParticleData if(pind->keyed || pind->cache || point_vel) mul_v3_fl(result->vel, 1.f/invdt); } + +static void interpolate_pathcache(ParticleCacheKey *first, float t, ParticleCacheKey *result) +{ + int i=0; + ParticleCacheKey *cur = first; + + /* scale the requested time to fit the entire path even if the path is cut early */ + t *= (first+first->steps)->time; + + while(isteps && cur->time < t) + cur++; + + if(cur->time == t) + *result = *cur; + else { + float dt = (t-(cur-1)->time)/(cur->time-(cur-1)->time); + interp_v3_v3v3(result->co, (cur-1)->co, cur->co, dt); + interp_v3_v3v3(result->vel, (cur-1)->vel, cur->vel, dt); + interp_qt_qtqt(result->rot, (cur-1)->rot, cur->rot, dt); + result->time = t; + } + + /* first is actual base rotation, others are incremental from first */ + if(cur==first || cur-1==first) + copy_qt_qt(result->rot, first->rot); + else + mul_qt_qtqt(result->rot, first->rot, result->rot); +} + /************************************************/ /* Particles on a dm */ /************************************************/ @@ -2648,6 +2677,8 @@ static void psys_thread_create_path(ParticleThread *thread, struct ChildParticle /* offset the child from the parent position */ offset_child(cpa, (ParticleKey*)(key[0]+k), par_rot, (ParticleKey*)child, part->childflat, part->childrad); } + + child->time = (float)k/(float)ctx->steps; } /* apply effectors */ @@ -3009,6 +3040,8 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) if(k==1) copy_v3_v3((ca-1)->vel, ca->vel); + + ca->time = (float)k/(float)steps; } /* First rotation is based on emitting face orientation. * This is way better than having flipping rotations resulting @@ -4013,84 +4046,105 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * CLAMP(t, 0.0f, 1.0f); if(pparticles + p; - pind.keyed = keyed; - pind.cache = cached ? psys->pointcache : NULL; - pind.epoint = NULL; - pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE); - /* pind.dm disabled in editmode means we dont get effectors taken into - * account when subdividing for instance */ - pind.dm = psys_in_edit_mode(sim->scene, psys) ? NULL : psys->hair_out_dm; - init_particle_interpolation(sim->ob, psys, pa, &pind); - do_particle_interpolation(psys, p, pa, t, &pind, state); - - if(pind.dm) { - mul_m4_v3(sim->ob->obmat, state->co); - mul_mat3_m4_v3(sim->ob->obmat, state->vel); - } - else if(!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) { - if((pa->flag & PARS_REKEY)==0) { - psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat); - mul_m4_v3(hairmat, state->co); - mul_mat3_m4_v3(hairmat, state->vel); - - if(sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) { - do_guides(sim->psys->effectors, state, p, state->time); - /* TODO: proper velocity handling */ - } + /* interpolate pathcache directly if it exist */ + if(psys->pathcache) { + ParticleCacheKey result; + interpolate_pathcache(psys->pathcache[p], t, &result); + copy_v3_v3(state->co, result.co); + copy_v3_v3(state->vel, result.vel); + copy_qt_qt(state->rot, result.rot); + } + /* otherwise interpolate with other means */ + else { + pa = psys->particles + p; + + pind.keyed = keyed; + pind.cache = cached ? psys->pointcache : NULL; + pind.epoint = NULL; + pind.bspline = (psys->part->flag & PART_HAIR_BSPLINE); + /* pind.dm disabled in editmode means we dont get effectors taken into + * account when subdividing for instance */ + pind.dm = psys_in_edit_mode(sim->scene, psys) ? NULL : psys->hair_out_dm; + init_particle_interpolation(sim->ob, psys, pa, &pind); + do_particle_interpolation(psys, p, pa, t, &pind, state); + + if(pind.dm) { + mul_m4_v3(sim->ob->obmat, state->co); + mul_mat3_m4_v3(sim->ob->obmat, state->vel); + } + else if(!keyed && !cached && !(psys->flag & PSYS_GLOBAL_HAIR)) { + if((pa->flag & PARS_REKEY)==0) { + psys_mat_hair_to_global(sim->ob, sim->psmd->dm, part->from, pa, hairmat); + mul_m4_v3(hairmat, state->co); + mul_mat3_m4_v3(hairmat, state->vel); + + if(sim->psys->effectors && (part->flag & PART_CHILD_GUIDE)==0) { + do_guides(sim->psys->effectors, state, p, state->time); + /* TODO: proper velocity handling */ + } - if(psys->lattice && edit==0) - calc_latt_deform(psys->lattice, state->co,1.0f); + if(psys->lattice && edit==0) + calc_latt_deform(psys->lattice, state->co,1.0f); + } } } } else if(totchild){ //invert_m4_m4(imat,ob->obmat); - cpa=psys->child+p-totpart; + /* interpolate childcache directly if it exists */ + if(psys->childcache) { + ParticleCacheKey result; + interpolate_pathcache(psys->childcache[p-totpart], t, &result); + copy_v3_v3(state->co, result.co); + copy_v3_v3(state->vel, result.vel); + copy_qt_qt(state->rot, result.rot); + } + else { + cpa=psys->child+p-totpart; - if(state->time < 0.0f) - t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL); + if(state->time < 0.0f) + t = psys_get_child_time(psys, cpa, -state->time, NULL, NULL); - if(totchild && part->childtype==PART_CHILD_FACES){ - /* part->parents could still be 0 so we can't test with totparent */ - between=1; - } - if(between){ - int w = 0; - float foffset; - - /* get parent states */ - while(w<4 && cpa->pa[w]>=0){ - keys[w].time = state->time; - psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1); - w++; + if(totchild && part->childtype==PART_CHILD_FACES){ + /* part->parents could still be 0 so we can't test with totparent */ + between=1; } + if(between){ + int w = 0; + float foffset; + + /* get parent states */ + while(w<4 && cpa->pa[w]>=0){ + keys[w].time = state->time; + psys_get_particle_on_path(sim, cpa->pa[w], keys+w, 1); + w++; + } - /* get the original coordinates (orco) for texture usage */ - cpa_num=cpa->num; + /* get the original coordinates (orco) for texture usage */ + cpa_num=cpa->num; - foffset= cpa->foffset; - cpa_fuv = cpa->fuv; - cpa_from = PART_FROM_FACE; + foffset= cpa->foffset; + cpa_fuv = cpa->fuv; + cpa_from = PART_FROM_FACE; - psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,0,0,0,orco,0); + psys_particle_on_emitter(psmd,cpa_from,cpa_num,DMCACHE_ISCHILD,cpa->fuv,foffset,co,0,0,0,orco,0); - /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */ - //copy_v3_v3(cpa_1st,co); + /* we need to save the actual root position of the child for positioning it accurately to the surface of the emitter */ + //copy_v3_v3(cpa_1st,co); - //mul_m4_v3(ob->obmat,cpa_1st); + //mul_m4_v3(ob->obmat,cpa_1st); - pa = psys->particles + cpa->parent; + pa = psys->particles + cpa->parent; - if(part->type == PART_HAIR) - psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); - else - unit_m4(hairmat); + if(part->type == PART_HAIR) + psys_mat_hair_to_global(sim->ob, sim->psmd->dm, psys->part->from, pa, hairmat); + else + unit_m4(hairmat); - pa=0; - } - else{ + pa=0; + } + else{ /* get the parent state */ keys->time = state->time; psys_get_particle_on_path(sim, cpa->parent, keys,1); @@ -4114,74 +4168,75 @@ void psys_get_particle_on_path(ParticleSimulationData *sim, int p, ParticleKey * } } - /* correct child ipo timing */ -#if 0 // XXX old animation system - if((part->flag&PART_ABS_TIME)==0 && part->ipo){ - calc_ipo(part->ipo, 100.0f*t); - execute_ipo((ID *)part, part->ipo); - } -#endif // XXX old animation system + /* correct child ipo timing */ + #if 0 // XXX old animation system + if((part->flag&PART_ABS_TIME)==0 && part->ipo){ + calc_ipo(part->ipo, 100.0f*t); + execute_ipo((ID *)part, part->ipo); + } + #endif // XXX old animation system - /* get different child parameters from textures & vgroups */ - memset(&ctx, 0, sizeof(ParticleThreadContext)); - ctx.sim = *sim; - ctx.dm = psmd->dm; - ctx.ma = ma; - /* TODO: assign vertex groups */ - get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex); - - if(between){ - int w=0; + /* get different child parameters from textures & vgroups */ + memset(&ctx, 0, sizeof(ParticleThreadContext)); + ctx.sim = *sim; + ctx.dm = psmd->dm; + ctx.ma = ma; + /* TODO: assign vertex groups */ + get_child_modifier_parameters(part, &ctx, cpa, cpa_from, cpa_num, cpa_fuv, orco, &ptex); + + if(between){ + int w=0; + + state->co[0] = state->co[1] = state->co[2] = 0.0f; + state->vel[0] = state->vel[1] = state->vel[2] = 0.0f; + + /* child position is the weighted sum of parent positions */ + while(w<4 && cpa->pa[w]>=0){ + state->co[0] += cpa->w[w] * keys[w].co[0]; + state->co[1] += cpa->w[w] * keys[w].co[1]; + state->co[2] += cpa->w[w] * keys[w].co[2]; + + state->vel[0] += cpa->w[w] * keys[w].vel[0]; + state->vel[1] += cpa->w[w] * keys[w].vel[1]; + state->vel[2] += cpa->w[w] * keys[w].vel[2]; + w++; + } + /* apply offset for correct positioning */ + //add_v3_v3(state->co, cpa_1st); + } + else{ + /* offset the child from the parent position */ + offset_child(cpa, keys, keys->rot, state, part->childflat, part->childrad); + } - state->co[0] = state->co[1] = state->co[2] = 0.0f; - state->vel[0] = state->vel[1] = state->vel[2] = 0.0f; + par = keys; - /* child position is the weighted sum of parent positions */ - while(w<4 && cpa->pa[w]>=0){ - state->co[0] += cpa->w[w] * keys[w].co[0]; - state->co[1] += cpa->w[w] * keys[w].co[1]; - state->co[2] += cpa->w[w] * keys[w].co[2]; - - state->vel[0] += cpa->w[w] * keys[w].vel[0]; - state->vel[1] += cpa->w[w] * keys[w].vel[1]; - state->vel[2] += cpa->w[w] * keys[w].vel[2]; - w++; - } - /* apply offset for correct positioning */ - //add_v3_v3(state->co, cpa_1st); - } - else{ - /* offset the child from the parent position */ - offset_child(cpa, keys, keys->rot, state, part->childflat, part->childrad); - } + if(vel) + copy_particle_key(&tstate, state, 1); - par = keys; + /* apply different deformations to the child path */ + do_child_modifiers(sim, &ptex, par, par->rot, cpa, orco, hairmat, state, t); - if(vel) - copy_particle_key(&tstate, state, 1); + /* try to estimate correct velocity */ + if(vel){ + ParticleKey tstate; + float length = len_v3(state->vel); - /* apply different deformations to the child path */ - do_child_modifiers(sim, &ptex, par, par->rot, cpa, orco, hairmat, state, t); - - /* try to estimate correct velocity */ - if(vel){ - ParticleKey tstate; - float length = len_v3(state->vel); - - if(t>=0.001f){ - tstate.time=t-0.001f; - psys_get_particle_on_path(sim,p,&tstate,0); - sub_v3_v3v3(state->vel,state->co,tstate.co); - normalize_v3(state->vel); - } - else{ - tstate.time=t+0.001f; - psys_get_particle_on_path(sim,p,&tstate,0); - sub_v3_v3v3(state->vel,tstate.co,state->co); - normalize_v3(state->vel); - } + if(t>=0.001f){ + tstate.time=t-0.001f; + psys_get_particle_on_path(sim,p,&tstate,0); + sub_v3_v3v3(state->vel,state->co,tstate.co); + normalize_v3(state->vel); + } + else{ + tstate.time=t+0.001f; + psys_get_particle_on_path(sim,p,&tstate,0); + sub_v3_v3v3(state->vel,tstate.co,state->co); + normalize_v3(state->vel); + } - mul_v3_fl(state->vel, length); + mul_v3_fl(state->vel, length); + } } } } diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 5a64da7354e..e853c0fee19 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3407,6 +3407,7 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra) ParticleSystem *psys = sim->psys; ParticleSettings *part = psys->part; ParticleEditSettings *pset = &sim->scene->toolsettings->particle; + Base *base; int distr=0, alloc=0, skip=0; if((psys->part->childtype && psys->totchild != get_psys_tot_child(sim->scene, psys)) || psys->recalc&PSYS_RECALC_RESET) @@ -3449,6 +3450,19 @@ static void psys_update_path_cache(ParticleSimulationData *sim, float cfra) } } + + /* particle instance modifier with "path" option need cached paths even if particle system doesn't */ + for (base = sim->scene->base.first; base; base= base->next) { + ModifierData *md = modifiers_findByType(base->object, eModifierType_ParticleInstance); + if(md) { + ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md; + if(pimd->flag & eParticleInstanceFlag_Path && pimd->ob == sim->ob && pimd->psys == (psys - (ParticleSystem*)sim->ob->particlesystem.first)) { + skip = 0; + break; + } + } + } + if(!skip) { psys_cache_paths(sim, cfra); -- cgit v1.2.3 From 670bde28dd2ca162bce3e465e7f0c4457c046d56 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 12 Feb 2012 00:32:31 +0000 Subject: Fix [#29530] Changing to particle mode could crash in some cases * If a baked particle didn't have any cached keys creating an edit path for it crashed. --- source/blender/blenkernel/intern/particle.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 8bd5b55e778..f0b05846670 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3122,6 +3122,9 @@ void psys_cache_edit_paths(Scene *scene, Object *ob, PTCacheEdit *edit, float cf if(edit->totcached && !(point->flag & PEP_EDIT_RECALC)) continue; + if(point->totkey == 0) + continue; + ekey = point->keys; pind.keyed = 0; -- cgit v1.2.3 From 5a2454c3f8b41856a73275daba363b3e2dfa748c Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 12 Feb 2012 00:43:57 +0000 Subject: Fix [#29737] Can't edit particle hair if particle count is 0. * Hair wasn't flagged as "done" if particle count was 0 before setting particles as hair, so particle edit mode didn't work. --- source/blender/blenkernel/intern/particle_system.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index e853c0fee19..c00101c98ab 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4428,6 +4428,7 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys) if(psys->totpart == 0 && part->totpart == 0) { psys_free_path_cache(psys, NULL); free_hair(ob, psys, 0); + psys->flag |= PSYS_HAIR_DONE; } /* (re-)create hair */ else if(hair_needs_recalc(psys)) { -- cgit v1.2.3 From 2f516f46dafd34da1a14ef03e8c6b40326eab63b Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Mon, 13 Feb 2012 17:31:33 +0000 Subject: Fix for [#27349] Sequencer: Meta Strips plays unavailable audio Hopefully at least... Sequencer code is like . --- source/blender/blenkernel/intern/sequencer.c | 58 +++++++++++++++------------- 1 file changed, 31 insertions(+), 27 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index d18a71d3c55..904e97c8f67 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -523,6 +523,31 @@ void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq, } +static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) +{ + Sequence *seq; + + /* for sound we go over full meta tree to update bounds of the sound strips, + since sound is played outside of evaluating the imbufs, */ + for(seq=metaseq->seqbase.first; seq; seq=seq->next) { + if(seq->type == SEQ_META) { + seq_update_sound_bounds_recursive(scene, seq); + } + else if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { + if(seq->scene_sound) { + int startofs = seq->startofs; + int endofs = seq->endofs; + if(seq->startofs + seq->start < metaseq->start + metaseq->startofs) + startofs = metaseq->start + metaseq->startofs - seq->start; + + if(seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs) + endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs; + sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs); + } + } + } +} + void calc_sequence_disp(Scene *scene, Sequence *seq) { if(seq->startofs && seq->startstill) seq->startstill= 0; @@ -539,32 +564,11 @@ void calc_sequence_disp(Scene *scene, Sequence *seq) seq->handsize= (float)((seq->enddisp-seq->startdisp)/25); } - seq_update_sound_bounds(scene, seq); -} - -static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) -{ - Sequence *seq; - - /* for sound we go over full meta tree to update bounds of the sound strips, - since sound is played outside of evaluating the imbufs, */ - for(seq=metaseq->seqbase.first; seq; seq=seq->next) { - if(seq->type == SEQ_META) { - seq_update_sound_bounds_recursive(scene, seq); - } - else if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { - if(seq->scene_sound) { - int startofs = seq->startofs; - int endofs = seq->endofs; - if(seq->startofs + seq->start < metaseq->start + metaseq->startofs) - startofs = metaseq->start + metaseq->startofs - seq->start; - - if(seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs) - endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs; - sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs); - } - } - } + if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { + seq_update_sound_bounds(scene, seq); + } + else if(seq->type == SEQ_META) + seq_update_sound_bounds_recursive(scene, seq); } void calc_sequence(Scene *scene, Sequence *seq) @@ -3228,7 +3232,7 @@ void seq_update_sound_bounds_all(Scene *scene) void seq_update_sound_bounds(Scene* scene, Sequence *seq) { - sound_move_scene_sound_defaults(scene, seq); + sound_move_scene_sound_defaults(scene, seq); /* mute is set in seq_update_muting_recursive */ } -- cgit v1.2.3 From a53237f1930553f0aa373f6f4a85d8ad30650411 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 13 Feb 2012 20:54:36 +0000 Subject: use tabs for indentation --- source/blender/blenkernel/intern/sequencer.c | 58 ++++++++++++++-------------- 1 file changed, 29 insertions(+), 29 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 904e97c8f67..0790896da0d 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -525,27 +525,27 @@ void build_seqar_cb(ListBase *seqbase, Sequence ***seqar, int *totseq, static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) { - Sequence *seq; - - /* for sound we go over full meta tree to update bounds of the sound strips, - since sound is played outside of evaluating the imbufs, */ - for(seq=metaseq->seqbase.first; seq; seq=seq->next) { - if(seq->type == SEQ_META) { - seq_update_sound_bounds_recursive(scene, seq); - } - else if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { - if(seq->scene_sound) { - int startofs = seq->startofs; - int endofs = seq->endofs; - if(seq->startofs + seq->start < metaseq->start + metaseq->startofs) - startofs = metaseq->start + metaseq->startofs - seq->start; - - if(seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs) - endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs; - sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs); - } - } - } + Sequence *seq; + + /* for sound we go over full meta tree to update bounds of the sound strips, + * since sound is played outside of evaluating the imbufs, */ + for(seq=metaseq->seqbase.first; seq; seq=seq->next) { + if(seq->type == SEQ_META) { + seq_update_sound_bounds_recursive(scene, seq); + } + else if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { + if(seq->scene_sound) { + int startofs = seq->startofs; + int endofs = seq->endofs; + if(seq->startofs + seq->start < metaseq->start + metaseq->startofs) + startofs = metaseq->start + metaseq->startofs - seq->start; + + if(seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs) + endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs; + sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs); + } + } + } } void calc_sequence_disp(Scene *scene, Sequence *seq) @@ -564,11 +564,11 @@ void calc_sequence_disp(Scene *scene, Sequence *seq) seq->handsize= (float)((seq->enddisp-seq->startdisp)/25); } - if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { - seq_update_sound_bounds(scene, seq); - } - else if(seq->type == SEQ_META) - seq_update_sound_bounds_recursive(scene, seq); + if(ELEM(seq->type, SEQ_SOUND, SEQ_SCENE)) { + seq_update_sound_bounds(scene, seq); + } + else if(seq->type == SEQ_META) + seq_update_sound_bounds_recursive(scene, seq); } void calc_sequence(Scene *scene, Sequence *seq) @@ -2580,8 +2580,8 @@ static void seq_stop_threads() seq_thread_shutdown = TRUE; - pthread_cond_broadcast(&wakeup_cond); - pthread_mutex_unlock(&wakeup_lock); + pthread_cond_broadcast(&wakeup_cond); + pthread_mutex_unlock(&wakeup_lock); for(tslot = running_threads.first; tslot; tslot= tslot->next) { pthread_join(tslot->pthread, NULL); @@ -3232,7 +3232,7 @@ void seq_update_sound_bounds_all(Scene *scene) void seq_update_sound_bounds(Scene* scene, Sequence *seq) { - sound_move_scene_sound_defaults(scene, seq); + sound_move_scene_sound_defaults(scene, seq); /* mute is set in seq_update_muting_recursive */ } -- cgit v1.2.3 From 2cf28ab2bc6207a16dae9a8e35565381d7d3ba50 Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Tue, 14 Feb 2012 12:24:17 +0000 Subject: ffmpeg: don't use flags:loop for .h264, this allows to see the video in OSX quickview and Quicktimeplayer( windows ? ) --- source/blender/blenkernel/intern/writeffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index bae4d9c4b4e..c4c3eb4a8b2 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1244,7 +1244,7 @@ static void ffmpeg_set_expert_options(RenderData *rd) * The other options were taken from the libx264-default.preset * included in the ffmpeg distribution. */ - ffmpeg_property_add_string(rd, "video", "flags:loop"); +// ffmpeg_property_add_string(rd, "video", "flags:loop"); // this breakes compatibility for QT ffmpeg_property_add_string(rd, "video", "cmp:chroma"); ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); -- cgit v1.2.3 From bd249c3bffed10a7634ed83fcd5cd07729182689 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 15 Feb 2012 16:06:48 +0000 Subject: Camera tracking: animation datablock for MovieClip Added AnimData block to MovieClip datablock which allows to animate different properties in clip. Currently supports animation of stabilization influence only. --- source/blender/blenkernel/intern/anim_sys.c | 4 ++++ source/blender/blenkernel/intern/movieclip.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index b32421a6b3d..9ae3ad95d5c 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -88,6 +88,7 @@ short id_type_can_have_animdata (ID *id) case ID_LA: case ID_CA: case ID_WO: case ID_SPK: case ID_SCE: + case ID_MC: { return 1; } @@ -2335,6 +2336,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) /* speakers */ EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM); + /* movie clips */ + EVAL_ANIM_IDS(main->movieclip.first, ADT_RECALC_ANIM); + /* objects */ /* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets * this tagged by Depsgraph on framechange. This optimisation means that objects diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c90faa7e0ca..03fe18e4bd8 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -64,6 +64,7 @@ #include "BLI_mempool.h" #include "BLI_threads.h" +#include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_library.h" #include "BKE_global.h" @@ -889,6 +890,8 @@ static void free_buffers(MovieClip *clip) IMB_free_anim(clip->anim); clip->anim= FALSE; } + + BKE_free_animdata((ID *) clip); } void BKE_movieclip_reload(MovieClip *clip) -- cgit v1.2.3 From 18371f792d1f88b6fcf6abef03dc65aedf9ea6e7 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 15 Feb 2012 16:44:44 +0000 Subject: The traditional release commit, 2.62! Special thanks to splash committee: Kevin Hays, Per Gantelius and Wray Bowling. Splash by Alexey Lugovoy. --- source/blender/blenkernel/BKE_blender.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 7236015054d..405d0e9631a 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -41,8 +41,8 @@ extern "C" { /* these lines are grep'd, watch out for our not-so-awesome regex * and keep comment above the defines. * Use STRINGIFY() rather than defining with quotes */ -#define BLENDER_VERSION 261 -#define BLENDER_SUBVERSION 4 +#define BLENDER_VERSION 262 +#define BLENDER_SUBVERSION 0 #define BLENDER_MINVERSION 250 #define BLENDER_MINSUBVERSION 0 -- cgit v1.2.3 From 048ede5080166d59d4ba2756ed16ce3700ecf274 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Wed, 15 Feb 2012 17:19:26 +0000 Subject: Set BLENDER_VERSION_CYCLE to release. --- source/blender/blenkernel/BKE_blender.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index 405d0e9631a..c5a5c134cdf 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -51,7 +51,7 @@ extern "C" { /* can be left blank, otherwise a,b,c... etc with no quotes */ #define BLENDER_VERSION_CHAR /* alpha/beta/rc/release, docs use this */ -#define BLENDER_VERSION_CYCLE rc +#define BLENDER_VERSION_CYCLE release extern char versionstr[]; /* from blender.c */ -- cgit v1.2.3 From da69173269b73209a484fde69c9ddbb6d42a287d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 16 Feb 2012 07:45:01 +0000 Subject: Tomato: fix for missing cache invalidation when disabling/enabling channels for stabilized shot --- source/blender/blenkernel/intern/movieclip.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 03fe18e4bd8..c93c03a4424 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -277,6 +277,7 @@ typedef struct MovieClipCache { struct { ImBuf *ibuf; int framenr; + int postprocess_flag; float loc[2], scale, angle; int proxy; @@ -702,7 +703,7 @@ ImBuf *BKE_movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user return movieclip_get_postprocessed_ibuf(clip, user, clip->flag, postprocess_flag, 0); } -static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr) +static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; ImBuf *stableibuf; @@ -723,6 +724,9 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int if(cache->stabilized.render_flag!=render_flag || cache->stabilized.proxy!=proxy) return NULL; + if(cache->stabilized.postprocess_flag != postprocess_flag) + return NULL; + stableibuf = cache->stabilized.ibuf; BKE_tracking_stabilization_data(&clip->tracking, framenr, stableibuf->x, stableibuf->y, tloc, &tscale, &tangle); @@ -740,7 +744,8 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int return stableibuf; } -static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int framenr) +static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, + int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; ImBuf *stableibuf; @@ -768,6 +773,8 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.render_flag = 0; } + cache->stabilized.postprocess_flag = postprocess_flag; + IMB_refImBuf(stableibuf); return stableibuf; @@ -786,10 +793,10 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float if(clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) { MovieClipCache *cache= clip->cache; - stableibuf= get_stable_cached_frame(clip, user, framenr); + stableibuf= get_stable_cached_frame(clip, user, framenr, postprocess_flag); if(!stableibuf) - stableibuf= put_stabilized_frame_to_cache(clip, user, ibuf, framenr); + stableibuf= put_stabilized_frame_to_cache(clip, user, ibuf, framenr, postprocess_flag); if(loc) copy_v2_v2(loc, cache->stabilized.loc); if(scale) *scale= cache->stabilized.scale; -- cgit v1.2.3 From f047d90a0e10068e1a44ea59300288218093e79c Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Thu, 16 Feb 2012 08:48:28 +0000 Subject: ffmpeg: only suppress loopfilter for .mov ( compatibility ), but keep for .avi (quality ) --- source/blender/blenkernel/intern/writeffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index c4c3eb4a8b2..9413b96a103 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1244,7 +1244,7 @@ static void ffmpeg_set_expert_options(RenderData *rd) * The other options were taken from the libx264-default.preset * included in the ffmpeg distribution. */ -// ffmpeg_property_add_string(rd, "video", "flags:loop"); // this breakes compatibility for QT + if(!FFMPEG_MOV) ffmpeg_property_add_string(rd, "video", "flags:loop"); // this preserves compatibility for QT ffmpeg_property_add_string(rd, "video", "cmp:chroma"); ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); -- cgit v1.2.3 From 42e50719df8827135b95ae9226d0f84766eb6d45 Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Thu, 16 Feb 2012 11:52:02 +0000 Subject: ffmpeg: take back 44142, conditional was wrong --- source/blender/blenkernel/intern/writeffmpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 9413b96a103..e9f7823dfe8 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1244,7 +1244,7 @@ static void ffmpeg_set_expert_options(RenderData *rd) * The other options were taken from the libx264-default.preset * included in the ffmpeg distribution. */ - if(!FFMPEG_MOV) ffmpeg_property_add_string(rd, "video", "flags:loop"); // this preserves compatibility for QT +// ffmpeg_property_add_string(rd, "video", "flags:loop"); // this breaks compatibility for QT ffmpeg_property_add_string(rd, "video", "cmp:chroma"); ffmpeg_property_add_string(rd, "video", "partitions:parti4x4"); ffmpeg_property_add_string(rd, "video", "partitions:partp8x8"); -- cgit v1.2.3 From fedb95da234ea30adab246606533caa6a5e38e4f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 16 Feb 2012 13:14:28 +0000 Subject: Tomato: fixed incorrect auto-scale calculation for 2d stabilization --- source/blender/blenkernel/intern/tracking.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 695ea1dc07a..f089aae578b 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2445,8 +2445,8 @@ static void calculate_stabdata(MovieTracking *tracking, int framenr, float width *scale= (stab->scale-1.0f)*stab->scaleinf+1.0f; *angle= 0.0f; - loc[0]= (firstmedian[0]-median[0])*width*(*scale); - loc[1]= (firstmedian[1]-median[1])*height*(*scale); + loc[0]= (firstmedian[0]-median[0])*width; + loc[1]= (firstmedian[1]-median[1])*height; mul_v2_fl(loc, stab->locinf); @@ -2725,7 +2725,7 @@ void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float sc invert_m4_m4(icmat, cmat); size_to_mat4(smat, svec); /* scale matrix */ - add_v2_v2(lmat[3], loc); /* tranlation matrix */ + add_v2_v2(lmat[3], loc); /* translation matrix */ rotate_m4(rmat, 'Z', angle); /* rotation matrix */ /* compose transformation matrix */ -- cgit v1.2.3 From aa747f588936899bf56fa7142a936eafcd7d822d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 16 Feb 2012 13:15:01 +0000 Subject: Tomato: fixed issue when track used for rotation stabilization points to a freed memory after re-tracking this track. --- source/blender/blenkernel/intern/tracking.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index f089aae578b..c9e6ecf6394 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -726,6 +726,7 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) { MovieTrackingTrack *track; MovieTrackingTrack *act_track= BKE_tracking_active_track(tracking); + MovieTrackingTrack *rot_track= tracking->stabilization.rot_track; ListBase tracks= {NULL, NULL}, new_tracks= {NULL, NULL}; ListBase *old_tracks; int a; @@ -747,7 +748,7 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) this is needed to keep names in unique state and it's faster to change names of currently operating tracks (if needed) */ for(a= 0; anum_tracks; a++) { - int replace_sel= 0; + int replace_sel= 0, replace_rot= 0; MovieTrackingTrack *new_track, *old; track= &map->tracks[a]; @@ -766,8 +767,10 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) /* original track was found, re-use flags and remove this track */ if(cur) { - if(act_track) + if(cur==act_track) replace_sel= 1; + if(cur==rot_track) + replace_rot= 1; track->flag= cur->flag; track->pat_flag= cur->pat_flag; @@ -786,6 +789,9 @@ static void tracks_map_merge(TracksMap *map, MovieTracking *tracking) if(replace_sel) /* update current selection in clip */ tracking->act_track= new_track; + if(replace_rot) /* update track used for rotation stabilization */ + tracking->stabilization.rot_track= new_track; + BLI_addtail(&tracks, new_track); } -- cgit v1.2.3 From 14a92fc3a24735900693617cb1b89bf9918893df Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 16 Feb 2012 15:03:18 +0000 Subject: Tomato: run aspect correction before stabilizing shot. --- source/blender/blenkernel/BKE_tracking.h | 2 +- source/blender/blenkernel/intern/movieclip.c | 7 ++++++- source/blender/blenkernel/intern/tracking.c | 17 ++++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h index f720050f59c..ebbba7de7c7 100644 --- a/source/blender/blenkernel/BKE_tracking.h +++ b/source/blender/blenkernel/BKE_tracking.h @@ -138,7 +138,7 @@ void BKE_tracking_detect_fast(struct MovieTracking *tracking, struct ListBase *t /* 2D stabilization */ void BKE_tracking_stabilization_data(struct MovieTracking *tracking, int framenr, int width, int height, float loc[2], float *scale, float *angle); struct ImBuf *BKE_tracking_stabilize(struct MovieTracking *tracking, int framenr, struct ImBuf *ibuf, float loc[2], float *scale, float *angle); -void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float scale, float angle, float mat[4][4]); +void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float loc[2], float scale, float angle, float mat[4][4]); /* Distortion/Undistortion */ void BKE_tracking_apply_intrinsics(struct MovieTracking *tracking, float co[2], float nco[2]); diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c93c03a4424..ce0d169557d 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -279,7 +279,7 @@ typedef struct MovieClipCache { int framenr; int postprocess_flag; - float loc[2], scale, angle; + float loc[2], scale, angle, aspect; int proxy; short render_flag; } stabilized; @@ -727,6 +727,10 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int if(cache->stabilized.postprocess_flag != postprocess_flag) return NULL; + /* stabilization also depends on pixel aspect ratio */ + if(cache->stabilized.aspect != clip->tracking.camera.pixel_aspect) + return NULL; + stableibuf = cache->stabilized.ibuf; BKE_tracking_stabilization_data(&clip->tracking, framenr, stableibuf->x, stableibuf->y, tloc, &tscale, &tangle); @@ -763,6 +767,7 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.scale = tscale; cache->stabilized.angle = tangle; cache->stabilized.framenr = framenr; + cache->stabilized.aspect = clip->tracking.camera.pixel_aspect; if(clip->flag&MCLIP_USE_PROXY) { cache->stabilized.proxy= rendersize_to_proxy(user, clip->flag); diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index c9e6ecf6394..04766910df6 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2485,6 +2485,7 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, { float firstmedian[2]; MovieTrackingStabilization *stab= &tracking->stabilization; + float aspect= tracking->camera.pixel_aspect; if(stab->ok) return stab->scale; @@ -2535,7 +2536,7 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, float mat[4][4]; float points[4][2]={{0.0f, 0.0f}, {0.0f, height}, {width, height}, {width, 0.0f}}; - BKE_tracking_stabdata_to_mat4(width, height, loc, scale, angle, mat); + BKE_tracking_stabdata_to_mat4(width, height, aspect, loc, scale, angle, mat); for(i= 0; i<4; i++) { int j; @@ -2650,6 +2651,7 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, MovieTrackingStabilization *stab= &tracking->stabilization; ImBuf *tmpibuf; float width= ibuf->x, height= ibuf->y; + float aspect= tracking->camera.pixel_aspect; if(loc) copy_v2_v2(tloc, loc); if(scale) tscale= *scale; @@ -2688,7 +2690,7 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, float mat[4][4]; int i, j; - BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, tloc, tscale, tangle, mat); + BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, aspect, tloc, tscale, tangle, mat); invert_m4(mat); for(j=0; jy; j++) { @@ -2715,15 +2717,20 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, return tmpibuf; } -void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float scale, float angle, float mat[4][4]) +void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float loc[2], float scale, float angle, float mat[4][4]) { - float lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4]; + float lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4], amat[4][4], iamat[4][4]; float svec[3]= {scale, scale, scale}; unit_m4(rmat); unit_m4(lmat); unit_m4(smat); unit_m4(cmat); + unit_m4(amat); + + /* aspect ratio correction matrix */ + amat[0][0] = 1.0f / aspect; + invert_m4_m4(iamat, amat); /* image center as rotation center */ cmat[3][0]= (float)width/2.0f; @@ -2735,7 +2742,7 @@ void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float sc rotate_m4(rmat, 'Z', angle); /* rotation matrix */ /* compose transformation matrix */ - mul_serie_m4(mat, lmat, cmat, rmat, smat, icmat, NULL, NULL, NULL); + mul_serie_m4(mat, amat, lmat, cmat, rmat, smat, icmat, iamat, NULL); } MovieDistortion *BKE_tracking_distortion_create(void) -- cgit v1.2.3 From 62d09c9103f07c86c484d2a044a8884c337a92a3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 16 Feb 2012 15:03:37 +0000 Subject: Tomato: configurable filter type for 2d stabilization --- source/blender/blenkernel/intern/movieclip.c | 12 +++++++++--- source/blender/blenkernel/intern/tracking.c | 13 ++++++++++--- 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index ce0d169557d..69b32ce46f8 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -280,7 +280,7 @@ typedef struct MovieClipCache { int postprocess_flag; float loc[2], scale, angle, aspect; - int proxy; + int proxy, filter; short render_flag; } stabilized; } MovieClipCache; @@ -706,6 +706,7 @@ ImBuf *BKE_movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; + MovieTracking *tracking = &clip->tracking; ImBuf *stableibuf; float tloc[2], tscale, tangle; short proxy = IMB_PROXY_NONE; @@ -728,7 +729,10 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int return NULL; /* stabilization also depends on pixel aspect ratio */ - if(cache->stabilized.aspect != clip->tracking.camera.pixel_aspect) + if(cache->stabilized.aspect != tracking->camera.pixel_aspect) + return NULL; + + if(cache->stabilized.filter != tracking->stabilization.filter) return NULL; stableibuf = cache->stabilized.ibuf; @@ -752,6 +756,7 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; + MovieTracking *tracking = &clip->tracking; ImBuf *stableibuf; float tloc[2], tscale, tangle; @@ -767,7 +772,8 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.scale = tscale; cache->stabilized.angle = tangle; cache->stabilized.framenr = framenr; - cache->stabilized.aspect = clip->tracking.camera.pixel_aspect; + cache->stabilized.aspect = tracking->camera.pixel_aspect; + cache->stabilized.filter = tracking->stabilization.filter; if(clip->flag&MCLIP_USE_PROXY) { cache->stabilized.proxy= rendersize_to_proxy(user, clip->flag); diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 04766910df6..7461e057df5 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2688,19 +2688,26 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, IMB_rectcpy(tmpibuf, ibuf, tloc[0]-(tscale-1.0f)*width/2.0f, tloc[1]-(tscale-1.0f)*height/2.0f, 0, 0, ibuf->x, ibuf->y); } else { float mat[4][4]; - int i, j; + int i, j, filter= tracking->stabilization.filter; + void (*interpolation) (struct ImBuf*, struct ImBuf*, float, float, int, int) = NULL; BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, aspect, tloc, tscale, tangle, mat); invert_m4(mat); + if(filter == TRACKING_FILTER_NEAREAST) + interpolation = neareast_interpolation; + else if(filter == TRACKING_FILTER_BILINEAR) + interpolation = bilinear_interpolation; + else if(filter == TRACKING_FILTER_BICUBIC) + interpolation = bicubic_interpolation; + for(j=0; jy; j++) { for(i=0; ix;i++) { float vec[3]= {i, j, 0}; mul_v3_m4v3(vec, mat, vec); - /* TODO: add selector for interpolation method */ - neareast_interpolation(ibuf, tmpibuf, vec[0], vec[1], i, j); + interpolation(ibuf, tmpibuf, vec[0], vec[1], i, j); } } } -- cgit v1.2.3 From a56eeb70247e55ac15239c70b8ade4c3567b798f Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Thu, 16 Feb 2012 20:04:33 +0000 Subject: Release Cycle for 2.63: * BCon1, alpha. --- source/blender/blenkernel/BKE_blender.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index c5a5c134cdf..f735af8b24c 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -51,7 +51,7 @@ extern "C" { /* can be left blank, otherwise a,b,c... etc with no quotes */ #define BLENDER_VERSION_CHAR /* alpha/beta/rc/release, docs use this */ -#define BLENDER_VERSION_CYCLE release +#define BLENDER_VERSION_CYCLE alpha extern char versionstr[]; /* from blender.c */ -- cgit v1.2.3 From 5fd24dc3f2f4ad440a7032325fad999b32726c4e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Feb 2012 07:32:18 +0000 Subject: Build proxy from meta and image strips used resolution used for display, not set by building job which leads to unusable proxies. This change should resolve issues reported in #30229: Sequencer Meta strip Proxy Fails and probably #30196 will work nicer too. --- source/blender/blenkernel/intern/sequencer.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 0790896da0d..b2188754503 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -1192,11 +1192,10 @@ static void seq_open_anim_file(Sequence * seq) } -static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra, char * name) +static int seq_proxy_get_fname(Sequence * seq, int cfra, int render_size, char * name) { int frameno; char dir[PROXY_MAXFILE]; - int render_size = context.preview_render_size; if (!seq->strip->proxy) { return FALSE; @@ -1226,22 +1225,17 @@ static int seq_proxy_get_fname(SeqRenderData context, Sequence * seq, int cfra, return TRUE; } - /* dirty hack to distinguish 100% render size from PROXY_100 */ - if (render_size == 99) { - render_size = 100; - } - /* generate a separate proxy directory for each preview size */ if (seq->type == SEQ_IMAGE) { BLI_snprintf(name, PROXY_MAXFILE, "%s/images/%d/%s_proxy", dir, - context.preview_render_size, + render_size, give_stripelem(seq, cfra)->name); frameno = 1; } else { frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; BLI_snprintf(name, PROXY_MAXFILE, "%s/proxy_misc/%d/####", dir, - context.preview_render_size); + render_size); } BLI_path_abs(name, G.main->name); @@ -1258,6 +1252,12 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int IMB_Proxy_Size psize = seq_rendersize_to_proxysize( context.preview_render_size); int size_flags; + int render_size = context.preview_render_size; + + /* dirty hack to distinguish 100% render size from PROXY_100 */ + if (render_size == 99) { + render_size = 100; + } if (!(seq->flag & SEQ_USE_PROXY)) { return NULL; @@ -1273,7 +1273,7 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int if (seq->flag & SEQ_USE_PROXY_CUSTOM_FILE) { int frameno = (int) give_stripelem_index(seq, cfra) + seq->anim_startofs; if (seq->strip->proxy->anim == NULL) { - if (seq_proxy_get_fname(context, seq, cfra, name)==0) { + if (seq_proxy_get_fname(seq, cfra, render_size, name)==0) { return NULL; } @@ -1292,7 +1292,7 @@ static struct ImBuf * seq_proxy_fetch(SeqRenderData context, Sequence * seq, int IMB_TC_NONE, IMB_PROXY_NONE); } - if (seq_proxy_get_fname(context, seq, cfra, name) == 0) { + if (seq_proxy_get_fname(seq, cfra, render_size, name) == 0) { return NULL; } @@ -1313,7 +1313,7 @@ static void seq_proxy_build_frame(SeqRenderData context, int ok; struct ImBuf * ibuf; - if (!seq_proxy_get_fname(context, seq, cfra, name)) { + if (!seq_proxy_get_fname(seq, cfra, proxy_render_size, name)) { return; } -- cgit v1.2.3 From 9d0b7b168fdd69108f095cefed6c3feb0e327ea2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Feb 2012 08:13:45 +0000 Subject: Camera tracking: animation datablock for MovieClip Added AnimData block to MovieClip datablock which allows to animate different properties in clip. Currently supports animation of stabilization influence only. -- svn merge -r44129:44130 ^/branches/soc-2011-tomato --- source/blender/blenkernel/intern/anim_sys.c | 4 ++++ source/blender/blenkernel/intern/movieclip.c | 3 +++ 2 files changed, 7 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index b32421a6b3d..9ae3ad95d5c 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -88,6 +88,7 @@ short id_type_can_have_animdata (ID *id) case ID_LA: case ID_CA: case ID_WO: case ID_SPK: case ID_SCE: + case ID_MC: { return 1; } @@ -2335,6 +2336,9 @@ void BKE_animsys_evaluate_all_animation (Main *main, Scene *scene, float ctime) /* speakers */ EVAL_ANIM_IDS(main->speaker.first, ADT_RECALC_ANIM); + /* movie clips */ + EVAL_ANIM_IDS(main->movieclip.first, ADT_RECALC_ANIM); + /* objects */ /* ADT_RECALC_ANIM doesn't need to be supplied here, since object AnimData gets * this tagged by Depsgraph on framechange. This optimisation means that objects diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c90faa7e0ca..03fe18e4bd8 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -64,6 +64,7 @@ #include "BLI_mempool.h" #include "BLI_threads.h" +#include "BKE_animsys.h" #include "BKE_constraint.h" #include "BKE_library.h" #include "BKE_global.h" @@ -889,6 +890,8 @@ static void free_buffers(MovieClip *clip) IMB_free_anim(clip->anim); clip->anim= FALSE; } + + BKE_free_animdata((ID *) clip); } void BKE_movieclip_reload(MovieClip *clip) -- cgit v1.2.3 From b83577aaec35270552e392b8d299e659b147fda3 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Feb 2012 08:16:29 +0000 Subject: Camera tracking: fix for missing cache invalidation when disabling/enabling channels for stabilized shot -- svn merge -r44140:44141 ^/branches/soc-2011-tomato --- source/blender/blenkernel/intern/movieclip.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index 03fe18e4bd8..c93c03a4424 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -277,6 +277,7 @@ typedef struct MovieClipCache { struct { ImBuf *ibuf; int framenr; + int postprocess_flag; float loc[2], scale, angle; int proxy; @@ -702,7 +703,7 @@ ImBuf *BKE_movieclip_get_postprocessed_ibuf(MovieClip *clip, MovieClipUser *user return movieclip_get_postprocessed_ibuf(clip, user, clip->flag, postprocess_flag, 0); } -static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr) +static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; ImBuf *stableibuf; @@ -723,6 +724,9 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int if(cache->stabilized.render_flag!=render_flag || cache->stabilized.proxy!=proxy) return NULL; + if(cache->stabilized.postprocess_flag != postprocess_flag) + return NULL; + stableibuf = cache->stabilized.ibuf; BKE_tracking_stabilization_data(&clip->tracking, framenr, stableibuf->x, stableibuf->y, tloc, &tscale, &tangle); @@ -740,7 +744,8 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int return stableibuf; } -static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, int framenr) +static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf, + int framenr, int postprocess_flag) { MovieClipCache *cache = clip->cache; ImBuf *stableibuf; @@ -768,6 +773,8 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.render_flag = 0; } + cache->stabilized.postprocess_flag = postprocess_flag; + IMB_refImBuf(stableibuf); return stableibuf; @@ -786,10 +793,10 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float if(clip->tracking.stabilization.flag&TRACKING_2D_STABILIZATION) { MovieClipCache *cache= clip->cache; - stableibuf= get_stable_cached_frame(clip, user, framenr); + stableibuf= get_stable_cached_frame(clip, user, framenr, postprocess_flag); if(!stableibuf) - stableibuf= put_stabilized_frame_to_cache(clip, user, ibuf, framenr); + stableibuf= put_stabilized_frame_to_cache(clip, user, ibuf, framenr, postprocess_flag); if(loc) copy_v2_v2(loc, cache->stabilized.loc); if(scale) *scale= cache->stabilized.scale; -- cgit v1.2.3 From 781b4cafbd22101eb7ced4e2db1c485eafb53e81 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Feb 2012 08:17:46 +0000 Subject: Camera tracking: fixed incorrect auto-scale calculation for 2d stabilization -- svn merge -r44146:44147 ^/branches/soc-2011-tomato --- source/blender/blenkernel/intern/tracking.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index 695ea1dc07a..f089aae578b 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2445,8 +2445,8 @@ static void calculate_stabdata(MovieTracking *tracking, int framenr, float width *scale= (stab->scale-1.0f)*stab->scaleinf+1.0f; *angle= 0.0f; - loc[0]= (firstmedian[0]-median[0])*width*(*scale); - loc[1]= (firstmedian[1]-median[1])*height*(*scale); + loc[0]= (firstmedian[0]-median[0])*width; + loc[1]= (firstmedian[1]-median[1])*height; mul_v2_fl(loc, stab->locinf); @@ -2725,7 +2725,7 @@ void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float sc invert_m4_m4(icmat, cmat); size_to_mat4(smat, svec); /* scale matrix */ - add_v2_v2(lmat[3], loc); /* tranlation matrix */ + add_v2_v2(lmat[3], loc); /* translation matrix */ rotate_m4(rmat, 'Z', angle); /* rotation matrix */ /* compose transformation matrix */ -- cgit v1.2.3 From fdeca277fdfab889279c0a4a3b7b1935ff0121fa Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Feb 2012 08:23:42 +0000 Subject: Camera tracking: run aspect correction before stabilizing shot This commit fixes image stopped being an orthogonal rectangle because of horizontal scaling caused by pixel aspect ratio happening after rotating image which used to make orthogonal angles from footage not actually orthogonal. -- svn merge -r44150:44151 ^/branches/soc-2011-tomato --- source/blender/blenkernel/BKE_tracking.h | 2 +- source/blender/blenkernel/intern/movieclip.c | 7 ++++++- source/blender/blenkernel/intern/tracking.c | 17 ++++++++++++----- 3 files changed, 19 insertions(+), 7 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h index f720050f59c..ebbba7de7c7 100644 --- a/source/blender/blenkernel/BKE_tracking.h +++ b/source/blender/blenkernel/BKE_tracking.h @@ -138,7 +138,7 @@ void BKE_tracking_detect_fast(struct MovieTracking *tracking, struct ListBase *t /* 2D stabilization */ void BKE_tracking_stabilization_data(struct MovieTracking *tracking, int framenr, int width, int height, float loc[2], float *scale, float *angle); struct ImBuf *BKE_tracking_stabilize(struct MovieTracking *tracking, int framenr, struct ImBuf *ibuf, float loc[2], float *scale, float *angle); -void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float scale, float angle, float mat[4][4]); +void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float loc[2], float scale, float angle, float mat[4][4]); /* Distortion/Undistortion */ void BKE_tracking_apply_intrinsics(struct MovieTracking *tracking, float co[2], float nco[2]); diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index c93c03a4424..ce0d169557d 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -279,7 +279,7 @@ typedef struct MovieClipCache { int framenr; int postprocess_flag; - float loc[2], scale, angle; + float loc[2], scale, angle, aspect; int proxy; short render_flag; } stabilized; @@ -727,6 +727,10 @@ static ImBuf *get_stable_cached_frame(MovieClip *clip, MovieClipUser *user, int if(cache->stabilized.postprocess_flag != postprocess_flag) return NULL; + /* stabilization also depends on pixel aspect ratio */ + if(cache->stabilized.aspect != clip->tracking.camera.pixel_aspect) + return NULL; + stableibuf = cache->stabilized.ibuf; BKE_tracking_stabilization_data(&clip->tracking, framenr, stableibuf->x, stableibuf->y, tloc, &tscale, &tangle); @@ -763,6 +767,7 @@ static ImBuf *put_stabilized_frame_to_cache(MovieClip *clip, MovieClipUser *user cache->stabilized.scale = tscale; cache->stabilized.angle = tangle; cache->stabilized.framenr = framenr; + cache->stabilized.aspect = clip->tracking.camera.pixel_aspect; if(clip->flag&MCLIP_USE_PROXY) { cache->stabilized.proxy= rendersize_to_proxy(user, clip->flag); diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c index c9e6ecf6394..04766910df6 100644 --- a/source/blender/blenkernel/intern/tracking.c +++ b/source/blender/blenkernel/intern/tracking.c @@ -2485,6 +2485,7 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, { float firstmedian[2]; MovieTrackingStabilization *stab= &tracking->stabilization; + float aspect= tracking->camera.pixel_aspect; if(stab->ok) return stab->scale; @@ -2535,7 +2536,7 @@ static float stabilization_auto_scale_factor(MovieTracking *tracking, int width, float mat[4][4]; float points[4][2]={{0.0f, 0.0f}, {0.0f, height}, {width, height}, {width, 0.0f}}; - BKE_tracking_stabdata_to_mat4(width, height, loc, scale, angle, mat); + BKE_tracking_stabdata_to_mat4(width, height, aspect, loc, scale, angle, mat); for(i= 0; i<4; i++) { int j; @@ -2650,6 +2651,7 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, MovieTrackingStabilization *stab= &tracking->stabilization; ImBuf *tmpibuf; float width= ibuf->x, height= ibuf->y; + float aspect= tracking->camera.pixel_aspect; if(loc) copy_v2_v2(tloc, loc); if(scale) tscale= *scale; @@ -2688,7 +2690,7 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, float mat[4][4]; int i, j; - BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, tloc, tscale, tangle, mat); + BKE_tracking_stabdata_to_mat4(ibuf->x, ibuf->y, aspect, tloc, tscale, tangle, mat); invert_m4(mat); for(j=0; jy; j++) { @@ -2715,15 +2717,20 @@ ImBuf *BKE_tracking_stabilize(MovieTracking *tracking, int framenr, ImBuf *ibuf, return tmpibuf; } -void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float scale, float angle, float mat[4][4]) +void BKE_tracking_stabdata_to_mat4(int width, int height, float aspect, float loc[2], float scale, float angle, float mat[4][4]) { - float lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4]; + float lmat[4][4], rmat[4][4], smat[4][4], cmat[4][4], icmat[4][4], amat[4][4], iamat[4][4]; float svec[3]= {scale, scale, scale}; unit_m4(rmat); unit_m4(lmat); unit_m4(smat); unit_m4(cmat); + unit_m4(amat); + + /* aspect ratio correction matrix */ + amat[0][0] = 1.0f / aspect; + invert_m4_m4(iamat, amat); /* image center as rotation center */ cmat[3][0]= (float)width/2.0f; @@ -2735,7 +2742,7 @@ void BKE_tracking_stabdata_to_mat4(int width, int height, float loc[2], float sc rotate_m4(rmat, 'Z', angle); /* rotation matrix */ /* compose transformation matrix */ - mul_serie_m4(mat, lmat, cmat, rmat, smat, icmat, NULL, NULL, NULL); + mul_serie_m4(mat, amat, lmat, cmat, rmat, smat, icmat, iamat, NULL); } MovieDistortion *BKE_tracking_distortion_create(void) -- cgit v1.2.3 From 071706e48f720744c82b98409f199b7561cb404c Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Feb 2012 10:54:21 +0000 Subject: Missed this changes needed to fully support animation data in movie clips. Thanks to Joshua pointed into missed changes! --- source/blender/blenkernel/intern/anim_sys.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 9ae3ad95d5c..c3d2425f280 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -794,6 +794,9 @@ void BKE_animdata_main_cb (Main *mainptr, ID_AnimData_Edit_Callback func, void * /* speakers */ ANIMDATA_IDS_CB(mainptr->speaker.first); + /* movie clips */ + ANIMDATA_IDS_CB(mainptr->movieclip.first); + /* objects */ ANIMDATA_IDS_CB(mainptr->object.first); @@ -875,6 +878,9 @@ void BKE_all_animdata_fix_paths_rename (const char *prefix, const char *oldName, /* speakers */ RENAMEFIX_ANIM_IDS(mainptr->speaker.first); + /* movie clips */ + RENAMEFIX_ANIM_IDS(mainptr->movieclip.first); + /* objects */ RENAMEFIX_ANIM_IDS(mainptr->object.first); -- cgit v1.2.3 From 2b7ca2304a9b17568fac57a0bceba72b9c9ab580 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Feb 2012 18:59:41 +0000 Subject: unify include guard defines, __$FILENAME__ without the underscores these clogged up the namespace for autocompleation which was annoying. --- source/blender/blenkernel/BKE_DerivedMesh.h | 4 ++-- source/blender/blenkernel/BKE_action.h | 4 ++-- source/blender/blenkernel/BKE_anim.h | 4 ++-- source/blender/blenkernel/BKE_animsys.h | 6 +++--- source/blender/blenkernel/BKE_armature.h | 4 ++-- source/blender/blenkernel/BKE_blender.h | 4 ++-- source/blender/blenkernel/BKE_bmesh.h | 4 ++-- source/blender/blenkernel/BKE_bmeshCustomData.h | 4 ++-- source/blender/blenkernel/BKE_bmfont.h | 4 ++-- source/blender/blenkernel/BKE_bmfont_types.h | 4 ++-- source/blender/blenkernel/BKE_boids.h | 4 ++-- source/blender/blenkernel/BKE_booleanops_mesh.h | 4 ++-- source/blender/blenkernel/BKE_brush.h | 4 ++-- source/blender/blenkernel/BKE_bullet.h | 4 ++-- source/blender/blenkernel/BKE_bvhutils.h | 4 ++-- source/blender/blenkernel/BKE_camera.h | 4 ++-- source/blender/blenkernel/BKE_cdderivedmesh.h | 4 ++-- source/blender/blenkernel/BKE_cloth.h | 4 ++-- source/blender/blenkernel/BKE_collision.h | 4 ++-- source/blender/blenkernel/BKE_colortools.h | 4 ++-- source/blender/blenkernel/BKE_constraint.h | 4 ++-- source/blender/blenkernel/BKE_context.h | 4 ++-- source/blender/blenkernel/BKE_curve.h | 4 ++-- source/blender/blenkernel/BKE_customdata.h | 4 ++-- source/blender/blenkernel/BKE_customdata_file.h | 6 +++--- source/blender/blenkernel/BKE_deform.h | 4 ++-- source/blender/blenkernel/BKE_depsgraph.h | 4 ++-- source/blender/blenkernel/BKE_displist.h | 4 ++-- source/blender/blenkernel/BKE_dynamicpaint.h | 6 +++--- source/blender/blenkernel/BKE_effect.h | 4 ++-- source/blender/blenkernel/BKE_fcurve.h | 6 +++--- source/blender/blenkernel/BKE_fluidsim.h | 4 ++-- source/blender/blenkernel/BKE_font.h | 4 ++-- source/blender/blenkernel/BKE_global.h | 4 ++-- source/blender/blenkernel/BKE_gpencil.h | 6 +++--- source/blender/blenkernel/BKE_group.h | 4 ++-- source/blender/blenkernel/BKE_icons.h | 6 +++--- source/blender/blenkernel/BKE_idcode.h | 4 ++-- source/blender/blenkernel/BKE_idprop.h | 6 +++--- source/blender/blenkernel/BKE_image.h | 4 ++-- source/blender/blenkernel/BKE_ipo.h | 4 ++-- source/blender/blenkernel/BKE_key.h | 6 +++--- source/blender/blenkernel/BKE_lamp.h | 4 ++-- source/blender/blenkernel/BKE_lattice.h | 4 ++-- source/blender/blenkernel/BKE_library.h | 4 ++-- source/blender/blenkernel/BKE_main.h | 4 ++-- source/blender/blenkernel/BKE_material.h | 4 ++-- source/blender/blenkernel/BKE_mball.h | 4 ++-- source/blender/blenkernel/BKE_mesh.h | 6 +++--- source/blender/blenkernel/BKE_modifier.h | 4 ++-- source/blender/blenkernel/BKE_movieclip.h | 4 ++-- source/blender/blenkernel/BKE_multires.h | 6 +++--- source/blender/blenkernel/BKE_navmesh_conversion.h | 4 ++-- source/blender/blenkernel/BKE_nla.h | 4 ++-- source/blender/blenkernel/BKE_node.h | 4 ++-- source/blender/blenkernel/BKE_object.h | 4 ++-- source/blender/blenkernel/BKE_ocean.h | 4 ++-- source/blender/blenkernel/BKE_packedFile.h | 4 ++-- source/blender/blenkernel/BKE_paint.h | 4 ++-- source/blender/blenkernel/BKE_particle.h | 4 ++-- source/blender/blenkernel/BKE_plugin_types.h | 4 ++-- source/blender/blenkernel/BKE_pointcache.h | 4 ++-- source/blender/blenkernel/BKE_property.h | 4 ++-- source/blender/blenkernel/BKE_report.h | 4 ++-- source/blender/blenkernel/BKE_sca.h | 4 ++-- source/blender/blenkernel/BKE_scene.h | 4 ++-- source/blender/blenkernel/BKE_screen.h | 4 ++-- source/blender/blenkernel/BKE_script.h | 6 +++--- source/blender/blenkernel/BKE_sequencer.h | 6 +++--- source/blender/blenkernel/BKE_shrinkwrap.h | 4 ++-- source/blender/blenkernel/BKE_sketch.h | 4 ++-- source/blender/blenkernel/BKE_smoke.h | 6 +++--- source/blender/blenkernel/BKE_softbody.h | 4 ++-- source/blender/blenkernel/BKE_sound.h | 4 ++-- source/blender/blenkernel/BKE_speaker.h | 4 ++-- source/blender/blenkernel/BKE_subsurf.h | 4 ++-- source/blender/blenkernel/BKE_suggestions.h | 4 ++-- source/blender/blenkernel/BKE_text.h | 4 ++-- source/blender/blenkernel/BKE_texture.h | 4 ++-- source/blender/blenkernel/BKE_tracking.h | 4 ++-- source/blender/blenkernel/BKE_unit.h | 6 +++--- source/blender/blenkernel/BKE_utildefines.h | 6 +++--- source/blender/blenkernel/BKE_world.h | 4 ++-- source/blender/blenkernel/BKE_writeavi.h | 4 ++-- source/blender/blenkernel/BKE_writeffmpeg.h | 4 ++-- source/blender/blenkernel/BKE_writeframeserver.h | 4 ++-- source/blender/blenkernel/depsgraph_private.h | 4 ++-- source/blender/blenkernel/intern/bmesh_private.h | 4 ++-- source/blender/blenkernel/nla_private.h | 6 +++--- 89 files changed, 194 insertions(+), 194 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index a887412bbf4..40e2a4082f6 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DERIVEDMESH_H -#define BKE_DERIVEDMESH_H +#ifndef __BKE_DERIVEDMESH_H__ +#define __BKE_DERIVEDMESH_H__ /** \file BKE_DerivedMesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 67efb7752ea..564cd235869 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ACTION_H -#define BKE_ACTION_H +#ifndef __BKE_ACTION_H__ +#define __BKE_ACTION_H__ /** \file BKE_action.h * \ingroup bke * \brief Blender kernel action and pose functionality. diff --git a/source/blender/blenkernel/BKE_anim.h b/source/blender/blenkernel/BKE_anim.h index a55955c4d04..d605776ed50 100644 --- a/source/blender/blenkernel/BKE_anim.h +++ b/source/blender/blenkernel/BKE_anim.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ANIM_H -#define BKE_ANIM_H +#ifndef __BKE_ANIM_H__ +#define __BKE_ANIM_H__ /** \file BKE_anim.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_animsys.h b/source/blender/blenkernel/BKE_animsys.h index 8e5b313b919..fb4a44b2c80 100644 --- a/source/blender/blenkernel/BKE_animsys.h +++ b/source/blender/blenkernel/BKE_animsys.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ANIM_SYS_H -#define BKE_ANIM_SYS_H +#ifndef __BKE_ANIMSYS_H__ +#define __BKE_ANIMSYS_H__ /** \file BKE_animsys.h * \ingroup bke @@ -160,4 +160,4 @@ void animsys_evaluate_action_group(struct PointerRNA *ptr, struct bAction *act, /* ************************************* */ -#endif /* BKE_ANIM_SYS_H*/ +#endif /* __BKE_ANIMSYS_H__*/ diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 07d8d69f44e..b09122d022b 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ARMATURE_H -#define BKE_ARMATURE_H +#ifndef __BKE_ARMATURE_H__ +#define __BKE_ARMATURE_H__ /** \file BKE_armature.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_blender.h b/source/blender/blenkernel/BKE_blender.h index f735af8b24c..1c661b3804f 100644 --- a/source/blender/blenkernel/BKE_blender.h +++ b/source/blender/blenkernel/BKE_blender.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BLENDER_H -#define BKE_BLENDER_H +#ifndef __BKE_BLENDER_H__ +#define __BKE_BLENDER_H__ /** \file BKE_blender.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmesh.h b/source/blender/blenkernel/BKE_bmesh.h index c8df6c4f455..51fb0da61fa 100644 --- a/source/blender/blenkernel/BKE_bmesh.h +++ b/source/blender/blenkernel/BKE_bmesh.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMESH_H -#define BKE_BMESH_H +#ifndef __BKE_BMESH_H__ +#define __BKE_BMESH_H__ /** \file BKE_bmesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmeshCustomData.h b/source/blender/blenkernel/BKE_bmeshCustomData.h index 793410371df..bbdc6f39cff 100644 --- a/source/blender/blenkernel/BKE_bmeshCustomData.h +++ b/source/blender/blenkernel/BKE_bmeshCustomData.h @@ -26,8 +26,8 @@ */ -#ifndef BKE_BMESHCUSTOMDATA_H -#define BKE_BMESHCUSTOMDATA_H +#ifndef __BKE_BMESHCUSTOMDATA_H__ +#define __BKE_BMESHCUSTOMDATA_H__ /** \file BKE_bmeshCustomData.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmfont.h b/source/blender/blenkernel/BKE_bmfont.h index 71fd2ae3d67..6c0cbe3a51b 100644 --- a/source/blender/blenkernel/BKE_bmfont.h +++ b/source/blender/blenkernel/BKE_bmfont.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMFONT_H -#define BKE_BMFONT_H +#ifndef __BKE_BMFONT_H__ +#define __BKE_BMFONT_H__ /** \file BKE_bmfont.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bmfont_types.h b/source/blender/blenkernel/BKE_bmfont_types.h index a4d37069cab..73ef0c3a2c3 100644 --- a/source/blender/blenkernel/BKE_bmfont_types.h +++ b/source/blender/blenkernel/BKE_bmfont_types.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BMFONT_TYPES_H -#define BKE_BMFONT_TYPES_H +#ifndef __BKE_BMFONT_TYPES_H__ +#define __BKE_BMFONT_TYPES_H__ /** \file BKE_bmfont_types.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_boids.h b/source/blender/blenkernel/BKE_boids.h index 18e8be1512e..bb724c6632e 100644 --- a/source/blender/blenkernel/BKE_boids.h +++ b/source/blender/blenkernel/BKE_boids.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BOIDS_H -#define BKE_BOIDS_H +#ifndef __BKE_BOIDS_H__ +#define __BKE_BOIDS_H__ /** \file BKE_boids.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_booleanops_mesh.h b/source/blender/blenkernel/BKE_booleanops_mesh.h index 4c4a2dc9998..2e48b664449 100644 --- a/source/blender/blenkernel/BKE_booleanops_mesh.h +++ b/source/blender/blenkernel/BKE_booleanops_mesh.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BOOLEANOPS_MESH_H -#define BKE_BOOLEANOPS_MESH_H +#ifndef __BKE_BOOLEANOPS_MESH_H__ +#define __BKE_BOOLEANOPS_MESH_H__ /** \file BKE_booleanops_mesh.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_brush.h b/source/blender/blenkernel/BKE_brush.h index 13f72634bda..f5cd2635ff7 100644 --- a/source/blender/blenkernel/BKE_brush.h +++ b/source/blender/blenkernel/BKE_brush.h @@ -26,8 +26,8 @@ * General operations for brushes. */ -#ifndef BKE_BRUSH_H -#define BKE_BRUSH_H +#ifndef __BKE_BRUSH_H__ +#define __BKE_BRUSH_H__ /** \file BKE_brush.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bullet.h b/source/blender/blenkernel/BKE_bullet.h index 5eb653f69d1..2103eea1041 100644 --- a/source/blender/blenkernel/BKE_bullet.h +++ b/source/blender/blenkernel/BKE_bullet.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BULLET_H -#define BKE_BULLET_H +#ifndef __BKE_BULLET_H__ +#define __BKE_BULLET_H__ /** \file BKE_bullet.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index 07f0c2fef7c..d3d8546ddae 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_BVHUTILS_H -#define BKE_BVHUTILS_H +#ifndef __BKE_BVHUTILS_H__ +#define __BKE_BVHUTILS_H__ /** \file BKE_bvhutils.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_camera.h b/source/blender/blenkernel/BKE_camera.h index 72e22dc1583..6d10219e74c 100644 --- a/source/blender/blenkernel/BKE_camera.h +++ b/source/blender/blenkernel/BKE_camera.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CAMERA_H -#define BKE_CAMERA_H +#ifndef __BKE_CAMERA_H__ +#define __BKE_CAMERA_H__ /** \file BKE_camera.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h index c71c86e110d..9b274a8a411 100644 --- a/source/blender/blenkernel/BKE_cdderivedmesh.h +++ b/source/blender/blenkernel/BKE_cdderivedmesh.h @@ -32,8 +32,8 @@ * mesh elements (vertices, edges and faces) as layers of custom element data. */ -#ifndef BKE_CDDERIVEDMESH_H -#define BKE_CDDERIVEDMESH_H +#ifndef __BKE_CDDERIVEDMESH_H__ +#define __BKE_CDDERIVEDMESH_H__ #include "BKE_DerivedMesh.h" diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 6d42b8dc80b..ec20e3234a3 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CLOTH_H -#define BKE_CLOTH_H +#ifndef __BKE_CLOTH_H__ +#define __BKE_CLOTH_H__ /** \file BKE_cloth.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_collision.h b/source/blender/blenkernel/BKE_collision.h index acb3ae03816..453c16bb8c8 100644 --- a/source/blender/blenkernel/BKE_collision.h +++ b/source/blender/blenkernel/BKE_collision.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_COLLISIONS_H -#define BKE_COLLISIONS_H +#ifndef __BKE_COLLISION_H__ +#define __BKE_COLLISION_H__ /** \file BKE_collision.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_colortools.h b/source/blender/blenkernel/BKE_colortools.h index b358209a0f4..1da0caf97c2 100644 --- a/source/blender/blenkernel/BKE_colortools.h +++ b/source/blender/blenkernel/BKE_colortools.h @@ -24,8 +24,8 @@ * * ***** END GPL/BL DUAL LICENSE BLOCK ***** */ -#ifndef BKE_COLORTOOLS_H -#define BKE_COLORTOOLS_H +#ifndef __BKE_COLORTOOLS_H__ +#define __BKE_COLORTOOLS_H__ /** \file BKE_colortools.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_constraint.h b/source/blender/blenkernel/BKE_constraint.h index 925d1180dbd..f834ad5e774 100644 --- a/source/blender/blenkernel/BKE_constraint.h +++ b/source/blender/blenkernel/BKE_constraint.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CONSTRAINT_H -#define BKE_CONSTRAINT_H +#ifndef __BKE_CONSTRAINT_H__ +#define __BKE_CONSTRAINT_H__ /** \file BKE_constraint.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h index 0aefe2231a5..78354cd4713 100644 --- a/source/blender/blenkernel/BKE_context.h +++ b/source/blender/blenkernel/BKE_context.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CONTEXT_H -#define BKE_CONTEXT_H +#ifndef __BKE_CONTEXT_H__ +#define __BKE_CONTEXT_H__ /** \file BKE_context.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_curve.h b/source/blender/blenkernel/BKE_curve.h index f0704741ebb..dd0c021f281 100644 --- a/source/blender/blenkernel/BKE_curve.h +++ b/source/blender/blenkernel/BKE_curve.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CURVE_H -#define BKE_CURVE_H +#ifndef __BKE_CURVE_H__ +#define __BKE_CURVE_H__ /** \file BKE_curve.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 7ad25ac7e79..764088da47b 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -31,8 +31,8 @@ * \brief CustomData interface, see also DNA_customdata_types.h. */ -#ifndef BKE_CUSTOMDATA_H -#define BKE_CUSTOMDATA_H +#ifndef __BKE_CUSTOMDATA_H__ +#define __BKE_CUSTOMDATA_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenkernel/BKE_customdata_file.h b/source/blender/blenkernel/BKE_customdata_file.h index be7aaa70188..c4c41c20d80 100644 --- a/source/blender/blenkernel/BKE_customdata_file.h +++ b/source/blender/blenkernel/BKE_customdata_file.h @@ -18,8 +18,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_CUSTOMDATA_FILE_H -#define BKE_CUSTOMDATA_FILE_H +#ifndef __BKE_CUSTOMDATA_FILE_H__ +#define __BKE_CUSTOMDATA_FILE_H__ /** \file BKE_customdata_file.h * \ingroup bke @@ -57,5 +57,5 @@ void cdf_remove(const char *filename); CDataFileLayer *cdf_layer_find(CDataFile *cdf, int type, const char *name); CDataFileLayer *cdf_layer_add(CDataFile *cdf, int type, const char *name, size_t datasize); -#endif /* BKE_CUSTOMDATA_FILE_H */ +#endif /* __BKE_CUSTOMDATA_FILE_H__ */ diff --git a/source/blender/blenkernel/BKE_deform.h b/source/blender/blenkernel/BKE_deform.h index 11747899aa9..2e9c94a3bb1 100644 --- a/source/blender/blenkernel/BKE_deform.h +++ b/source/blender/blenkernel/BKE_deform.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DEFORM_H -#define BKE_DEFORM_H +#ifndef __BKE_DEFORM_H__ +#define __BKE_DEFORM_H__ /** \file BKE_deform.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_depsgraph.h b/source/blender/blenkernel/BKE_depsgraph.h index 5d475903feb..1bc85a64c77 100644 --- a/source/blender/blenkernel/BKE_depsgraph.h +++ b/source/blender/blenkernel/BKE_depsgraph.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef DEPSGRAPH_API -#define DEPSGRAPH_API +#ifndef __BKE_DEPSGRAPH_H__ +#define __BKE_DEPSGRAPH_H__ /** \file BKE_depsgraph.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_displist.h b/source/blender/blenkernel/BKE_displist.h index 2d863201767..f43ec749a69 100644 --- a/source/blender/blenkernel/BKE_displist.h +++ b/source/blender/blenkernel/BKE_displist.h @@ -27,8 +27,8 @@ */ -#ifndef BKE_DISPLIST_H -#define BKE_DISPLIST_H +#ifndef __BKE_DISPLIST_H__ +#define __BKE_DISPLIST_H__ /** \file BKE_displist.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index 75b3c5b4f24..b6de8188536 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -11,8 +11,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_DYNAMIC_PAINT_H_ -#define BKE_DYNAMIC_PAINT_H_ +#ifndef __BKE_DYNAMICPAINT_H__ +#define __BKE_DYNAMICPAINT_H__ struct bContext; struct wmOperator; @@ -88,4 +88,4 @@ void dynamicPaint_outputSurfaceImage(struct DynamicPaintSurface *surface, char* #define DPAINT_WAVE_OBSTACLE 1 #define DPAINT_WAVE_REFLECT_ONLY 2 -#endif /* BKE_DYNAMIC_PAINT_H_ */ +#endif /* __BKE_DYNAMICPAINT_H__ */ diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h index 3ebd57dde39..c2706ddb5c0 100644 --- a/source/blender/blenkernel/BKE_effect.h +++ b/source/blender/blenkernel/BKE_effect.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_EFFECT_H -#define BKE_EFFECT_H +#ifndef __BKE_EFFECT_H__ +#define __BKE_EFFECT_H__ /** \file BKE_effect.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index 27e9140ba77..d79d6a204b9 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_FCURVE_H -#define BKE_FCURVE_H +#ifndef __BKE_FCURVE_H__ +#define __BKE_FCURVE_H__ /** \file BKE_fcurve.h * \ingroup bke @@ -270,4 +270,4 @@ void fcurve_store_samples(struct FCurve *fcu, void *data, int start, int end, Fc } #endif -#endif /* BKE_FCURVE_H*/ +#endif /* __BKE_FCURVE_H__*/ diff --git a/source/blender/blenkernel/BKE_fluidsim.h b/source/blender/blenkernel/BKE_fluidsim.h index 2b2c7a4ff87..c2b1b1d6cad 100644 --- a/source/blender/blenkernel/BKE_fluidsim.h +++ b/source/blender/blenkernel/BKE_fluidsim.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_FLUIDSIM_H -#define BKE_FLUIDSIM_H +#ifndef __BKE_FLUIDSIM_H__ +#define __BKE_FLUIDSIM_H__ /** \file BKE_fluidsim.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_font.h b/source/blender/blenkernel/BKE_font.h index e164294b9a2..e94787cfd3c 100644 --- a/source/blender/blenkernel/BKE_font.h +++ b/source/blender/blenkernel/BKE_font.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_VFONT_H -#define BKE_VFONT_H +#ifndef __BKE_FONT_H__ +#define __BKE_FONT_H__ /** \file BKE_font.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_global.h b/source/blender/blenkernel/BKE_global.h index ee3edbb47e7..fab42b5667b 100644 --- a/source/blender/blenkernel/BKE_global.h +++ b/source/blender/blenkernel/BKE_global.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GLOBAL_H -#define BKE_GLOBAL_H +#ifndef __BKE_GLOBAL_H__ +#define __BKE_GLOBAL_H__ /** \file BKE_global.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h index dbb1107c228..bb0216fe11c 100644 --- a/source/blender/blenkernel/BKE_gpencil.h +++ b/source/blender/blenkernel/BKE_gpencil.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GPENCIL_H -#define BKE_GPENCIL_H +#ifndef __BKE_GPENCIL_H__ +#define __BKE_GPENCIL_H__ /** \file BKE_gpencil.h * \ingroup bke @@ -63,4 +63,4 @@ struct bGPDlayer *gpencil_layer_getactive(struct bGPdata *gpd); void gpencil_layer_setactive(struct bGPdata *gpd, struct bGPDlayer *active); void gpencil_layer_delactive(struct bGPdata *gpd); -#endif /* BKE_GPENCIL_H */ +#endif /* __BKE_GPENCIL_H__ */ diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h index 044a40658c3..6629f0bdf7f 100644 --- a/source/blender/blenkernel/BKE_group.h +++ b/source/blender/blenkernel/BKE_group.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_GROUP_H -#define BKE_GROUP_H +#ifndef __BKE_GROUP_H__ +#define __BKE_GROUP_H__ /** \file BKE_group.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index ee18a41dbfe..85f259c3d94 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ICONS_H -#define BKE_ICONS_H +#ifndef __BKE_ICONS_H__ +#define __BKE_ICONS_H__ /** \file BKE_icons.h * \ingroup bke @@ -90,4 +90,4 @@ struct PreviewImage* BKE_previewimg_copy(struct PreviewImage *prv); /* retrieve existing or create new preview image */ struct PreviewImage* BKE_previewimg_get(struct ID *id); -#endif /* BKE_ICONS_H */ +#endif /* __BKE_ICONS_H__ */ diff --git a/source/blender/blenkernel/BKE_idcode.h b/source/blender/blenkernel/BKE_idcode.h index 57855a7082f..2188bed1bf7 100644 --- a/source/blender/blenkernel/BKE_idcode.h +++ b/source/blender/blenkernel/BKE_idcode.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_ID_INFO_H -#define BKE_ID_INFO_H +#ifndef __BKE_IDCODE_H__ +#define __BKE_IDCODE_H__ /** \file BKE_idcode.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_idprop.h b/source/blender/blenkernel/BKE_idprop.h index fbe5bf2ef44..5a661f7c731 100644 --- a/source/blender/blenkernel/BKE_idprop.h +++ b/source/blender/blenkernel/BKE_idprop.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef _BKE_IDPROP_H -#define _BKE_IDPROP_H +#ifndef __BKE_IDPROP_H__ +#define __BKE_IDPROP_H__ /** \file BKE_idprop.h * \ingroup bke @@ -204,4 +204,4 @@ void IDP_UnlinkProperty(struct IDProperty *prop); #define IDP_IDPArray(prop) ((IDProperty*)(prop)->data.pointer) #define IDP_Double(prop) (*(double*)&(prop)->data.val) -#endif /* _BKE_IDPROP_H */ +#endif /* __BKE_IDPROP_H__ */ diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 5cdc3537f5b..5055372b68f 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_IMAGE_H -#define BKE_IMAGE_H +#ifndef __BKE_IMAGE_H__ +#define __BKE_IMAGE_H__ /** \file BKE_image.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_ipo.h b/source/blender/blenkernel/BKE_ipo.h index d21b0597976..547e7de7634 100644 --- a/source/blender/blenkernel/BKE_ipo.h +++ b/source/blender/blenkernel/BKE_ipo.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_IPO_H -#define BKE_IPO_H +#ifndef __BKE_IPO_H__ +#define __BKE_IPO_H__ /** \file BKE_ipo.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_key.h b/source/blender/blenkernel/BKE_key.h index c055bb2004b..c1f75baf8ff 100644 --- a/source/blender/blenkernel/BKE_key.h +++ b/source/blender/blenkernel/BKE_key.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_KEY_H -#define BKE_KEY_H +#ifndef __BKE_KEY_H__ +#define __BKE_KEY_H__ /** \file BKE_key.h * \ingroup bke @@ -87,4 +87,4 @@ extern int slurph_opt; }; #endif -#endif // BKE_KEY_H +#endif // __BKE_KEY_H__ diff --git a/source/blender/blenkernel/BKE_lamp.h b/source/blender/blenkernel/BKE_lamp.h index cc9452ae155..50e25576320 100644 --- a/source/blender/blenkernel/BKE_lamp.h +++ b/source/blender/blenkernel/BKE_lamp.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LAMP_H -#define BKE_LAMP_H +#ifndef __BKE_LAMP_H__ +#define __BKE_LAMP_H__ /** \file BKE_lamp.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_lattice.h b/source/blender/blenkernel/BKE_lattice.h index b5395309896..8a1529a7ad0 100644 --- a/source/blender/blenkernel/BKE_lattice.h +++ b/source/blender/blenkernel/BKE_lattice.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LATTICE_H -#define BKE_LATTICE_H +#ifndef __BKE_LATTICE_H__ +#define __BKE_LATTICE_H__ /** \file BKE_lattice.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index e8d6c85664b..e18a510ac07 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_LIBRARY_TYPES_H -#define BKE_LIBRARY_TYPES_H +#ifndef __BKE_LIBRARY_H__ +#define __BKE_LIBRARY_H__ /** \file BKE_library.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_main.h b/source/blender/blenkernel/BKE_main.h index 05ba60b8a5b..ffcbb6e40bc 100644 --- a/source/blender/blenkernel/BKE_main.h +++ b/source/blender/blenkernel/BKE_main.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MAIN_H -#define BKE_MAIN_H +#ifndef __BKE_MAIN_H__ +#define __BKE_MAIN_H__ /** \file BKE_main.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h index 0079ecb7d9c..3e73f6b9dd9 100644 --- a/source/blender/blenkernel/BKE_material.h +++ b/source/blender/blenkernel/BKE_material.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MATERIAL_H -#define BKE_MATERIAL_H +#ifndef __BKE_MATERIAL_H__ +#define __BKE_MATERIAL_H__ /** \file BKE_material.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_mball.h b/source/blender/blenkernel/BKE_mball.h index 3dde54fd811..e3b5a006edf 100644 --- a/source/blender/blenkernel/BKE_mball.h +++ b/source/blender/blenkernel/BKE_mball.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MBALL_H -#define BKE_MBALL_H +#ifndef __BKE_MBALL_H__ +#define __BKE_MBALL_H__ /** \file BKE_mball.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index 30a4b154e31..ba6bf330b1e 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MESH_H -#define BKE_MESH_H +#ifndef __BKE_MESH_H__ +#define __BKE_MESH_H__ /** \file BKE_mesh.h * \ingroup bke @@ -213,4 +213,4 @@ void mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ld } #endif -#endif /* BKE_MESH_H */ +#endif /* __BKE_MESH_H__ */ diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index f72bc5b93ec..895fe64bea8 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MODIFIER_H -#define BKE_MODIFIER_H +#ifndef __BKE_MODIFIER_H__ +#define __BKE_MODIFIER_H__ /** \file BKE_modifier.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_movieclip.h b/source/blender/blenkernel/BKE_movieclip.h index eabbf459584..2d78e924c90 100644 --- a/source/blender/blenkernel/BKE_movieclip.h +++ b/source/blender/blenkernel/BKE_movieclip.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MOVIECLIP_H -#define BKE_MOVIECLIP_H +#ifndef __BKE_MOVIECLIP_H__ +#define __BKE_MOVIECLIP_H__ /** \file BKE_movieclip.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index 4f1262cd523..53a92f8c2ce 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_MULTIRES_H -#define BKE_MULTIRES_H +#ifndef __BKE_MULTIRES_H__ +#define __BKE_MULTIRES_H__ /** \file BKE_multires.h * \ingroup bke @@ -94,5 +94,5 @@ void mdisp_apply_weight(const int S, const int corners, int x, int y, const int void mdisp_flip_disp(const int S, const int corners, const float axis_x[2], const float axis_y[2], float disp[3]); void mdisp_join_tris(struct MDisps *dst, struct MDisps *tri1, struct MDisps *tri2); -#endif // BKE_MULTIRES_H +#endif // __BKE_MULTIRES_H__ diff --git a/source/blender/blenkernel/BKE_navmesh_conversion.h b/source/blender/blenkernel/BKE_navmesh_conversion.h index ab5c2b19707..8de53ed8b8e 100644 --- a/source/blender/blenkernel/BKE_navmesh_conversion.h +++ b/source/blender/blenkernel/BKE_navmesh_conversion.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NAVMESH_CONVERSION_H -#define BKE_NAVMESH_CONVERSION_H +#ifndef __BKE_NAVMESH_CONVERSION_H__ +#define __BKE_NAVMESH_CONVERSION_H__ struct DerivedMesh; diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index 773c5ced1cb..921972c9fa8 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NLA_H -#define BKE_NLA_H +#ifndef __BKE_NLA_H__ +#define __BKE_NLA_H__ /** \file BKE_nla.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h index 0cccd8a366b..ae2f9305894 100644 --- a/source/blender/blenkernel/BKE_node.h +++ b/source/blender/blenkernel/BKE_node.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_NODE_H -#define BKE_NODE_H +#ifndef __BKE_NODE_H__ +#define __BKE_NODE_H__ /** \file BKE_node.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_object.h b/source/blender/blenkernel/BKE_object.h index 828b0b47e3a..ac703663864 100644 --- a/source/blender/blenkernel/BKE_object.h +++ b/source/blender/blenkernel/BKE_object.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_OBJECT_H -#define BKE_OBJECT_H +#ifndef __BKE_OBJECT_H__ +#define __BKE_OBJECT_H__ /** \file BKE_object.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_ocean.h b/source/blender/blenkernel/BKE_ocean.h index c8ce3f8ce63..7c0d99b35ea 100644 --- a/source/blender/blenkernel/BKE_ocean.h +++ b/source/blender/blenkernel/BKE_ocean.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_OCEAN_H -#define BKE_OCEAN_H +#ifndef __BKE_OCEAN_H__ +#define __BKE_OCEAN_H__ #ifdef __cplusplus extern "C" { diff --git a/source/blender/blenkernel/BKE_packedFile.h b/source/blender/blenkernel/BKE_packedFile.h index 606d6167937..1eff20cbd57 100644 --- a/source/blender/blenkernel/BKE_packedFile.h +++ b/source/blender/blenkernel/BKE_packedFile.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PACKEDFILE_H -#define BKE_PACKEDFILE_H +#ifndef __BKE_PACKEDFILE_H__ +#define __BKE_PACKEDFILE_H__ /** \file BKE_packedFile.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h index 081b79b44d6..c048dad82eb 100644 --- a/source/blender/blenkernel/BKE_paint.h +++ b/source/blender/blenkernel/BKE_paint.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PAINT_H -#define BKE_PAINT_H +#ifndef __BKE_PAINT_H__ +#define __BKE_PAINT_H__ /** \file BKE_paint.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h index dbefbd95a15..c03ecca17cf 100644 --- a/source/blender/blenkernel/BKE_particle.h +++ b/source/blender/blenkernel/BKE_particle.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PARTICLE_H -#define BKE_PARTICLE_H +#ifndef __BKE_PARTICLE_H__ +#define __BKE_PARTICLE_H__ /** \file BKE_particle.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_plugin_types.h b/source/blender/blenkernel/BKE_plugin_types.h index 73c6dae35cf..8f9706f9833 100644 --- a/source/blender/blenkernel/BKE_plugin_types.h +++ b/source/blender/blenkernel/BKE_plugin_types.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PLUGIN_TYPES_H -#define BKE_PLUGIN_TYPES_H +#ifndef __BKE_PLUGIN_TYPES_H__ +#define __BKE_PLUGIN_TYPES_H__ /** \file BKE_plugin_types.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index d1b0acf7142..38f0503b40d 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_POINTCACHE_H -#define BKE_POINTCACHE_H +#ifndef __BKE_POINTCACHE_H__ +#define __BKE_POINTCACHE_H__ /** \file BKE_pointcache.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_property.h b/source/blender/blenkernel/BKE_property.h index 779c83acf21..a29dc0e7be4 100644 --- a/source/blender/blenkernel/BKE_property.h +++ b/source/blender/blenkernel/BKE_property.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_PROPERTY_H -#define BKE_PROPERTY_H +#ifndef __BKE_PROPERTY_H__ +#define __BKE_PROPERTY_H__ /** \file BKE_property.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_report.h b/source/blender/blenkernel/BKE_report.h index 784f8a63757..fd372ae6d83 100644 --- a/source/blender/blenkernel/BKE_report.h +++ b/source/blender/blenkernel/BKE_report.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_REPORT_H -#define BKE_REPORT_H +#ifndef __BKE_REPORT_H__ +#define __BKE_REPORT_H__ /** \file BKE_report.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sca.h b/source/blender/blenkernel/BKE_sca.h index cfcc0e146d8..22b44511195 100644 --- a/source/blender/blenkernel/BKE_sca.h +++ b/source/blender/blenkernel/BKE_sca.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCA_H -#define BKE_SCA_H +#ifndef __BKE_SCA_H__ +#define __BKE_SCA_H__ /** \file BKE_sca.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_scene.h b/source/blender/blenkernel/BKE_scene.h index 2df5e7ac2c6..e46d99ed873 100644 --- a/source/blender/blenkernel/BKE_scene.h +++ b/source/blender/blenkernel/BKE_scene.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCENE_H -#define BKE_SCENE_H +#ifndef __BKE_SCENE_H__ +#define __BKE_SCENE_H__ /** \file BKE_scene.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h index 44b92f70519..c254144b812 100644 --- a/source/blender/blenkernel/BKE_screen.h +++ b/source/blender/blenkernel/BKE_screen.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCREEN_H -#define BKE_SCREEN_H +#ifndef __BKE_SCREEN_H__ +#define __BKE_SCREEN_H__ /** \file BKE_screen.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_script.h b/source/blender/blenkernel/BKE_script.h index d8ceaf23652..7bd801a8177 100644 --- a/source/blender/blenkernel/BKE_script.h +++ b/source/blender/blenkernel/BKE_script.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SCRIPT_H -#define BKE_SCRIPT_H +#ifndef __BKE_SCRIPT_H__ +#define __BKE_SCRIPT_H__ /** \file BKE_script.h * \ingroup bke @@ -46,4 +46,4 @@ void free_script (struct Script *script); } #endif -#endif /* BKE_SCRIPT_H */ +#endif /* __BKE_SCRIPT_H__ */ diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index ed0730b7f09..5c6058b1453 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SEQUENCER_H -#define BKE_SEQUENCER_H +#ifndef __BKE_SEQUENCER_H__ +#define __BKE_SEQUENCER_H__ /** \file BKE_sequencer.h * \ingroup bke @@ -341,4 +341,4 @@ extern SequencerDrawView sequencer_view3d_cb; extern ListBase seqbase_clipboard; extern int seqbase_clipboard_frame; -#endif // BKE_SEQUENCER_H +#endif // __BKE_SEQUENCER_H__ diff --git a/source/blender/blenkernel/BKE_shrinkwrap.h b/source/blender/blenkernel/BKE_shrinkwrap.h index d1fef8b0ce1..446084053de 100644 --- a/source/blender/blenkernel/BKE_shrinkwrap.h +++ b/source/blender/blenkernel/BKE_shrinkwrap.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SHRINKWRAP_H -#define BKE_SHRINKWRAP_H +#ifndef __BKE_SHRINKWRAP_H__ +#define __BKE_SHRINKWRAP_H__ /** \file BKE_shrinkwrap.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sketch.h b/source/blender/blenkernel/BKE_sketch.h index 1dd82c1d8e6..76b3dbacf7f 100644 --- a/source/blender/blenkernel/BKE_sketch.h +++ b/source/blender/blenkernel/BKE_sketch.h @@ -19,8 +19,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SKETCH_H -#define BKE_SKETCH_H +#ifndef __BKE_SKETCH_H__ +#define __BKE_SKETCH_H__ /** \file BKE_sketch.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h index 51acef44f52..1e97bc07f99 100644 --- a/source/blender/blenkernel/BKE_smoke.h +++ b/source/blender/blenkernel/BKE_smoke.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SMOKE_H_ -#define BKE_SMOKE_H_ +#ifndef __BKE_SMOKE_H__ +#define __BKE_SMOKE_H__ /** \file BKE_smoke.h * \ingroup bke @@ -45,4 +45,4 @@ void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData long long smoke_get_mem_req(int xres, int yres, int zres, int amplify); -#endif /* BKE_SMOKE_H_ */ +#endif /* __BKE_SMOKE_H__ */ diff --git a/source/blender/blenkernel/BKE_softbody.h b/source/blender/blenkernel/BKE_softbody.h index c889aa83b9a..6714225f513 100644 --- a/source/blender/blenkernel/BKE_softbody.h +++ b/source/blender/blenkernel/BKE_softbody.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SOFTBODY_H -#define BKE_SOFTBODY_H +#ifndef __BKE_SOFTBODY_H__ +#define __BKE_SOFTBODY_H__ /** \file BKE_softbody.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index fdf1d09559d..90477647b88 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SOUND_H -#define BKE_SOUND_H +#ifndef __BKE_SOUND_H__ +#define __BKE_SOUND_H__ /** \file BKE_sound.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_speaker.h b/source/blender/blenkernel/BKE_speaker.h index d309c048f1a..fddcfb2c7f3 100644 --- a/source/blender/blenkernel/BKE_speaker.h +++ b/source/blender/blenkernel/BKE_speaker.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SPEAKER_H -#define BKE_SPEAKER_H +#ifndef __BKE_SPEAKER_H__ +#define __BKE_SPEAKER_H__ /** \file BKE_speaker.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_subsurf.h b/source/blender/blenkernel/BKE_subsurf.h index dcbd045f62d..5e56cc7b3be 100644 --- a/source/blender/blenkernel/BKE_subsurf.h +++ b/source/blender/blenkernel/BKE_subsurf.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SUBSURF_H -#define BKE_SUBSURF_H +#ifndef __BKE_SUBSURF_H__ +#define __BKE_SUBSURF_H__ /** \file BKE_subsurf.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_suggestions.h b/source/blender/blenkernel/BKE_suggestions.h index a0a270422c7..6168b98ac4c 100644 --- a/source/blender/blenkernel/BKE_suggestions.h +++ b/source/blender/blenkernel/BKE_suggestions.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_SUGGESTIONS_H -#define BKE_SUGGESTIONS_H +#ifndef __BKE_SUGGESTIONS_H__ +#define __BKE_SUGGESTIONS_H__ /** \file BKE_suggestions.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_text.h b/source/blender/blenkernel/BKE_text.h index f0c054560c4..504b859c183 100644 --- a/source/blender/blenkernel/BKE_text.h +++ b/source/blender/blenkernel/BKE_text.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TEXT_H -#define BKE_TEXT_H +#ifndef __BKE_TEXT_H__ +#define __BKE_TEXT_H__ /** \file BKE_text.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h index a67a06ef9fb..2574c45eec2 100644 --- a/source/blender/blenkernel/BKE_texture.h +++ b/source/blender/blenkernel/BKE_texture.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TEXTURE_H -#define BKE_TEXTURE_H +#ifndef __BKE_TEXTURE_H__ +#define __BKE_TEXTURE_H__ /** \file BKE_texture.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_tracking.h b/source/blender/blenkernel/BKE_tracking.h index ebbba7de7c7..1be858ecf80 100644 --- a/source/blender/blenkernel/BKE_tracking.h +++ b/source/blender/blenkernel/BKE_tracking.h @@ -24,8 +24,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_TRACKING_H -#define BKE_TRACKING_H +#ifndef __BKE_TRACKING_H__ +#define __BKE_TRACKING_H__ /** \file BKE_trackingp.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_unit.h b/source/blender/blenkernel/BKE_unit.h index db586f6d262..e3ad49e2225 100644 --- a/source/blender/blenkernel/BKE_unit.h +++ b/source/blender/blenkernel/BKE_unit.h @@ -20,8 +20,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_UNIT_H -#define BKE_UNIT_H +#ifndef __BKE_UNIT_H__ +#define __BKE_UNIT_H__ /** \file BKE_unit.h * \ingroup bke @@ -76,4 +76,4 @@ double bUnit_GetScaler(void *usys_pt, int index); } #endif -#endif /* BKE_UNIT_H */ +#endif /* __BKE_UNIT_H__ */ diff --git a/source/blender/blenkernel/BKE_utildefines.h b/source/blender/blenkernel/BKE_utildefines.h index a6a9bb0c0f6..39458cb3a13 100644 --- a/source/blender/blenkernel/BKE_utildefines.h +++ b/source/blender/blenkernel/BKE_utildefines.h @@ -33,8 +33,8 @@ */ -#ifndef BKE_UTILDEFINES_H -#define BKE_UTILDEFINES_H +#ifndef __BKE_UTILDEFINES_H__ +#define __BKE_UTILDEFINES_H__ #ifdef __cplusplus extern "C" { @@ -89,4 +89,4 @@ extern "C" { } #endif -#endif // BKE_UTILDEFINES_H +#endif // __BKE_UTILDEFINES_H__ diff --git a/source/blender/blenkernel/BKE_world.h b/source/blender/blenkernel/BKE_world.h index fe25279dcfb..16ff3acaf71 100644 --- a/source/blender/blenkernel/BKE_world.h +++ b/source/blender/blenkernel/BKE_world.h @@ -24,8 +24,8 @@ * * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WORLD_H -#define BKE_WORLD_H +#ifndef __BKE_WORLD_H__ +#define __BKE_WORLD_H__ /** \file BKE_world.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeavi.h b/source/blender/blenkernel/BKE_writeavi.h index c906761f3d7..03174fb5284 100644 --- a/source/blender/blenkernel/BKE_writeavi.h +++ b/source/blender/blenkernel/BKE_writeavi.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEAVI_H -#define BKE_WRITEAVI_H +#ifndef __BKE_WRITEAVI_H__ +#define __BKE_WRITEAVI_H__ /** \file BKE_writeavi.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeffmpeg.h b/source/blender/blenkernel/BKE_writeffmpeg.h index 4c42d1e4a6c..299f8e185cf 100644 --- a/source/blender/blenkernel/BKE_writeffmpeg.h +++ b/source/blender/blenkernel/BKE_writeffmpeg.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEFFMPEG_H -#define BKE_WRITEFFMPEG_H +#ifndef __BKE_WRITEFFMPEG_H__ +#define __BKE_WRITEFFMPEG_H__ /** \file BKE_writeffmpeg.h * \ingroup bke diff --git a/source/blender/blenkernel/BKE_writeframeserver.h b/source/blender/blenkernel/BKE_writeframeserver.h index 040550d8faa..cb607e1473c 100644 --- a/source/blender/blenkernel/BKE_writeframeserver.h +++ b/source/blender/blenkernel/BKE_writeframeserver.h @@ -25,8 +25,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef BKE_WRITEFRAMESERVER_H -#define BKE_WRITEFRAMESERVER_H +#ifndef __BKE_WRITEFRAMESERVER_H__ +#define __BKE_WRITEFRAMESERVER_H__ /** \file BKE_writeframeserver.h * \ingroup bke diff --git a/source/blender/blenkernel/depsgraph_private.h b/source/blender/blenkernel/depsgraph_private.h index 0338d10a66d..0db3c5615f5 100644 --- a/source/blender/blenkernel/depsgraph_private.h +++ b/source/blender/blenkernel/depsgraph_private.h @@ -27,8 +27,8 @@ * \ingroup bke */ -#ifndef DEPSGRAPH_PRIVATE -#define DEPSGRAPH_PRIVATE +#ifndef __DEPSGRAPH_PRIVATE_H__ +#define __DEPSGRAPH_PRIVATE_H__ #include "BKE_depsgraph.h" #include "DNA_constraint_types.h" diff --git a/source/blender/blenkernel/intern/bmesh_private.h b/source/blender/blenkernel/intern/bmesh_private.h index d0b03883e6e..10074813fae 100644 --- a/source/blender/blenkernel/intern/bmesh_private.h +++ b/source/blender/blenkernel/intern/bmesh_private.h @@ -35,8 +35,8 @@ */ -#ifndef BMESH_PRIVATE -#define BMESH_PRIVATE +#ifndef __BMESH_PRIVATE_H__ +#define __BMESH_PRIVATE_H__ #include "BKE_bmesh.h" diff --git a/source/blender/blenkernel/nla_private.h b/source/blender/blenkernel/nla_private.h index e287606921b..51a7ac7ee62 100644 --- a/source/blender/blenkernel/nla_private.h +++ b/source/blender/blenkernel/nla_private.h @@ -30,8 +30,8 @@ */ -#ifndef NLA_PRIVATE -#define NLA_PRIVATE +#ifndef __NLA_PRIVATE_H__ +#define __NLA_PRIVATE_H__ /* --------------- NLA Evaluation DataTypes ----------------------- */ @@ -85,4 +85,4 @@ NlaEvalStrip *nlastrips_ctime_get_strip(ListBase *list, ListBase *strips, short void nlastrip_evaluate(PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes); void nladata_flush_channels(ListBase *channels); -#endif // NLA_PRIVATE +#endif // __NLA_PRIVATE_H__ -- cgit v1.2.3 From 61596d5bb365a96b4b19adf0ef72ec1ea47212aa Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 17 Feb 2012 19:21:47 +0000 Subject: patch [#30227] Various MSVC (32-bit) Warning and Typo Fixes made some small edits - removed changes to AVI reading since the data types are apart of the format spec. - absf -> abs for a double value in render code. --- source/blender/blenkernel/BKE_image.h | 4 ++-- source/blender/blenkernel/intern/pointcache.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 5055372b68f..722ead80ad9 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -54,10 +54,10 @@ int BKE_alphatest_ibuf(struct ImBuf *ibuf); int BKE_write_ibuf_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); int BKE_write_ibuf(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf); int BKE_write_ibuf_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy); -void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, char imtype, const short use_ext, const short use_frames); +void BKE_makepicstring(char *string, const char *base, const char *relbase, int frame, const char imtype, const short use_ext, const short use_frames); int BKE_add_image_extension(char *string, const char imtype); char BKE_ftype_to_imtype(const int ftype); -int BKE_imtype_to_ftype(char imtype); +int BKE_imtype_to_ftype(const char imtype); int BKE_imtype_is_movie(const char imtype); int BKE_imtype_supports_zbuf(const char imtype); diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c index 6fd89db10e7..bf9ed8b17e3 100644 --- a/source/blender/blenkernel/intern/pointcache.c +++ b/source/blender/blenkernel/intern/pointcache.c @@ -2285,7 +2285,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra /* float offset; unused for now */ float time, nexttime; - /* TODO: this has to be sorter out once bsystem_time gets redone, */ + /* TODO: this has to be sorted out once bsystem_time gets redone, */ /* now caches can handle interpolating etc. too - jahka */ /* time handling for point cache: -- cgit v1.2.3 From 383756be486826ca61fa9b5ea9341ef21b800c18 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Feb 2012 19:45:27 +0000 Subject: Fixed compilation error cased by recent refactor of include guard defines. --- source/blender/blenkernel/BKE_sound.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/BKE_sound.h b/source/blender/blenkernel/BKE_sound.h index 90477647b88..8b01dbde531 100644 --- a/source/blender/blenkernel/BKE_sound.h +++ b/source/blender/blenkernel/BKE_sound.h @@ -79,7 +79,7 @@ void sound_load(struct Main *main, struct bSound* sound); void sound_free(struct bSound* sound); -#ifdef AUD_CAPI +#ifdef __AUD_C_API_H__ AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume); #endif -- cgit v1.2.3