Exemplo n.º 1
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;
	}
Exemplo n.º 2
0
void BombObject::BeginEditParams(IObjParam *ip,ULONG flags,Animatable *prev)
	{
	this->ip = ip;
	
	if (!hParam) {
		hSot = ip->AddRollupPage( 
				hInstance, 
				MAKEINTRESOURCE(IDD_BOMB_SOT),
				DefaultSOTProc,
				GetString(IDS_RB_SOT), 
				(LPARAM)ip,APPENDROLL_CLOSED);

		hParam = ip->AddRollupPage( 
				hInstance, 
				MAKEINTRESOURCE(IDD_BOMBPARAMS),
				BombParamProc,
				GetString(IDS_RB_BOMBPARAMS), 
				(LPARAM)this );
	} else {
      DLSetWindowLongPtr(hParam, this);      

		// Init the dialog to our values.
		strengthSpin->SetValue(GetStrength(ip->GetTime()),FALSE);
		gravSpin->SetValue(GetGravity(ip->GetTime()),FALSE );
		chaosSpin->SetValue(GetChaos(ip->GetTime()),FALSE );
		detSpin->SetValue(GetDetonation(ip->GetTime()),FALSE );
		spinSpin->SetValue(GetSpin(ip->GetTime()),FALSE);
		falloffSpin->SetValue(GetFalloff(ip->GetTime()),FALSE);
		minFragSpin->SetValue(GetMinFrag(ip->GetTime()),FALSE);
		maxFragSpin->SetValue(GetMaxFrag(ip->GetTime()),FALSE);
		seedSpin->SetValue(GetSeed(ip->GetTime()),FALSE);
		CheckDlgButton(hParam,IDC_FALLOFF_ON,GetFalloffOn(ip->GetTime()));
		}

	if (GetFalloffOn(ip->GetTime())) {
		NotifyDependents(FOREVER,0,REFMSG_CHANGE);
		ip->RedrawViews(ip->GetTime());
		}
	}
Exemplo n.º 3
0
void FaceDataToColorMod::DisplayColors () {
	if (!mpInterface) return;

	int channel = 0;
	if (mpParams) mpParams->GetValue (pb_channel, TimeValue(0), channel, FOREVER);

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

	for (int nd = 0; nd<nodes.Count(); nd++) {
		nodes[nd]->SetCVertMode (true);
		nodes[nd]->SetShadeCVerts (true);
		if (channel) nodes[nd]->SetVertexColorType (nvct_illumination);
		else nodes[nd]->SetVertexColorType (nvct_color);
		//nodes[nd]->NotifyDependents (FOREVER, PART_DISPLAY, REFMSG_CHANGE);
	}

	// KLUGE: above notify dependents call only seems to set a limited refresh region.  Result looks bad.
	// So we do this instead:
	NotifyDependents (FOREVER, PART_DISPLAY, REFMSG_CHANGE);
	mpInterface->RedrawViews (mpInterface->GetTime());
}