コード例 #1
0
void FrameHeadGadget::setFos(int frame, bool on)
{
	TOnionSkinMaskHandle *osmh = TApp::instance()->getCurrentOnionSkin();
	OnionSkinMask osMask = osmh->getOnionSkinMask();
	osMask.setFos(frame, on);
	if (on && !osMask.isEnabled())
		osMask.enable(true);
	osmh->setOnionSkinMask(osMask);
	TApp::instance()->getCurrentScene()->notifySceneChanged();
}
コード例 #2
0
void RowArea::mouseDoubleClickEvent(QMouseEvent* event)
{
	int currentFrame = TApp::instance()->getCurrentFrame()->getFrame();
	int row = m_viewer->yToRow(event->pos().y());
	if (TApp::instance()->getCurrentFrame()->isEditingScene() && 
		event->buttons() & Qt::LeftButton && 
		Preferences::instance()->isOnionSkinEnabled() && 
		row == currentFrame && 
		event->pos().x() < RowHeight + 2 )
	{
		TOnionSkinMaskHandle *osmh = TApp::instance()->getCurrentOnionSkin();
		OnionSkinMask osm = osmh->getOnionSkinMask();
		osm.enable(!osm.isEnabled());
		osmh->setOnionSkinMask(osm);
		osmh->notifyOnionSkinMaskChanged();
	}
}