From 00a3ad71472bbca13fe868c36c4f3c5685cd9991 Mon Sep 17 00:00:00 2001 From: Trevor SANDY Date: Wed, 5 Jul 2023 03:13:47 +0200 Subject: [PATCH] Blender lights - actions --- common/lc_mainwindow.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/common/lc_mainwindow.cpp b/common/lc_mainwindow.cpp index 759e7871..4bc9aff9 100644 --- a/common/lc_mainwindow.cpp +++ b/common/lc_mainwindow.cpp @@ -206,6 +206,16 @@ void lcMainWindow::CreateActions() EditActionLightIcon.addFile(":/resources/action_light_16.png"); mActions[LC_EDIT_ACTION_LIGHT]->setIcon(EditActionLightIcon); + QIcon EditActionArealightIcon; + EditActionArealightIcon.addFile(":/resources/action_arealight.png"); + EditActionArealightIcon.addFile(":/resources/action_arealight_16.png"); + mActions[LC_EDIT_ACTION_AREALIGHT]->setIcon(EditActionArealightIcon); + + QIcon EditActionSunlightIcon; + EditActionSunlightIcon.addFile(":/resources/action_sunlight.png"); + EditActionSunlightIcon.addFile(":/resources/action_sunlight_16.png"); + mActions[LC_EDIT_ACTION_SUNLIGHT]->setIcon(EditActionSunlightIcon); + QIcon EditActionSpotLightIcon; EditActionSpotLightIcon.addFile(":/resources/action_spotlight.png"); EditActionSpotLightIcon.addFile(":/resources/action_spotlight_16.png"); @@ -422,6 +432,8 @@ void lcMainWindow::CreateMenus() mToolsMenu = new QMenu(tr("Tools"), this); mToolsMenu->addAction(mActions[LC_EDIT_ACTION_INSERT]); mToolsMenu->addAction(mActions[LC_EDIT_ACTION_LIGHT]); + mToolsMenu->addAction(mActions[LC_EDIT_ACTION_AREALIGHT]); + mToolsMenu->addAction(mActions[LC_EDIT_ACTION_SUNLIGHT]); mToolsMenu->addAction(mActions[LC_EDIT_ACTION_SPOTLIGHT]); mToolsMenu->addAction(mActions[LC_EDIT_ACTION_CAMERA]); mToolsMenu->addSeparator(); @@ -665,6 +677,8 @@ void lcMainWindow::CreateToolBars() insertToolBarBreak(mToolsToolBar); mToolsToolBar->addAction(mActions[LC_EDIT_ACTION_INSERT]); mToolsToolBar->addAction(mActions[LC_EDIT_ACTION_LIGHT]); + mToolsToolBar->addAction(mActions[LC_EDIT_ACTION_AREALIGHT]); + mToolsToolBar->addAction(mActions[LC_EDIT_ACTION_SUNLIGHT]); mToolsToolBar->addAction(mActions[LC_EDIT_ACTION_SPOTLIGHT]); mToolsToolBar->addAction(mActions[LC_EDIT_ACTION_CAMERA]); mToolsToolBar->addSeparator(); @@ -3366,6 +3380,14 @@ void lcMainWindow::HandleCommand(lcCommandId CommandId) SetTool(lcTool::Light); break; + case LC_EDIT_ACTION_AREALIGHT: + SetTool(lcTool::AreaLight); + break; + + case LC_EDIT_ACTION_SUNLIGHT: + SetTool(lcTool::SunLight); + break; + case LC_EDIT_ACTION_SPOTLIGHT: SetTool(lcTool::SpotLight); break;