diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-04 01:09:25 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-04 01:09:25 +0300 |
commit | bd26fe8f94dd0f8ee558df1e7c877eba3db912be (patch) | |
tree | 5727966f3a09fc8f9478eedb4f451d6b399b0bdf /source/blender | |
parent | f47899fc0f716464625f43045458e222ce11603d (diff) |
Orange: Another issue with Armature layers; in NLA, the strips with a
locked length should not skip hidden channels.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/BKE_action.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/action.c | 4 | ||||
-rw-r--r-- | source/blender/src/drawaction.c | 2 | ||||
-rw-r--r-- | source/blender/src/drawarmature.c | 2 | ||||
-rw-r--r-- | source/blender/src/editaction.c | 2 | ||||
-rw-r--r-- | source/blender/src/editnla.c | 10 | ||||
-rw-r--r-- | source/blender/src/header_action.c | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/blenkernel/BKE_action.h b/source/blender/blenkernel/BKE_action.h index 0189b7a2826..9abd73d7bef 100644 --- a/source/blender/blenkernel/BKE_action.h +++ b/source/blender/blenkernel/BKE_action.h @@ -111,7 +111,7 @@ struct bAction *copy_action(struct bAction *src); /** * Some kind of bounding box operation on the action. */ -void calc_action_range(const struct bAction *act, float *start, float *end); +void calc_action_range(const struct bAction *act, float *start, float *end, int incl_hidden); /** * Set the pose channels from the given action. diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index 1aaf4c6f2c1..50ce4495f9c 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -427,7 +427,7 @@ void blend_poses(bPose *dst, bPose *src, float srcweight, short mode) } -void calc_action_range(const bAction *act, float *start, float *end) +void calc_action_range(const bAction *act, float *start, float *end, int incl_hidden) { const bActionChannel *chan; const bConstraintChannel *conchan; @@ -437,7 +437,7 @@ void calc_action_range(const bAction *act, float *start, float *end) if(act) { for (chan=act->chanbase.first; chan; chan=chan->next) { - if((chan->flag & ACHAN_HIDDEN)==0) { + if(incl_hidden || (chan->flag & ACHAN_HIDDEN)==0) { if(chan->ipo) { for (icu=chan->ipo->curve.first; icu; icu=icu->next) { if(icu->totvert) { diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 3fa263ffb89..0a4f52b6174 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -412,7 +412,7 @@ static void draw_channel_strips(SpaceAction *saction) map_active_strip(di, OBACT, 0); /* start and end of action itself */ - calc_action_range(act, &sta, &end); + calc_action_range(act, &sta, &end, 0); gla2DDrawTranslatePt(di, sta, 0.0f, &act_start, &dummy); gla2DDrawTranslatePt(di, end, 0.0f, &act_end, &dummy); diff --git a/source/blender/src/drawarmature.c b/source/blender/src/drawarmature.c index 74201b58135..c2eeae3c148 100644 --- a/source/blender/src/drawarmature.c +++ b/source/blender/src/drawarmature.c @@ -1783,7 +1783,7 @@ static void draw_ghost_poses(Base *base) if(ob->action==NULL) return; - calc_action_range(ob->action, &start, &end); + calc_action_range(ob->action, &start, &end, 0); if(start==end) return; diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 30df91bd092..a54e887728a 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -170,7 +170,7 @@ bAction* bake_action_with_client (bAction *act, Object *armob, float tolerance) sprintf (newname, "%s.BAKED", act->id.name+2); rename_id(&result->id, newname); - calc_action_range(act, &actstart, &actend); + calc_action_range(act, &actstart, &actend, 1); oldframe = G.scene->r.cfra; diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index c4b7d8c9777..3a2a1d0d21c 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -184,7 +184,7 @@ void synchronize_action_strips(void) if (strip->flag & ACTSTRIP_LOCK_ACTION) { float actstart, actend; - calc_action_range(strip->act, &actstart, &actend); + calc_action_range(strip->act, &actstart, &actend, 1); if(strip->actstart!=actstart || strip->actend!=actend) { float mapping= (strip->end - strip->start)/(strip->actend - strip->actstart); @@ -210,7 +210,7 @@ void reset_action_strips(int val) for (strip = base->object->nlastrips.last; strip; strip=strip->prev) { if (strip->flag & ACTSTRIP_SELECT) { if(val==2) { - calc_action_range(strip->act, &strip->actstart, &strip->actend); + calc_action_range(strip->act, &strip->actstart, &strip->actend, 1); } else if(val==1) { float mapping= (strip->actend - strip->actstart)/(strip->end - strip->start); @@ -352,7 +352,7 @@ static void convert_nla(short mval[2]) /* Link the action to the nstrip */ nstrip->act = base->object->action; id_us_plus(&nstrip->act->id); - calc_action_range(nstrip->act, &nstrip->actstart, &nstrip->actend); + calc_action_range(nstrip->act, &nstrip->actstart, &nstrip->actend, 1); nstrip->start = nstrip->actstart; nstrip->end = nstrip->actend; nstrip->flag = ACTSTRIP_SELECT|ACTSTRIP_LOCK_ACTION; @@ -403,7 +403,7 @@ static void add_nla_block(short event) /* Link the action to the strip */ strip->act = act; id_us_plus(&act->id); - calc_action_range(strip->act, &strip->actstart, &strip->actend); + calc_action_range(strip->act, &strip->actstart, &strip->actend, 1); strip->start = G.scene->r.cfra; /* could be mval[0] another time... */ strip->end = strip->start + (strip->actend-strip->actstart); /* simple prevention of zero strips */ @@ -1818,7 +1818,7 @@ static void add_nla_block_by_name(char name[32], Object *ob, short hold, short a /* Link the action to the strip */ strip->act = act; - calc_action_range(strip->act, &strip->actstart, &strip->actend); + calc_action_range(strip->act, &strip->actstart, &strip->actend, 1); strip->start = G.scene->r.cfra; /* could be mval[0] another time... */ strip->end = strip->start + (strip->actend-strip->actstart); /* simple prevention of zero strips */ diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 765f6de9820..e6b4442bdd5 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -150,7 +150,7 @@ void do_action_buttons(unsigned short event) else { float extra; - calc_action_range(G.saction->action, &G.v2d->cur.xmin, &G.v2d->cur.xmax); + calc_action_range(G.saction->action, &G.v2d->cur.xmin, &G.v2d->cur.xmax, 0); if(G.saction->pin==0 && ob) { G.v2d->cur.xmin= get_action_frame_inv(ob, G.v2d->cur.xmin); G.v2d->cur.xmax= get_action_frame_inv(ob, G.v2d->cur.xmax); |