예제 #1
0
DxStdMtl2::~DxStdMtl2()
{
	if(stdDualVS)
		stdDualVS->DeleteThis();

	//need to the get the macros in here.
	SAFE_DELETE(mpMeshCache);
	SAFE_RELEASE(m_pErrorEffect);

	if(pEffectParser)
	{
		pEffectParser->DestroyParser();
		pEffectParser = NULL;
	}



	for(int f =0; f<sceneLights.Count();f++)
	{
		delete sceneLights[f];
	}


	UnRegisterNotification(NotificationCallback,this,NOTIFY_SCENE_ADDED_NODE);
	UnRegisterNotification(NotificationCallback,this,NOTIFY_SCENE_POST_DELETED_NODE);
	UnRegisterNotification(NotificationCallback,this,NOTIFY_SCENE_PRE_DELETED_NODE);
	UnRegisterNotification(NotificationCallback,this,NOTIFY_SCENE_UNDO);
	UnRegisterNotification(NotificationCallback,this,NOTIFY_SCENE_REDO);
	UnRegisterNotification(NotificationCallback,this,NOTIFY_FILE_POST_OPEN);
	UnRegisterNotification(NotificationCallback,this,NOTIFY_SCENE_PRE_UNDO);
	UnRegisterNotification(NotificationCallback,this,NOTIFY_SCENE_PRE_REDO);
	UnRegisterNotification(NotificationCallback, this, NOTIFY_D3D_PRE_DEVICE_RESET);
	UnRegisterNotification(NotificationCallback, this, NOTIFY_D3D_POST_DEVICE_RESET);
}
void RigidBodyWorld::DestroyUI(HWND hWnd)
{
	ReleaseICustEdit (m_minFps);
	ReleaseICustEdit (m_gravity[0]);
	ReleaseICustEdit (m_gravity[1]);
	ReleaseICustEdit (m_gravity[2]);

	UnRegisterNotification(OnUndoRedo, this, NOTIFY_SCENE_UNDO);
	UnRegisterNotification (OnUndoRedo, this, NOTIFY_SCENE_REDO);

}
RigidBodyWorldDesc::~RigidBodyWorldDesc ()
{
//	_ASSERTE (m_newton);
//	NewtonDestroy (m_newton);

//	UnRegisterNotification(OnPostCloneNode, this, NOTIFY_POST_NODES_CLONED);
	UnRegisterNotification(OnPostLoadScene, this, NOTIFY_FILE_POST_OPEN);
	UnRegisterNotification(OnPreDeleteNode, this, NOTIFY_SCENE_PRE_DELETED_NODE);

//	Interface* const inteface = GetCOREInterface();
//	RigBodyWorldUpdate* const timeCallback = this;
//	inteface->UnRegisterTimeChangeCallback(timeCallback);	
}
예제 #4
0
RigidBodyWorldDesc::~RigidBodyWorldDesc ()
{
	// I can no create the body here because pthreads can no be destroyed at C++ start pr when calling at exit.
	// basically I need to plug this in a Max Notification functions, for now just comment this out
//	_ASSERTE (m_newton);
//	NewtonDestroy (m_newton);

//	UnRegisterNotification(OnPostCloneNode, this, NOTIFY_POST_NODES_CLONED);
	UnRegisterNotification(OnPostLoadScene, this, NOTIFY_FILE_POST_OPEN);
	UnRegisterNotification(OnPreDeleteNode, this, NOTIFY_SCENE_PRE_DELETED_NODE);

//	Interface* const inteface = GetCOREInterface();
//	RigBodyWorldUpdate* const timeCallback = this;
//	inteface->UnRegisterTimeChangeCallback(timeCallback);	
}
예제 #5
0
void SceneSync::IShutdown()
{
    UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_PRE_RESET);
    UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_PRE_NEW);
    UnRegisterNotification(INotify, 0, NOTIFY_FILE_PRE_OPEN);
    UnRegisterNotification(INotify, 0, NOTIFY_PRE_EXPORT);

    UnRegisterNotification(INotify, 0, NOTIFY_FILE_POST_OPEN);
    UnRegisterNotification(INotify, 0, NOTIFY_POST_EXPORT);
    UnRegisterNotification(INotify, 0, NOTIFY_EXPORT_FAILED);

    UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_SHUTDOWN);

    delete fUpdateSignal;
    fUpdateSignal = nil;
}
예제 #6
0
파일: GeoEdit.cpp 프로젝트: hkaiser/TRiAS
// --------------------------------------------------------------------------------------------
STDMETHODIMP_(BOOL) CGeoEditExtension::UnLoadExtension (void)
{
	// Interface's wieder freigeben
	m_wBScript.Assign(NULL);	// BScript freigeben
	m_wObjOper.Assign (NULL);	// ObjOper freigeben

	// TRiAS-Messages wieder abmelden
	// ich interessiere mich nicht mehr für die von TRiAS verschickten Meldungen
	UnRegisterNotification (DEX_DELOBJECT);
	UnRegisterNotification (DEX_OBJECTDEACTIVATED);
	UnRegisterNotification (DEX_PROJECTCLOSE);		// Projekt wird geschlossen
	UnRegisterNotification (DEX_SIGHTSELECTED);		// eine Sicht wird ausgewählt
	UnRegisterNotification (DEX_PROJECTOPEN);		// Projekt wird geöffnet
	UnRegisterNotification (DEX_SETACTIVETOOL);		// Auswahl einer Editier-Icone

	// eigene Windows-Message wieder abmelden (2 Parameter)
	UnRegisterNotification (WM_WM_DESIGNBUILDEND, false);
	UnRegisterNotification (WM_MOUSEMOVE, false);

	if (m_wTopObjs.IsValid())
	{
	long lTOCnt = 0;	// Anzahl der ausgewählten Objekte

		m_wTopObjs->GetCount (&lTOCnt);

		// wenn die Erweiterung zwar entladen, das Projekt aber noch nicht geschlossen wird
		if (lTOCnt > 0 &&					// und mindestens 1 Objekt ausgewählt ist und
			m_bVtIndicate)					// und Stützpunkte markiert sind,
			m_wTopObjs->VerticesUnIndicate();	// dann Stützpunktmarkierungen löschen

		m_bVtIndicate = false;
	}

	// Werkzeuge wieder entfernen
	if (m_bEditTBarInst)
	{
		RemoveEditToolbar();
		m_bEditTBarInst = false;
	}

	if (m_bDesignTBarInst)
	{
		RemoveDesignToolbar();
		m_bDesignTBarInst = false;
	}

	// Standard-Cursor wieder einstellen
	DELETE_OBJ (m_EditCursor);
	DELETE_OBJ (m_VertexCursor);
	DELETE_OBJ (m_LineCursor);
	DELETE_OBJ (m_DeleteCursor);
	DELETE_OBJ (m_InsideCursor);
	DELETE_OBJ (m_GrabCursor);
	if (CURSFORM_PFEIL != m_CF) SetCursor();

	// Interface's wieder freigeben
	if (m_wTopObjs.IsValid())
	{
		m_wTopObjs->SetXtensionSite (NULL);
		m_wTopObjs.Assign (NULL);
	}

	if (m_wEditOper.IsValid())
	{
		m_wEditOper->SetEditExtensionSite (NULL);
		m_wEditOper.Assign (NULL);
	}

	m_wRestrLine1.Assign (NULL);
	m_wRestrLine2.Assign (NULL);


	return CTriasExtension::UnLoadExtension();

} // UnLoadExtension
예제 #7
0
void plComponentDlg::INotify(void *param, NotifyInfo *info)
{
    if (info->intcode == NOTIFY_SYSTEM_SHUTDOWN)
    {
        UnRegisterNotification(INotify, 0, NOTIFY_FILE_PRE_OPEN);
        UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_PRE_NEW);
        UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_PRE_RESET);
        UnRegisterNotification(INotify, 0, NOTIFY_FILE_PRE_MERGE);
        UnRegisterNotification(INotify, 0, NOTIFY_PRE_IMPORT);
        UnRegisterNotification(INotify, 0, NOTIFY_FILE_PRE_SAVE);
        UnRegisterNotification(INotify, 0, NOTIFY_FILE_PRE_SAVE_OLD);

        UnRegisterNotification(INotify, 0, NOTIFY_FILE_POST_OPEN);
        UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_POST_NEW);
        UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_POST_RESET);
        UnRegisterNotification(INotify, 0, NOTIFY_FILE_POST_MERGE);
        UnRegisterNotification(INotify, 0, NOTIFY_POST_IMPORT);

        UnRegisterNotification(INotify, 0, NOTIFY_SYSTEM_SHUTDOWN);
    }
    // New nodes are coming in, refresh the scene component list
    else if (info->intcode == NOTIFY_FILE_POST_OPEN ||
             info->intcode == NOTIFY_SYSTEM_POST_NEW ||
             info->intcode == NOTIFY_SYSTEM_POST_RESET ||
             info->intcode == NOTIFY_FILE_POST_MERGE ||
             info->intcode == NOTIFY_POST_IMPORT)
    {
        Instance().IRefreshTree();
    }
    // Nodes may be going away, save the comment now
    else if (info->intcode == NOTIFY_FILE_PRE_OPEN ||
             info->intcode == NOTIFY_SYSTEM_PRE_NEW ||
             info->intcode == NOTIFY_SYSTEM_PRE_RESET ||
             info->intcode == NOTIFY_FILE_PRE_MERGE ||
             info->intcode == NOTIFY_PRE_IMPORT ||
             info->intcode == NOTIFY_FILE_PRE_SAVE ||
             info->intcode == NOTIFY_FILE_PRE_SAVE_OLD)
    {
        // This is causing a crash, so for now if you add a comment and don't
        // pick another component or close the manager before closing the file,
        // you lose the comment -Colin
//      Instance().IGetComment();
    }
}
예제 #8
0
void CMaxMaterialCollection::FinalRelease()
{
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILE_PRE_OPEN);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILE_POST_OPEN);
    UnRegisterNotification(NotifyProc, this, NOTIFY_FILE_OPEN_FAILED);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILE_PRE_MERGE);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILE_POST_MERGE);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILE_PRE_SAVE);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILE_POST_SAVE);
	UnRegisterNotification(NotifyProc, this, NOTIFY_PRE_IMPORT);
	UnRegisterNotification(NotifyProc, this, NOTIFY_POST_IMPORT);
	UnRegisterNotification(NotifyProc, this, NOTIFY_SYSTEM_PRE_NEW);
	UnRegisterNotification(NotifyProc, this, NOTIFY_SYSTEM_POST_NEW);
	UnRegisterNotification(NotifyProc, this, NOTIFY_SYSTEM_PRE_RESET);
	UnRegisterNotification(NotifyProc, this, NOTIFY_SYSTEM_POST_RESET);
	UnRegisterNotification(NotifyProc, this, NOTIFY_SCENE_UNDO);
	UnRegisterNotification(NotifyProc, this, NOTIFY_SCENE_REDO);
#ifdef SUSPEND_UNDO
	UnRegisterNotification(NotifyProc, this, NOTIFY_SCENE_PRE_UNDO);
	UnRegisterNotification(NotifyProc, this, NOTIFY_SCENE_PRE_REDO);
#endif

	UnRegisterNotification(NotifyProc, (void *)this, NOTIFY_MEDIT_SHOW);

#ifdef TP_SUSPEND_FOR_FILELINK
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_PRE_BIND		);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_POST_BIND	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_PRE_DETACH	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_POST_DETACH	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_PRE_RELOAD	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_POST_RELOAD	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_PRE_ATTACH	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_FILELINK_POST_ATTACH	);
#endif

	//and finally a mechanism for other parts of the system to actively suspend TP
	UnRegisterNotification(NotifyProc, this, NOTIFY_TOOLPALETTE_MTL_SUSPEND	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_TOOLPALETTE_MTL_RESUME	);

	//for DID 642266, pre and post cloning 
	UnRegisterNotification(NotifyProc, this, NOTIFY_PRE_NODES_CLONED	);
	UnRegisterNotification(NotifyProc, this, NOTIFY_POST_NODES_CLONED	);

	DeleteAllRefsFromMe();

		
	if(shXmlMtlDllModule)
	{ 
		FreeLibrary(shXmlMtlDllModule);
		shXmlMtlDllModule = NULL;
	}

}
예제 #9
0
FormationBhvr::~FormationBhvr()
{
	//unregister the color callback
	UnRegisterNotification(ColorChangeNotifyProc, NULL, NOTIFY_COLOR_CHANGE);
}
예제 #10
0
plActionTableMgr::~plActionTableMgr()
{
    UnRegisterNotification(SysStartup, this, NOTIFY_SYSTEM_STARTUP);
    UnRegisterNotification(SysShutdown, this, NOTIFY_SYSTEM_SHUTDOWN);
}