ShapeKey Editor (sub-mode of DopeSheet Editor)
Special priority request from Durian team to get this sub-editor of the DopeSheet Editor restored. Originally I was kindof planning to drop it, but obviously it still has a role! It now supports all the modern features that the DopeSheet supports, complete with selection, muting, locking, DopeSheet summary, and all the other tools that you know and love from the other views. Also, this no longer uses the old hacky sliders that 2.4x used (instead it uses RNA-based ones), so should function just the same as other DopeSheet views).
This commit is contained in:
		@@ -238,6 +238,10 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
 | 
			
		||||
					if (ale->flag & FCURVE_SELECTED)
 | 
			
		||||
						sel= ACHANNEL_SETFLAG_CLEAR;
 | 
			
		||||
					break;
 | 
			
		||||
				case ANIMTYPE_SHAPEKEY:
 | 
			
		||||
					if (ale->flag & KEYBLOCK_SEL)
 | 
			
		||||
						sel= ACHANNEL_SETFLAG_CLEAR;
 | 
			
		||||
					break;
 | 
			
		||||
				case ANIMTYPE_NLATRACK:
 | 
			
		||||
					if (ale->flag & NLATRACK_SELECTED)
 | 
			
		||||
						sel= ACHANNEL_SETFLAG_CLEAR;
 | 
			
		||||
@@ -307,6 +311,13 @@ void ANIM_deselect_anim_channels (void *data, short datatype, short test, short
 | 
			
		||||
				fcu->flag &= ~FCURVE_ACTIVE;
 | 
			
		||||
			}
 | 
			
		||||
				break;
 | 
			
		||||
			case ANIMTYPE_SHAPEKEY:
 | 
			
		||||
			{
 | 
			
		||||
				KeyBlock *kb= (KeyBlock *)ale->data;
 | 
			
		||||
				
 | 
			
		||||
				ACHANNEL_SET_FLAG(kb, sel, KEYBLOCK_SEL);
 | 
			
		||||
			}
 | 
			
		||||
				break;
 | 
			
		||||
			case ANIMTYPE_NLATRACK:
 | 
			
		||||
			{
 | 
			
		||||
				NlaTrack *nlt= (NlaTrack *)ale->data;
 | 
			
		||||
@@ -1517,6 +1528,24 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh
 | 
			
		||||
			if (fcu->flag & FCURVE_SELECTED)
 | 
			
		||||
				ANIM_set_active_channel(ac, ac->data, ac->datatype, filter, fcu, ANIMTYPE_FCURVE);
 | 
			
		||||
				
 | 
			
		||||
			notifierFlags |= ND_ANIMCHAN_SELECT;
 | 
			
		||||
		}
 | 
			
		||||
			break;
 | 
			
		||||
		case ANIMTYPE_SHAPEKEY: 
 | 
			
		||||
		{
 | 
			
		||||
			KeyBlock *kb= (KeyBlock *)ale->data;
 | 
			
		||||
			
 | 
			
		||||
			/* select/deselect */
 | 
			
		||||
			if (selectmode == SELECT_INVERT) {
 | 
			
		||||
				/* inverse selection status of this ShapeKey only */
 | 
			
		||||
				kb->flag ^= KEYBLOCK_SEL;
 | 
			
		||||
			}
 | 
			
		||||
			else {
 | 
			
		||||
				/* select ShapeKey by itself */
 | 
			
		||||
				ANIM_deselect_anim_channels(ac->data, ac->datatype, 0, ACHANNEL_SETFLAG_CLEAR);
 | 
			
		||||
				kb->flag |= KEYBLOCK_SEL;
 | 
			
		||||
			}
 | 
			
		||||
				
 | 
			
		||||
			notifierFlags |= ND_ANIMCHAN_SELECT;
 | 
			
		||||
		}
 | 
			
		||||
			break;
 | 
			
		||||
@@ -1557,9 +1586,6 @@ static int mouse_anim_channels (bAnimContext *ac, float x, int channel_index, sh
 | 
			
		||||
#endif // XXX future of this is unclear
 | 
			
		||||
		}
 | 
			
		||||
			break;
 | 
			
		||||
		case ANIMTYPE_SHAPEKEY:
 | 
			
		||||
			/* TODO: shapekey channels cannot be selected atm... */
 | 
			
		||||
			break;
 | 
			
		||||
		default:
 | 
			
		||||
			printf("Error: Invalid channel type in mouse_anim_channels() \n");
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user