Beispiel #1
0
void TapeHelpCreationManager::CreateNewObject()
{
    tapeObject = (TapeHelpObject*)cDesc->Create();
    lastPutCount = theHold.GetGlobalPutCount();

    macroRec->BeginCreate(cDesc);
    // Start the edit params process
    if ( tapeObject ) {

        tapeObject->SetAFlag(A_OBJ_LONG_CREATE);
#ifndef NO_CREATE_TASK  // russom - 12/04/01
        tapeObject->BeginEditParams( (IObjParam*)createInterface, BEGIN_EDIT_CREATE, NULL );
#endif
    }
}
Beispiel #2
0
void CreateSWrapObjectProc::CreateNewObject()
	{
	SWrapObj = (SWrapObject*)cDesc->Create();
	lastPutCount  = theHold.GetGlobalPutCount();
	
	// Start the edit params process
	if ( SWrapObj ) {
#ifndef NO_CREATE_TASK	// russom - 12/04/01
		SWrapObj->BeginEditParams( (IObjParam*)createInterface, BEGIN_EDIT_CREATE, NULL );
#endif
#ifdef _OSNAP
		SWrapObj->SetAFlag(A_OBJ_LONG_CREATE);
#endif
		}	
	}
Beispiel #3
0
void ViewportLoader::LoadEffect(ClassDesc * pd)
{

	ReferenceTarget * newEffect;
	ReferenceTarget * oldEffect;

	if (theHold.Holding())
	{
		oldEffect = effect;

//		theHold.Suspend(); 


		if(pd == NULL){
			newEffect = NULL;
		}
		else{
			newEffect = (ReferenceTarget *)pd->Create(FALSE);
			DbgAssert(newEffect && _M("Plug-in instance creation failed. Possible cause: deferred plug-in failed to load."));
			if(!newEffect)
			{
				// maybe deferred
				ClassDesc * def = FindandLoadDeferedEffect(pd);
				if(def)
				{
					newEffect = (ReferenceTarget *)def->Create(FALSE);
				}

			}

		}

//		theHold.Resume(); 

		if (theHold.Holding())
			theHold.Put(new AddEffectRestore(this,oldEffect,newEffect));

		SwapEffect(newEffect);
	}
}
Beispiel #4
0
void ViewportLoader::LoadEffectsList()
{
	// loads static shader list with name-sorted Shader ClassDesc*'s
	bool bdx9 = false;

	GraphicsWindow *gw = NULL;

	ViewExp& vpt = GetCOREInterface()->GetActiveViewExp();	

	if(vpt.IsAlive())
	{
		gw = vpt.getGW();
		if(gw && gw->GetInterface(D3D9_GRAPHICS_WINDOW_INTERFACE_ID))
	{
		bdx9 = true;
	}
		
	}

	effectsList.ZeroCount();
	SubClassList* scList = GetCOREInterface()->GetDllDir().ClassDir().GetClassList(REF_TARGET_CLASS_ID);
	theHold.Suspend(); // LAM - 3/24/03 - defect 446356 - doing a DeleteThis on created effects, need to make sure hold is off
	for (long i = 0, j = 0; i < scList->Count(ACC_ALL); ++i) {
		if ( (*scList)[ i ].IsPublic() ) {
			ClassDesc* pClassD = (*scList)[ i ].CD();
			const TCHAR *cat = pClassD->Category();
			TCHAR *defcat = GetString(IDS_DX_VIEWPORT_EFFECT);
			if ((cat) && (_tcscmp(cat,defcat) == 0)) 
			{
			
				ReferenceTarget * effect = (ReferenceTarget *)pClassD->Create(TRUE);
				if(effect)
				{

					IDX9DataBridge * vp = (IDX9DataBridge*)effect->GetInterface(VIEWPORT_SHADER9_CLIENT_INTERFACE);
					if( vp)
					{
						if(bdx9)
						{
							
							if(vp->GetDXVersion() >=9.0f || vp->GetDXVersion() == 1.0f)
							{
								effectsList.Append(1, &pClassD);
							}
						}
						else
						{
							if(vp->GetDXVersion() < 9.0f)
							{
								effectsList.Append(1, &pClassD);
							}

						}
					}
					else
					{
						IDXDataBridge * vp = (IDXDataBridge*)effect->GetInterface(VIEWPORT_SHADER_CLIENT_INTERFACE);
						if(vp && !bdx9)
						{
							effectsList.Append(1, &pClassD);
						}
					}

					effect->MaybeAutoDelete();
				}
			}

		}
	}
	theHold.Resume();
	effectsList.Sort(&classDescListCompare);
}