Beispiel #1
0
void TorusObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
	SimpleObject::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapParam->SetUserDlgProc(nullptr);
		pmapCreate->SetParamBlock(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object created will inherit them.
	pblock->GetValue(PB_SIDES,ip->GetTime(),dlgSides,FOREVER);
	pblock->GetValue(PB_SEGMENTS,ip->GetTime(),dlgSegments,FOREVER);
	pblock->GetValue(PB_SMOOTH,ip->GetTime(),dlgSmooth,FOREVER);	
	pblock->GetValue(PB_RADIUS2,ip->GetTime(),dlgRadius2,FOREVER);		
}
Beispiel #2
0
void MorphObject::EndEditParams(
      IObjParam *ip, ULONG flags,Animatable *next)
   {
   //ip->DeleteMode(pickMode);
   //delete pickMode;
   //pickMode = NULL;
   ip->ClearPickMode();
   editOb   = NULL;
   creating = FALSE;

   addTargMethod = AddTargMethod();

   if (flags&END_EDIT_REMOVEUI) {
      ip->UnRegisterDlgWnd(hParams1);
      ip->DeleteRollupPage(hParams1);
      hParams1 = NULL;
      ip->UnRegisterDlgWnd(hParams2);
      ip->DeleteRollupPage(hParams2);
      hParams2 = NULL;
   } else {
      DLSetWindowLongPtr(hParams1, NULL);
      DLSetWindowLongPtr(hParams2, NULL);
      }  
   ip = NULL;
   }
Beispiel #3
0
void MorphObject::BeginEditParams(
      IObjParam *ip, ULONG flags,Animatable *prev)
   {  
   this->ip = ip;
   editOb   = this;
   //pickMode = new PickTargCommandMode(this,ip);  
   
   if (flags&BEGIN_EDIT_CREATE) {
      creating = TRUE;
   } else {
      creating = FALSE;
      }
   if (!hParams1) {
      hParams1 = ip->AddRollupPage( 
            hInstance, 
            MAKEINTRESOURCE(IDD_MORPHPARAM1),
            MorphParamDlgProc1, 
            GetString(IDS_RB_PICKTARGETS), 
            (LPARAM)this);    
      ip->RegisterDlgWnd(hParams1);
      hParams2 = ip->AddRollupPage( 
            hInstance, 
            MAKEINTRESOURCE(IDD_MORPHPARAM2),
            MorphParamDlgProc2, 
            GetString(IDS_RB_CURRENTTARGETS), 
            (LPARAM)this);    
      ip->RegisterDlgWnd(hParams1);
   } else {
      DLSetWindowLongPtr(hParams1, this);
      DLSetWindowLongPtr(hParams2, this);
      SetupTargetList();
      SetTargMethod(addTargMethod);
      }
   }
Beispiel #4
0
void CExtObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{		
	SimpleObject::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapParam->SetUserDlgProc(nullptr);
		pmapCreate->SetParamBlock(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object created will inherit them.
	pblock->GetValue(PB_TSEGS,ip->GetTime(),dlgTSegs,FOREVER);
	pblock->GetValue(PB_SSEGS,ip->GetTime(),dlgSSegs,FOREVER);
	pblock->GetValue(PB_BSEGS,ip->GetTime(),dlgBSegs,FOREVER);
	pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER);
	pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER);
}
Beispiel #5
0
// This is called by the system to terminate the editing of the
// parameters in the command panel.  
void ChBoxObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
{
	SimpleObject::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags & END_EDIT_REMOVEUI ) {
		// Remove the rollup pages from the command panel.
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
	}
	else
	{
		pmapTypeIn->SetUserDlgProc(nullptr);
		pmapParam->SetUserDlgProc(nullptr);
		pmapCreate->SetParamBlock(nullptr);
		pmapTypeIn->SetParamBlock(nullptr);
		pmapParam->SetParamBlock(nullptr);
	}

	// Save these values in class variables so the next object 
	// created will inherit them.
	pblock->GetValue(PB_LSEGS,ip->GetTime(),dlgLSegs,FOREVER);
	pblock->GetValue(PB_WSEGS,ip->GetTime(),dlgWSegs,FOREVER);
	pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER);	
	pblock->GetValue(PB_CSEGS,ip->GetTime(),dlgCSegs,FOREVER);	
}
Beispiel #6
0
void RendSpline::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next)
{
	RendSplineDesc.EndEditParams(ip, this, flags, next);

	TimeValue t = ip->GetTime();

	paramDlgProc = NULL;
	ip->EnableShowEndResult(TRUE);


	ClearAFlag(A_MOD_BEING_EDITED);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_END_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF);
	this->ip = NULL;
}
Beispiel #7
0
void WaveObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
	{
	SimpleWSMObject::BeginEditParams(ip,flags,prev);
	this->ip = ip;

	if (pmapParam) {
		
		// Left over from last SinWave ceated
		pmapParam->SetParamBlock(pblock);
	} else {
		hSot = ip->AddRollupPage( 
				hInstance, 
				MAKEINTRESOURCE(IDD_SINWAVE_SOT),
				DefaultSOTProc,
				GetString(IDS_RB_SOT), 
				(LPARAM)ip,APPENDROLL_CLOSED);

		// Gotta make a new one.
		pmapParam = CreateCPParamMap(
			descParamObj,OBJPARAMDESC_LENGH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(DialogID()),
			GetString(IDS_RB_PARAMETERS),
			0);		
		}
	}
Beispiel #8
0
int FExtrudeMod::Display(
		TimeValue t, INode* inode, ViewExp *vpt, 
		int flagst, ModContext *mc)
	{
	if ( ! vpt || ! vpt->IsAlive() )
	{
		// why are we here
		DbgAssert(!_T("Invalid viewport!"));
		return FALSE;
	}

	GraphicsWindow *gw = vpt->getGW();
	Point3 pt;
	Matrix3 tm = CompMatrix(t,inode,mc);
	int savedLimits;

	gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
	gw->setTransform(tm);
	
	// Draw start point
	if (ip && ip->GetSubObjectLevel() == 1) {
		//gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
	} else {
		//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
		}	
	base->GetValue(t,&pt,FOREVER,CTRL_ABSOLUTE);
	gw->marker(&pt,HOLLOW_BOX_MRKR);
	
	gw->setRndLimits(savedLimits);
	return 0;
	}
Beispiel #9
0
void EditFaceDataMod::ChangeBegin () {
	if (selLevel == SEL_OBJECT) return;
	if (efdRestore) {
		delete efdRestore;
		efdRestore = NULL;
	}

	// Find the modcontext with the selected faces.
	// NOTE that as currently written, this modifier won't
	// support setting FaceFloats on more than one node at a time.
	ModContextList mcList;
	INodeTab nodes;
	ip->GetModContexts(mcList,nodes);

	int numSelected=0, whichFace;
	float value;
	bool valueDetermined=true;
	EditFaceDataModData *relevantMD;
	if (selLevel) {
		for (int i = 0; i < mcList.Count(); i++) {
			EditFaceDataModData *meshData = (EditFaceDataModData*)mcList[i]->localData;
			if (!meshData) continue;
			meshData->DescribeSelection (numSelected, whichFace, value, valueDetermined);
			if (!numSelected) continue;

			relevantMD = meshData;
			break;
		}
	}
	nodes.DisposeTemporary ();
	if (!numSelected) return;

	efdRestore = new EditFaceDataRestore (this, relevantMD);
}
Beispiel #10
0
void EllipseObject::UpdateUI(HWND hwnd)
{
	Interval valid;
	BOOL build_outine = FALSE;
	TimeValue t = ip? ip->GetTime() : 0;

	myParamBlock->GetValue(PB_OUTLINE, t, build_outine, valid);
	ICustEdit *thickness_edit = GetICustEdit(GetDlgItem(hwnd, IDC_THICKNESSEDIT));
	ISpinnerControl *thickness_spin = GetISpinner(GetDlgItem(hwnd, IDC_THICKSPINNER));

	if(!thickness_edit || !thickness_spin)
		return;

	if(build_outine)
	{
		EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),TRUE);
		thickness_edit->Enable();
		thickness_spin->Enable();
	}
	else
	{
		EnableWindow(GetDlgItem(hwnd,IDC_THICKNESS_TEXT),FALSE);
		thickness_edit->Disable();
		thickness_spin->Disable();
	}

	ReleaseICustEdit(thickness_edit);
	ReleaseISpinner(thickness_spin);
}
void bhkListObject::UpdateUI()
{
   if (ip == NULL)
      return;
   ListParamDlgProc* dlg = static_cast<ListParamDlgProc*>(pmapParam->GetUserDlgProc());
   dlg->Update(ip->GetTime());
}
Beispiel #12
0
int SymmetryMod::Display (TimeValue t, INode* inode, ViewExp *vpt, int flagst, ModContext *mc) {

	if ( ! vpt || ! vpt->IsAlive() )
	{
		// why are we here
		DbgAssert(!_T("Invalid viewport!"));
		return FALSE;
	}


	GraphicsWindow *gw = vpt->getGW();
	Point3 pt[4];
	Matrix3 tm = CompMatrix(t,inode,mc);
	int savedLimits;

	gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
	gw->setTransform(tm);
	if (mp_ip && mp_ip->GetSubObjectLevel() == 1) {
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
	} else {
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
	}
	
	DrawLineProc lp(gw);
	DrawGizmo (vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE,lp);

	gw->setRndLimits(savedLimits);
	return 0;
}
Beispiel #13
0
INT_PTR CALLBACK DefaultSOTProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
{	IObjParam *ip = (IObjParam*)GetWindowLongPtr(hWnd,GWLP_USERDATA);
	switch (msg)
	{	case WM_INITDIALOG:
			SetWindowLongPtr(hWnd,GWLP_USERDATA,lParam);
			break;
		case WM_LBUTTONDOWN:
		case WM_LBUTTONUP:
		case WM_MOUSEMOVE:
			if (ip) ip->RollupMouseMessage(hWnd,msg,wParam,lParam);
			return FALSE;
		default:
			return FALSE;
	}
	return TRUE;
}
Beispiel #14
0
void SWrapObject::BeginEditParams(
		IObjParam *ip,ULONG flags,Animatable *prev)
	{
	this->ip = ip;
	if (flags&BEGIN_EDIT_CREATE) {
		creating = TRUE;
	} else { creating = FALSE; }

	if (pmapParam) {		
		// Left over
		pmapParam->SetParamBlock(pblock);
	} else {		
		hSot = ip->AddRollupPage( 
			hInstance, 
			MAKEINTRESOURCE(IDD_SW_DESC),
			DefaultSOTProc,
			GetString(IDS_AP_TOP), 
			(LPARAM)ip,APPENDROLL_CLOSED);

		// Gotta make a new one.
		pmapParam = CreateCPParamMap(
			descParam,PARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_AP_SURFWRAP),
			GetString(IDS_AP_PARAMETERS),
			0);
		}
		if (pmapParam)
			pmapParam->SetUserDlgProc(new SWrapObjectDlgProc(this));
	}
Beispiel #15
0
void PBombObject::BeginEditParams(
		IObjParam *ip,ULONG flags,Animatable *prev)
	{
	SimpleWSMObject::BeginEditParams(ip,flags,prev);
	this->ip = ip;

	if (pmapParam) {		
		// Left over
		pmapParam->SetParamBlock(pblock);
	} else {		
		hSot = ip->AddRollupPage( 
			hInstance, 
			MAKEINTRESOURCE(IDD_SW_DESC_BOTH),
			DefaultSOTProc,
			GetString(IDS_RB_TOP), 
			(LPARAM)ip,APPENDROLL_CLOSED);

		// Gotta make a new one.
		pmapParam = CreateCPParamMap(
			descParamBomb,BOMBPARAMDESC_LENGTH,
			pblock,
			ip,
			hInstance,
			MAKEINTRESOURCE(IDD_SW_PARTICLEBOMB),
			GetString(IDS_RB_PARAMETERS),
			0);
		}
		if (pmapParam) pmapParam->SetUserDlgProc(new PBombDlgProc(this));
	}
Beispiel #16
0
int MirrorMod::Display(
		TimeValue t, INode* inode, ViewExp *vpt, 
		int flagst, ModContext *mc)
	{
	GraphicsWindow *gw = vpt->getGW();
	Point3 pt[4];
	Matrix3 tm = CompMatrix(t,inode,mc);
	int savedLimits;

	gw->setRndLimits((savedLimits = gw->getRndLimits()) & ~GW_ILLUM);
	gw->setTransform(tm);
	if (ip && ip->GetSubObjectLevel() == 1) {
		//gw->setColor(LINE_COLOR, (float)1.0, (float)1.0, (float)0.0);
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_SEL_GIZMOS));
	} else {
		//gw->setColor(LINE_COLOR, (float).85, (float).5, (float)0.0);
		gw->setColor(LINE_COLOR,GetUIColor(COLOR_GIZMOS));
		}
	
	DrawLineProc lp(gw);
	DrawGizmo(
		vpt->GetScreenScaleFactor(tm.GetTrans())*SCREEN_SCALE,lp);
	
	gw->setRndLimits(savedLimits);
	return 0;
	}
Beispiel #17
0
void FExtrudeMod::BeginEditParams(
		IObjParam  *ip, ULONG flags,Animatable *prev)
	{
	this->ip = ip;
	editMod  = this;

	// Add our sub object type
	// TSTR type1(GetString(IDS_RB_EXTRUDECENT));
	// const TCHAR *ptype[] = {type1};
	// This call is obsolete. Please see BaseObject::NumSubObjTypes() and BaseObject::GetSubObjType()
	// ip->RegisterSubObjectTypes(ptype, 1);

	// Create sub object editing modes.
	moveMode    = new MoveModBoxCMode(this,ip);
	
	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);

	pmapParam = CreateCPParamMap(
		descParam,PARAMDESC_LENGTH,
		pblock,
		ip,
		hInstance,
		MAKEINTRESOURCE(IDD_FACEEXTRUDEPARAM),
		GetString(IDS_RB_PARAMETERS),
		0);	
	}
Beispiel #18
0
void EditFaceDataMod::ClearSelection(int selLevel) {
	ModContextList list;
	INodeTab nodes;	
	ip->GetModContexts(list,nodes);
	EditFaceDataModData *d;
	for (int i=0; i<list.Count(); i++) {
		d = (EditFaceDataModData*)list[i]->localData;
		if (!d) continue;

		// Check if we have anything selected first:
		switch (selLevel) {
		case SEL_FACE:
			if (!d->GetFaceSel().NumberSet()) continue;
			else break;
		}

		if (theHold.Holding() && !d->GetHeld()) theHold.Put (new SelectRestore (this, d));
		d->SynchSize ();
		switch (selLevel) {
		case SEL_FACE:
			d->GetFaceSel().ClearAll();
			break;
		}
	}
	nodes.DisposeTemporary();
	SelectionChanged ();
}
Beispiel #19
0
void TorusObject::UpdateUI()
{
	if (ip == NULL)
		return;
	TorusParamDlgProc* dlg = static_cast<TorusParamDlgProc*>(pmapParam->GetUserDlgProc());
	dlg->Update(ip->GetTime());
}
void ParticleMesherObject::UpdateUI()
{
   Point3 min,max;
   pblock2->GetValue(particlemesher_customboundsa,0,min,FOREVER);
   pblock2->GetValue(particlemesher_customboundsb,0,max,FOREVER);


   Box3 box;
   box.Init();
   box += min;
   box += max;

   
   TSTR text;
   BOOL useBounds;
   pblock2->GetValue(particlemesher_usecustombounds, 0, useBounds, FOREVER);

   if (useBounds)
      {
      if (box.IsEmpty())
         text.printf(_T("%s"),GetString(IDS_EMPTY));
      else 
         {
         text.printf(_T("(%0.0f,%0.0f,%0.0f)"),min.x,min.y,min.z);
         SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT),
            text);
         text.printf(_T("(%0.0f,%0.0f,%0.0f)"),max.x,max.y,max.z);
         SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT2),
            text);
         }

//make sure we only enable the button in the modify panel
// bug 257747 1/30/01 watje
      if (ip)
         {
         ICustButton *iBut = GetICustButton(GetDlgItem(hParams,IDC_PICKBB));
         if (ip->GetCommandPanelTaskMode()==TASK_MODE_MODIFY)
            {
            if (iBut) iBut->Enable(TRUE);
            }
         ReleaseICustButton(iBut);
         }

      }
   else
      {
      text.printf(_T(" "));
      SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT),
         text);
      text.printf(_T(" "));
      SetWindowText(GetDlgItem(hParams,IDC_BOUNDSTEXT2),
         text);
      ICustButton *iBut = GetICustButton(GetDlgItem(hParams,IDC_PICKBB));
      if (iBut) iBut->Enable(FALSE);
      ReleaseICustButton(iBut);

      }
   
}
Beispiel #21
0
void BombObject::EndEditParams(IObjParam *ip,ULONG flags,Animatable *next)
	{
	if (flags&END_EDIT_REMOVEUI) {		
		ip->DeleteRollupPage(hParam);
		ip->DeleteRollupPage(hSot);
		hParam = NULL;
		hSot   = NULL;
	} else {		
      DLSetWindowLongPtr(hParam, 0);      
		}
	
	if (GetFalloffOn(ip->GetTime())) {
		NotifyDependents(FOREVER,0,REFMSG_CHANGE);
		ip->RedrawViews(ip->GetTime());
		}
	this->ip = NULL;
	}
Beispiel #22
0
void EditFaceDataMod::GetWorldBoundBox(TimeValue t, INode* inode, ViewExp *vpt, Box3& box, ModContext *mc) {
	if (!ip->GetShowEndResult() || !mc->localData) return;
	if (!selLevel) return;
	EditFaceDataModData *modData = (EditFaceDataModData *) mc->localData;
	Matrix3 tm = inode->GetObjectTM(t);
	if (modData->GetCacheMesh ()) box = modData->GetCacheMesh()->getBoundingBox (&tm);
	else if (modData->GetCacheMNMesh()) box = modData->GetCacheMNMesh()->getBoundingBox(&tm);
}
Beispiel #23
0
void SolidifyPW::ActivateSubobjSel(int level, XFormModes& modes)
{
	if (ip)
	{
		ip->PipeSelLevelChanged();
		NotifyDependents(FOREVER, PART_SELECT|PART_DISPLAY|PART_SUBSEL_TYPE, REFMSG_CHANGE);
	}

}
Beispiel #24
0
void PinObject::EndEditParams(IObjParam *ip,ULONG flags,Animatable *next)
{	SimpleWSMObject::EndEditParams(ip,flags,next);
	this->ip = NULL;
	if (flags&END_EDIT_REMOVEUI )
	{	DestroyCPParamMap(pmapParam);
		ip->DeleteRollupPage(hSot);
		pmapParam = NULL;		
	}	
}
Beispiel #25
0
void RendSpline::BeginEditParams( IObjParam *ip, ULONG flags,Animatable *prev )
{
	this->ip = ip;

	ip->EnableShowEndResult(FALSE);

	TimeValue t = ip->GetTime();
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_BEGIN_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_ON);
	SetAFlag(A_MOD_BEING_EDITED);	

	RendSplineDesc.BeginEditParams(ip, this, flags, prev);

	// pointcache_param_blk.SetUserDlgProc(new PointCacheParamsMapDlgProc(this));

	paramDlgProc = new RendSplineParamsMapDlgProc(this);
	rendspline_param_blk.SetUserDlgProc(paramDlgProc);

}
Beispiel #26
0
void HelixObject::EndEditParams( IObjParam *ip,ULONG flags,Animatable *next )
	{
	SimpleShape::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags&END_EDIT_REMOVEUI ) {
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
		}

	// Save these values in class variables so the next object created will inherit them.
	pblock->GetValue(PB_TURNS,ip->GetTime(),dlgTurns,FOREVER);
	pblock->GetValue(PB_BIAS,ip->GetTime(),dlgBias,FOREVER);
	pblock->GetValue(PB_DIRECTION,ip->GetTime(),dlgDirection,FOREVER);
	}
Beispiel #27
0
void PrismObject::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next )
	{		
	SimpleObject::EndEditParams(ip,flags,next);
	this->ip = NULL;

	if (flags&END_EDIT_REMOVEUI ) {
		if (pmapCreate) DestroyCPParamMap(pmapCreate);
		if (pmapTypeIn) DestroyCPParamMap(pmapTypeIn);
		DestroyCPParamMap(pmapParam);
		pmapParam  = NULL;
		pmapTypeIn = NULL;
		pmapCreate = NULL;
		}

	// Save these values in class variables so the next object created will inherit them.
	pblock->GetValue(PB_S1SEGS,ip->GetTime(),dlgSide1Segs,FOREVER);
	pblock->GetValue(PB_S2SEGS,ip->GetTime(),dlgSide2Segs,FOREVER);	
	pblock->GetValue(PB_S3SEGS,ip->GetTime(),dlgSide3Segs,FOREVER);	
	pblock->GetValue(PB_HSEGS,ip->GetTime(),dlgHSegs,FOREVER);		
	}
Beispiel #28
0
void AFRMod::EndEditParams(
		IObjParam *ip,ULONG flags,Animatable *next)
	{
	this->ip = NULL;
	editMod  = NULL;

	TimeValue t = ip->GetTime();

	// NOTE: This flag must be cleared before sending the REFMSG_END_EDIT
	ClearAFlag(A_MOD_BEING_EDITED);

	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_END_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF);

	ip->DeleteMode(moveMode);	
	if (moveMode) delete moveMode;
	moveMode = NULL;	

	DestroyCPParamMap(pmapParam);
	}
Beispiel #29
0
void EditFaceDataMod::UpdateDialog () {	
	TSTR buf;
	int numFaces=0, whichFace=0;
	float value = 1.0f;
	bool valueDetermined = true;

	if (!hParams) return;

	ModContextList mcList;
	INodeTab nodes;
	ip->GetModContexts(mcList,nodes);

	if (selLevel) {
		for (int i = 0; i < mcList.Count(); i++) {
			EditFaceDataModData *meshData = (EditFaceDataModData*)mcList[i]->localData;
			if (!meshData) continue;
			int numSelectedHere;
			meshData->DescribeSelection (numSelectedHere, whichFace, value, valueDetermined);
			numFaces += numSelectedHere;
		}
	}

	ISpinnerControl *spin = GetISpinner (GetDlgItem (hParams, IDC_VALUE_SPIN));
	ICustButton *but = GetICustButton (GetDlgItem (hParams, IDC_RESET_SELECTION));

	switch (selLevel) {
	case SEL_FACE:
		if (numFaces==1) {
			buf.printf (GetString(IDS_FACE_SELECTED), whichFace+1);
		} else {
			if (numFaces) buf.printf (GetString (IDS_FACES_SELECTED), numFaces);
			else buf = GetString (IDS_NO_FACE_SELECTED);
		}
		but->Enable (numFaces);
		spin->Enable (numFaces);
		if (numFaces && valueDetermined) {
			spin->SetIndeterminate (false);
			spin->SetValue (value, FALSE);
		} else {
			spin->SetIndeterminate (true);
		}
		break;

	case SEL_OBJECT:
		buf = GetString (IDS_OBJECT_SELECTED);
		spin->Disable();
		but->Disable ();
		break;
	}

	SetDlgItemText(hParams,IDC_FACE_SELECTED,buf);
	ReleaseISpinner (spin);
	ReleaseICustButton (but);
}
Beispiel #30
0
void SolidifyPW::EndEditParams( IObjParam *ip, ULONG flags,Animatable *next)
{
	hWnd = NULL;
	SolidifyPWDesc.EndEditParams(ip, this, flags, next);

	TimeValue t = ip->GetTime();
	ClearAFlag(A_MOD_BEING_EDITED);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_END_EDIT);
	NotifyDependents(Interval(t,t), PART_ALL, REFMSG_MOD_DISPLAY_OFF);
	this->ip = NULL;
}