Beispiel #1
0
RefResult TriPatchObject::NotifyRefChanged(
		Interval changeInt, 
		RefTargetHandle hTarget, 
   		PartID& partID, 
   		RefMessage message ) 
   	{
	switch (message) {
		case REFMSG_CHANGE:
			PatchMeshInvalid();
			if (editOb==this) InvalidateUI();
			break;

		case REFMSG_GET_PARAM_DIM: {
			GetParamDim *gpd = (GetParamDim*)partID;
			gpd->dim = GetParameterDim(gpd->index);			
			return REF_STOP; 
			}

		case REFMSG_GET_PARAM_NAME: {
			GetParamName *gpn = (GetParamName*)partID;
			gpn->name = GetParameterName(gpn->index);			
			return REF_STOP; 
			}
		}
	return(REF_SUCCEED);
	}
Beispiel #2
0
INT_PTR EditPolyPaintDeformDlgProc::DlgProc (TimeValue t, IParamMap2 *pmap, HWND hWnd,
						   UINT msg, WPARAM wParam, LPARAM lParam)
{
	//BOOL ret;
	switch (msg) {
	case WM_INITDIALOG: {
			uiValid = false;
			ICustButton *btn = GetICustButton(GetDlgItem(hWnd,IDC_PAINTDEFORM_PUSHPULL));
			btn->SetType(CBT_CHECK);
			ReleaseICustButton(btn);

			btn = GetICustButton(GetDlgItem(hWnd,IDC_PAINTDEFORM_RELAX));
			btn->SetType(CBT_CHECK);
			ReleaseICustButton(btn);

			btn = GetICustButton(GetDlgItem(hWnd,IDC_PAINTDEFORM_REVERT));
			btn->SetType(CBT_CHECK);
			ReleaseICustButton(btn);
			break;
		}

	case WM_PAINT:
		if (uiValid) break;
		SetEnables (hWnd);
		break;

	case WM_COMMAND:
		//uiValid = false;
		switch (LOWORD(wParam)) {
		case IDC_PAINTDEFORM_PUSHPULL:
			mpEPoly->OnPaintBtn( PAINTMODE_PAINTPUSHPULL, t );
			SetEnables (hWnd);
			break;
		case IDC_PAINTDEFORM_RELAX:
			mpEPoly->OnPaintBtn( PAINTMODE_PAINTRELAX, t );
			SetEnables (hWnd);
			break;
		case IDC_PAINTDEFORM_REVERT:
			mpEPoly->OnPaintBtn( PAINTMODE_ERASEDEFORM, t );
			SetEnables (hWnd);
			break;
		case IDC_PAINTDEFORM_APPLY:
			theHold.Begin ();
			mpEPoly->EpModCommit (t, false, true);
			theHold.Accept (GetString (IDS_PAINTDEFORM));
			break;
		case IDC_PAINTDEFORM_CANCEL:
			mpEPoly->EpModCancel ();
			break;
		case IDC_PAINTDEFORM_OPTIONS:
			GetMeshPaintMgr()->BringUpOptions();
			break;

		default:
			InvalidateUI (hWnd);
			break;
		}
	}
	return FALSE;
}
Beispiel #3
0
RefResult SWrapObject::NotifyRefChanged( 
		Interval changeInt,
		RefTargetHandle hTarget, 
		PartID& partID, 
		RefMessage message )
	{				
	switch (message) {		
		case REFMSG_CHANGE:	
			{ if (hTarget==custnode) cmValid.SetEmpty();
			  if (hTarget==pblock) InvalidateUI();
			SimpleWSMObject::NotifyRefChanged(changeInt,hTarget,partID,message);
			}
			break;
		case REFMSG_TARGET_DELETED:	
			{ if (hTarget==custnode) custnode=NULL;
			}
			break;
		case REFMSG_NODE_NAMECHANGE:
			{ if (hTarget==custnode) 
			  { custname = TSTR(custnode->GetName());
			    ShowName();
				}
			  break;
			}
		default: SimpleWSMObject::NotifyRefChanged(changeInt,hTarget,partID,message);
		}
	return REF_SUCCEED;
	}
Beispiel #4
0
// This is only called if the object MAKES references to other things.
RefResult PointHelpObject::NotifyRefChanged(
		Interval changeInt, RefTargetHandle hTarget, 
		PartID& partID, RefMessage message ) 
    {
	switch (message) {
		case REFMSG_CHANGE:
			if (editOb==this) InvalidateUI();
			break;
		}
	return(REF_SUCCEED);
	}
Beispiel #5
0
RefResult EllipseObject::NotifyRefChanged( Interval changeInt, RefTargetHandle hTarget, PartID& partID,  RefMessage message) 
{
	if(hTarget != myParamBlock)
		return SimpleSpline::NotifyRefChanged(changeInt, hTarget, partID, message);

	switch (message) 
	{
	case REFMSG_CHANGE:
		//invalidate the shape to reset the ivalid
		SimpleSpline::ShapeInvalid();
		ShapeObject::InvalidateGeomCache();

		InvalidateUI();
		break;
	}
	return REF_SUCCEED;
}
Beispiel #6
0
void TriPatchObject::SetGenUVW(BOOL sw) {  
	if (sw==HasUVW()) return;
	pblock->SetValue(PB_TEXTURE,0, sw);				
	InvalidateUI();
	}