Bugfix #4389
Action Editor: Menu options for Extend/Interpolation and Snap didn't work for Constraint channels.
This commit is contained in:
@@ -1726,6 +1726,7 @@ void set_ipotype_actionchannels(int ipotype)
|
||||
|
||||
bAction *act;
|
||||
bActionChannel *chan;
|
||||
bConstraintChannel *conchan;
|
||||
short event;
|
||||
|
||||
/* Get the selected action, exit if none are selected
|
||||
@@ -1757,6 +1758,14 @@ void set_ipotype_actionchannels(int ipotype)
|
||||
if (chan->ipo)
|
||||
setipotype_ipo(chan->ipo, ipotype);
|
||||
}
|
||||
/* constraint channels */
|
||||
for (conchan=chan->constraintChannels.first; conchan; conchan= conchan->next) {
|
||||
if (conchan->flag & CONSTRAINT_CHANNEL_SELECT) {
|
||||
if (conchan->ipo)
|
||||
setipotype_ipo(conchan->ipo, ipotype);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1774,6 +1783,7 @@ void set_extendtype_actionchannels(int extendtype)
|
||||
{
|
||||
bAction *act;
|
||||
bActionChannel *chan;
|
||||
bConstraintChannel *conchan;
|
||||
short event;
|
||||
|
||||
/* Get the selected action, exit if none are selected
|
||||
@@ -1820,6 +1830,27 @@ void set_extendtype_actionchannels(int extendtype)
|
||||
}
|
||||
}
|
||||
}
|
||||
/* constraint channels */
|
||||
for (conchan=chan->constraintChannels.first; conchan; conchan= conchan->next) {
|
||||
if (conchan->flag & CONSTRAINT_CHANNEL_SELECT) {
|
||||
if (conchan->ipo) {
|
||||
switch (extendtype) {
|
||||
case SET_EXTEND_CONSTANT:
|
||||
setexprap_ipoloop(conchan->ipo, IPO_HORIZ);
|
||||
break;
|
||||
case SET_EXTEND_EXTRAPOLATION:
|
||||
setexprap_ipoloop(conchan->ipo, IPO_DIR);
|
||||
break;
|
||||
case SET_EXTEND_CYCLIC:
|
||||
setexprap_ipoloop(conchan->ipo, IPO_CYCL);
|
||||
break;
|
||||
case SET_EXTEND_CYCLICEXTRAPOLATION:
|
||||
setexprap_ipoloop(conchan->ipo, IPO_CYCLX);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1838,6 +1869,7 @@ void set_snap_actionchannels(void)
|
||||
|
||||
bAction *act;
|
||||
bActionChannel *chan;
|
||||
bConstraintChannel *conchan;
|
||||
|
||||
/* Get the selected action, exit if none are selected
|
||||
*/
|
||||
@@ -1851,6 +1883,12 @@ void set_snap_actionchannels(void)
|
||||
if (chan->ipo) {
|
||||
snap_ipo_keys(chan->ipo);
|
||||
}
|
||||
/* constraint channels */
|
||||
for (conchan=chan->constraintChannels.first; conchan; conchan= conchan->next) {
|
||||
if (conchan->ipo) {
|
||||
snap_ipo_keys(conchan->ipo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -346,16 +346,18 @@ static void init_userdef_file(void)
|
||||
void BIF_read_file(char *name)
|
||||
{
|
||||
extern short winqueue_break; /* editscreen.c */
|
||||
|
||||
//here?
|
||||
int retval;
|
||||
|
||||
//NOT here!
|
||||
//sound_end_all_sounds();
|
||||
|
||||
// first try to read exotic file formats...
|
||||
if (BKE_read_exotic(name) == 0) { /* throws first error box */
|
||||
/* we didn't succeed, now try to read Blender file
|
||||
calls readfile, calls toolbox, throws one more,
|
||||
on failure calls the stream, and that is stubbed.... */
|
||||
int retval= BKE_read_file(name, NULL);
|
||||
/* first try to read exotic file formats... */
|
||||
/* it throws error box when file doesnt exist and returns -1 */
|
||||
retval= BKE_read_exotic(name);
|
||||
|
||||
if (retval== 0) {
|
||||
/* we didn't succeed, now try to read Blender file */
|
||||
retval= BKE_read_file(name, NULL);
|
||||
|
||||
mainwindow_set_filename_to_title(G.main->name);
|
||||
countall();
|
||||
@@ -370,7 +372,8 @@ void BIF_read_file(char *name)
|
||||
BKE_write_undo("original"); /* save current state */
|
||||
refresh_interface_font();
|
||||
}
|
||||
else BIF_undo_push("Import file");
|
||||
else if(retval==1)
|
||||
BIF_undo_push("Import file");
|
||||
}
|
||||
|
||||
/* only here settings for fullscreen */
|
||||
|
||||
Reference in New Issue
Block a user