ensure pasted graph keys are always selected.

This commit is contained in:
Campbell Barton 2010-12-15 17:36:08 +00:00
parent 6b2b56c35e
commit 7e10a9e6ce
4 changed files with 14 additions and 5 deletions

@ -975,7 +975,6 @@ static void smoke_calc_domain(Scene *scene, Object *ob, SmokeModifierData *smd)
{
ParticleSimulationData sim;
ParticleSystem *psys = sfs->psys;
ParticleSettings *part=psys->part;
int p = 0;
float *density = smoke_get_density(sds->fluid);
float *bigdensity = smoke_turbulence_get_density(sds->wt);

@ -515,7 +515,7 @@ short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data)
for (ale= anim_data->first; ale; ale= ale->next) {
FCurve *fcu= (FCurve *)ale->key_data;
tAnimCopybufItem *aci;
BezTriple *bezt, *newbuf;
BezTriple *bezt, *nbezt, *newbuf;
int i;
/* firstly, check if F-Curve has any selected keyframes
@ -546,8 +546,14 @@ short copy_animedit_keys (bAnimContext *ac, ListBase *anim_data)
memcpy(newbuf, aci->bezt, sizeof(BezTriple)*(aci->totvert));
/* copy current beztriple across too */
*(newbuf + aci->totvert)= *bezt;
nbezt= &newbuf[aci->totvert];
*nbezt= *bezt;
/* ensure copy buffer is selected so pasted keys are selected */
nbezt->f1 |= SELECT;
nbezt->f2 |= SELECT;
nbezt->f3 |= SELECT;
/* free old array and set the new */
if (aci->bezt) MEM_freeN(aci->bezt);
aci->bezt= newbuf;

@ -229,6 +229,10 @@ int insert_bezt_fcurve (FCurve *fcu, BezTriple *bezt, short flag)
dst->vec[0][1] += dy;
dst->vec[1][1] += dy;
dst->vec[2][1] += dy;
dst->f1= bezt->f1;
dst->f2= bezt->f2;
dst->f3= bezt->f3;
// TODO: perform some other operations?
}

@ -98,7 +98,7 @@ static int dependsOnTime(ModifierData *UNUSED(md))
static void updateDepgraph(ModifierData *md, DagForest *forest,
struct Scene *scene,
Object *ob,
Object *UNUSED(ob),
DagNode *obNode)
{
SmokeModifierData *smd = (SmokeModifierData *) md;