|
|
@ -276,14 +276,13 @@ export class DownPanel extends React.Component<{ store?: DownPanelStore; }, {}>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
userConfig.oneKeyOpenLight = !userConfig.oneKeyOpenLight;
|
|
|
|
userConfig.oneKeyOpenLight = !userConfig.oneKeyOpenLight;
|
|
|
|
Light.DefaultOpenLight = userConfig.oneKeyOpenLight;
|
|
|
|
Light.DefaultOpenLight = userConfig.oneKeyOpenLight;
|
|
|
|
CommandWrap(() =>
|
|
|
|
//这里没有操作数据对象 所以不需要命令包裹
|
|
|
|
{
|
|
|
|
|
|
|
|
for (let light of app.Database.Lights.Entitys)
|
|
|
|
for (let light of app.Database.Lights.Entitys)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (light instanceof SpotLight || light instanceof RectAreaLight || light instanceof PointLight)
|
|
|
|
if (light instanceof SpotLight || light instanceof RectAreaLight || light instanceof PointLight)
|
|
|
|
(light as Light).OpenLight = userConfig.oneKeyOpenLight;
|
|
|
|
(light as Light).OpenLight = userConfig.oneKeyOpenLight;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, userConfig.oneKeyOpenLight ? "一键开灯" : "一键关灯");
|
|
|
|
app.Editor.UpdateScreen();
|
|
|
|
e.currentTarget.blur();
|
|
|
|
e.currentTarget.blur();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|