Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-10-29 14:15:36 +0400
committerTon Roosendaal <ton@blender.org>2005-10-29 14:15:36 +0400
commit3635bde6f4980cff7dab5d48cb006100c879ac5c (patch)
tree4f4f052ad9bbdf1856afa02d415d701f97f91751 /source/blender/src
parent8162961d315acb6c141b071dec6dc858baff5ba7 (diff)
Orange's buglist!
- Action Editor: hotkeys V and H for handles were invisible, added menus - NLA strips: when current frame is exactly on the strip end, it didn't include that action... needs a rounding correction for it. - Action/NLA: deleting keys in Action, which results in only 1 key left, resulted in zero sized strip length. Now the strips are defaulted to be 1 frame in size minimal. - NLA editor: ALT+C "Convert to strip" didn't increment Action user count - 3D Window: CTRL+P make parent to Bone still gave the insane menu with all bone names. With unified PoseMode select it can just parent to the active Bone. Note; this now requires the Armature to be in PoseMode to work. - Rotation Constraint; the new options to only map to X,Y,Z rotation, did set the not mapped rotation axes to zero. These should remain unchanged. - AutoKey optionn for Actions; should not insert action keys on ESC And added a fix myself: - When SHIFT+selecting a Bone in PoseMode, and the Armature was not selected or active yet, it doesn't extend-select/deselect the Bone anymore. This case is only useful when you try to add IK or Constraint, so the shift+selection should only activate the clicked Bone.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawaction.c7
-rw-r--r--source/blender/src/editaction.c40
-rw-r--r--source/blender/src/editarmature.c3
-rw-r--r--source/blender/src/editnla.c15
-rw-r--r--source/blender/src/editobject.c58
-rw-r--r--source/blender/src/header_action.c4
-rwxr-xr-xsource/blender/src/transform_conversions.c2
7 files changed, 50 insertions, 79 deletions
diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c
index c6955955c09..1c6c28929e3 100644
--- a/source/blender/src/drawaction.c
+++ b/source/blender/src/drawaction.c
@@ -359,7 +359,7 @@ static void draw_channel_strips(SpaceAction *saction)
bAction *act;
bActionChannel *chan;
bConstraintChannel *conchan;
- float y;
+ float y, sta, end;
int act_start, act_end, dummy;
char col1[3], col2[3];
@@ -381,8 +381,9 @@ static void draw_channel_strips(SpaceAction *saction)
map_active_strip(di, OBACT, 0);
/* start and end of action itself */
- gla2DDrawTranslatePt(di, calc_action_start(act), 0, &act_start, &dummy);
- gla2DDrawTranslatePt(di, calc_action_end(act), 0, &act_end, &dummy);
+ calc_action_range(act, &sta, &end);
+ gla2DDrawTranslatePt(di, sta, 0.0f, &act_start, &dummy);
+ gla2DDrawTranslatePt(di, end, 0.0f, &act_end, &dummy);
if (G.saction->pin==0 && OBACT)
map_active_strip(di, OBACT, 1);
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c
index 981d92fe5ff..0ba59b07337 100644
--- a/source/blender/src/editaction.c
+++ b/source/blender/src/editaction.c
@@ -146,7 +146,7 @@ bAction* bake_action_with_client (bAction *act, Object *armob, float tolerance)
bAction *temp;
bPoseChannel *pchan;
ID *id;
- float actlen;
+ float actstart, actend;
int oldframe;
int curframe;
char newname[64];
@@ -174,14 +174,14 @@ bAction* bake_action_with_client (bAction *act, Object *armob, float tolerance)
sprintf (newname, "%s.BAKED", act->id.name+2);
rename_id(&result->id, newname);
- actlen = calc_action_end(act);
+ calc_action_range(act, &actstart, &actend);
oldframe = G.scene->r.cfra;
temp = armob->action;
armob->action = result;
- for (curframe=1; curframe<ceil(actlen+1); curframe++){
+ for (curframe=1; curframe<ceil(actend+1.0f); curframe++){
/* Apply the old action */
@@ -1606,6 +1606,7 @@ static void delete_actionchannels (void)
void sethandles_meshchannel_keys(int code, Key *key)
{
+
sethandles_ipo_keys(key->ipo, code);
BIF_undo_push("Set handles Action keys");
@@ -2121,20 +2122,20 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case HKEY:
- if (key) {
- if(G.qual & LR_SHIFTKEY) {
- sethandles_meshchannel_keys(HD_AUTO, key);
- }
- else {
- sethandles_meshchannel_keys(HD_ALIGN, key);
+ if(G.qual & LR_SHIFTKEY) {
+ if(okee("Set Keys to Auto Handle")) {
+ if (key)
+ sethandles_meshchannel_keys(HD_AUTO, key);
+ else
+ sethandles_actionchannel_keys(HD_AUTO);
}
}
else {
- if(G.qual & LR_SHIFTKEY) {
- sethandles_actionchannel_keys(HD_AUTO);
- }
- else {
- sethandles_actionchannel_keys(HD_ALIGN);
+ if(okee("Toggle Keys Aligned Handle")) {
+ if (key)
+ sethandles_meshchannel_keys(HD_ALIGN, key);
+ else
+ sethandles_actionchannel_keys(HD_ALIGN);
}
}
break;
@@ -2171,12 +2172,11 @@ void winqreadactionspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case VKEY:
- if (key) {
- sethandles_meshchannel_keys(HD_VECT, key);
- /* to do */
- }
- else {
- sethandles_actionchannel_keys(HD_VECT);
+ if(okee("Set Keys to Vector Handle")) {
+ if (key)
+ sethandles_meshchannel_keys(HD_VECT, key);
+ else
+ sethandles_actionchannel_keys(HD_VECT);
}
break;
diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c
index 68883e3ed3b..11b3851ff93 100644
--- a/source/blender/src/editarmature.c
+++ b/source/blender/src/editarmature.c
@@ -1813,7 +1813,8 @@ int do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits)
nearBone= get_bone_from_selectbuffer(base, buffer, hits, 1);
if (nearBone) {
- if (!(G.qual & LR_SHIFTKEY)){
+ /* since we do unified select, we don't shift+select a bone if the armature object was not active yet */
+ if (!(G.qual & LR_SHIFTKEY) || base!=BASACT){
deselectall_posearmature(ob, 0);
nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
select_actionchannel_by_name(ob->action, nearBone->name, 1);
diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c
index 9f180771876..790494d9d44 100644
--- a/source/blender/src/editnla.c
+++ b/source/blender/src/editnla.c
@@ -184,8 +184,9 @@ void synchronize_action_strips(void)
for (base=G.scene->base.first; base; base=base->next) {
for (strip = base->object->nlastrips.last; strip; strip=strip->prev) {
if (strip->flag & ACTSTRIP_LOCK_ACTION) {
- float actstart = calc_action_start(strip->act);
- float actend = calc_action_end(strip->act);
+ float actstart, actend;
+
+ calc_action_range(strip->act, &actstart, &actend);
if(strip->actstart!=actstart || strip->actend!=actend) {
float mapping= (strip->end - strip->start)/(strip->actend - strip->actstart);
@@ -211,8 +212,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) {
- strip->actstart = calc_action_start(strip->act);
- strip->actend = calc_action_end(strip->act);
+ calc_action_range(strip->act, &strip->actstart, &strip->actend);
}
else if(val==1) {
float mapping= (strip->actend - strip->actstart)/(strip->end - strip->start);
@@ -495,8 +495,8 @@ static void convert_nla(short mval[2])
/* Link the action to the nstrip */
nstrip->act = base->object->action;
- nstrip->actstart = calc_action_start(base->object->action); /* MAKE THIS THE FIRST FRAME OF THE ACTION */
- nstrip->actend = calc_action_end(base->object->action);
+ nstrip->act->id.us++;
+ calc_action_range(nstrip->act, &nstrip->actstart, &nstrip->actend);
nstrip->start = nstrip->actstart;
nstrip->end = nstrip->actend;
nstrip->flag = ACTSTRIP_SELECT|ACTSTRIP_LOCK_ACTION;
@@ -546,8 +546,7 @@ static void add_nla_block(short event)
/* Link the action to the strip */
strip->act = act;
- strip->actstart = calc_action_start(act);
- strip->actend = calc_action_end(act);
+ calc_action_range(strip->act, &strip->actstart, &strip->actend);
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/editobject.c b/source/blender/src/editobject.c
index fe30b012aab..90865fefd04 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -1156,34 +1156,11 @@ int test_parent_loop(Object *par, Object *ob)
}
-static char *make_bone_menu (Object *ob)
-{
- char *menustr=NULL;
- bPoseChannel *pchan;
- int size;
- int index=0;
-
- // Count the bones
- for(size=0, pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, size++);
-
- size = size*48 + 256;
- menustr = MEM_callocN(size, "bonemenu");
-
- sprintf (menustr, "Select Bone%%t");
-
- for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next, index++) {
- sprintf (menustr, "%s|%s%%x%d", menustr, pchan->bone->name, index);
- }
-
- return menustr;
-}
-
-
void make_parent(void)
{
Base *base;
Object *par;
- Bone *bone=NULL;
+ bPoseChannel *pchan= NULL;
short qual, mode=0;
if(G.scene->id.lib) return;
@@ -1267,19 +1244,23 @@ void make_parent(void)
}
}
else if(par->type == OB_ARMATURE){
- int bonenr;
- char *bonestr=NULL;
base= FIRSTBASE;
while(base) {
if TESTBASELIB(base) {
if(base!=BASACT) {
if(base->object->type==OB_MESH) {
- mode= pupmenu("Make Parent To%t|Bone %x1|Armature %x2|Object %x3");
+ if(par->flag & OB_POSEMODE)
+ mode= pupmenu("Make Parent To%t|Bone %x1|Armature %x2|Object %x3");
+ else
+ mode= pupmenu("Make Parent To%t|Armature %x2|Object %x3");
break;
}
else {
- mode= pupmenu("Make Parent To %t|Bone %x1|Object %x3");
+ if(par->flag & OB_POSEMODE)
+ mode= pupmenu("Make Parent To %t|Bone %x1|Object %x3");
+ else
+ mode= pupmenu("Make Parent To %t|Object %x3");
break;
}
}
@@ -1290,21 +1271,10 @@ void make_parent(void)
switch (mode){
case 1:
mode=PARBONE;
- /* Make bone popup menu */
-
- bonestr = make_bone_menu(par);
-
- bonenr= pupmenu_col(bonestr, 20);
- if (bonestr)
- MEM_freeN (bonestr);
-
- if (bonenr==-1){
- allqueue(REDRAWVIEW3D, 0);
- return;
- }
+ pchan= get_active_posechannel(par);
- bone= get_indexed_bone(par, bonenr<<16); // function uses selection codes
- if (!bone){
+ if(pchan==NULL) {
+ error("No active Bone");
allqueue(REDRAWVIEW3D, 0);
return;
}
@@ -1362,8 +1332,8 @@ void make_parent(void)
if (par->type==OB_ARMATURE) {
base->object->partype= mode;
- if (bone)
- strcpy (base->object->parsubstr, bone->name);
+ if (pchan)
+ strcpy (base->object->parsubstr, pchan->name);
else
base->object->parsubstr[0]=0;
}
diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c
index edd3ed8d164..55617c0bed5 100644
--- a/source/blender/src/header_action.c
+++ b/source/blender/src/header_action.c
@@ -137,8 +137,8 @@ void do_action_buttons(unsigned short event)
}
else {
float extra;
- G.v2d->cur.xmin= calc_action_start(G.saction->action);
- G.v2d->cur.xmax= calc_action_end(G.saction->action);
+
+ calc_action_range(G.saction->action, &G.v2d->cur.xmin, &G.v2d->cur.xmax);
extra= 0.05*(G.v2d->cur.xmax - G.v2d->cur.xmin);
G.v2d->cur.xmin-= extra;
G.v2d->cur.xmax+= extra;
diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c
index 98bcb5d47ce..529f2a7bc2b 100755
--- a/source/blender/src/transform_conversions.c
+++ b/source/blender/src/transform_conversions.c
@@ -1732,7 +1732,7 @@ void special_aftertrans_update(TransInfo *t)
/* this signal does one recalc on pose, then unlocks, so ESC or edit will work */
ob->pose->flag |= POSE_DO_UNLOCK;
- if(G.flags & G_RECORDKEYS) {
+ if((G.flags & G_RECORDKEYS) && (!cancelled)) {
act= ob->action;
pose= ob->pose;