void CommandLoadTextureCustomColors::Execute()
{
	SceneEditorScreenMain *screen = dynamic_cast<SceneEditorScreenMain *>(UIScreenManager::Instance()->GetScreen());
	if(!screen)
		return;

	FilePath currentPath = screen->CustomColorsGetCurrentSaveFileName();
	if(currentPath.IsEmpty())
	{
        currentPath = SceneDataManager::Instance()->SceneGetActive()->GetScenePathname().GetDirectory();
	}

	FilePath selectedPathname = GetOpenFileName(String("Load texture"), currentPath, String("PNG image (*.png)"));
	if(!selectedPathname.IsEmpty())
	{
		screen->CustomColorsLoadTexture(selectedPathname);
	}
}
void CommandSaveTextureCustomColors::Execute()
{
	SceneEditorScreenMain *screen = dynamic_cast<SceneEditorScreenMain *>(UIScreenManager::Instance()->GetScreen());
	if(!screen)
		return;

	FilePath selectedPathname = screen->CustomColorsGetCurrentSaveFileName();

	if(selectedPathname.IsEmpty())
	{
        selectedPathname = SceneDataManager::Instance()->SceneGetActive()->GetScenePathname().GetDirectory();
	}

	QString filePath = QFileDialog::getSaveFileName(NULL, QString("Save texture"), QString(selectedPathname.GetAbsolutePathname().c_str()), QString("PNG image (*.png)"));

	selectedPathname = PathnameToDAVAStyle(filePath);

	if(!selectedPathname.IsEmpty())
		screen->CustomColorsSaveTexture(selectedPathname);
}