MorphByBone::MorphByBone()
{
	suspendUI = FALSE;
	currentBone = -1;
	currentMorph = -1;
	editMorph = FALSE;
	pauseAccessor = FALSE;
	pasteMode = FALSE;
	pblock = NULL;
	MorphByBoneDesc.MakeAutoParamBlocks(this);

	ICurveCtl* curveCtl = (ICurveCtl *) CreateInstance(REF_MAKER_CLASS_ID,CURVE_CONTROL_CLASS_ID);
	pblock->SetValue(pb_selectiongraph,0,curveCtl);

 	curveCtl->RegisterResourceMaker((ReferenceMaker *)this);

	DWORD flags = CC_NONE;
	
	flags |=  CC_DRAWBG ;
	flags |=  CC_DRAWGRID ;
	flags |=  CC_DRAWUTOOLBAR ;
	flags |=  CC_AUTOSCROLL ;
	
	flags |=  CC_RCMENU_MOVE_XY ;
	flags |=  CC_RCMENU_MOVE_X ;
	flags |=  CC_RCMENU_MOVE_Y ;
	flags |=  CC_RCMENU_SCALE ;
	flags |=  CC_RCMENU_INSERT_CORNER ;
	flags |=  CC_RCMENU_INSERT_BEZIER ;
	flags |=  CC_RCMENU_DELETE ;

	curveCtl->SetCCFlags(flags);

	ResetSelectionGraph();
}
示例#2
0
BlurMgr::BlurMgr() :
	pbMaster(NULL), pbBlurData(NULL), pbSelData(NULL), mp_CCtl(NULL),
	m_lastBMModifyID(0xFFFFFFFF), m_imageW(0), m_imageH(0), m_imageSz(0), m_compValid(false)

// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
{
	m_blurs[idBlurUnif]		= new BlurUniform(this);
	m_blurs[idBlurDir]		= new BlurDirectional(this);
	m_blurs[idBlurRadial]	= new BlurRadial(this);

	m_sels[idSelImage]		= new SelImage(this);
	m_sels[idSelIBack]		= new SelIgnBack(this);
	m_sels[idSelLum]		= new SelLum(this);
	m_sels[idSelMask]		= new SelMaps(this);
	m_sels[idSelObjIds]		= new SelObjIds(this);
	m_sels[idSelMatIds]		= new SelMatIds(this);

	// this added to allow extension of seltypes -- adding new param active ids breaks the original sequential enumeration
	// i should have enumerated the param ids sparsely to allow for extensibility.
	// if they are added sequentially, it changes the value of old param ids and will break loading of old versions
	m_selActiveIds[idSelImage]	= prmImageActive;
	m_selActiveIds[idSelIBack]	= prmIBackActive;
	m_selActiveIds[idSelLum]	= prmLumActive;
	m_selActiveIds[idSelMask]	= prmMaskActive;
	m_selActiveIds[idSelObjIds]	= prmObjIdsActive;
	m_selActiveIds[idSelMatIds]	= prmMatIdsActive;

	// set default blur radial origin to coincide with current render settings
	pbdBlurData.ParamOption(prmRadialXOrig, p_default, GetCOREInterface()->GetRendWidth()/2);
	pbdBlurData.ParamOption(prmRadialYOrig, p_default, GetCOREInterface()->GetRendHeight()/2);
	blurMgrCD.MakeAutoParamBlocks(this);
	assert(	pbMaster && pbBlurData && pbSelData);

	// create a curve control and reference it
	ICurveCtl *pICurveCtl = (ICurveCtl*)CreateInstance(REF_MAKER_CLASS_ID, CURVE_CONTROL_CLASS_ID);
	assert (pICurveCtl);
	ReplaceReference(idSelCurveCtrl, pICurveCtl);
	pICurveCtl->RegisterResourceMaker(this);
	pICurveCtl->SetCCFlags(CC_DRAWUTOOLBAR | CC_CONSTRAIN_Y | CC_SHOWRESET/*| CC_RCMENU_MOVE_XY | CC_RCMENU_MOVE_X | CC_RCMENU_MOVE_Y | CC_RCMENU_SCALE | CC_RCMENU_INSERT_CORNER | CC_RCMENU_INSERT_BEZIER | CC_RCMENU_DELETE*/);
	pICurveCtl->SetXRange(0.0f,1.0f);
	pICurveCtl->SetYRange(0.0f,1.0f);
	BitArray ba;
	ba.SetSize(32);
	ba.Set(0);
	ba.Clear(1);
	pICurveCtl->SetDisplayMode(ba);
	pICurveCtl->SetNumCurves(2);
	pICurveCtl->SetScrollValues(2, -44);
	pICurveCtl->SetZoomValues(133, 117);
}