Fixed undo/redo when selecting objects from the instance view, set DKCR to render basic lighting for objects with no ingame model
This commit is contained in:
parent
ecab7be63f
commit
6ac7c1cbd2
|
@ -179,6 +179,14 @@ void CScriptNode::Draw(FRenderOptions Options, int ComponentIndex, const SViewIn
|
|||
|
||||
else
|
||||
{
|
||||
// DKCR doesn't support world lighting yet, so light nodes that don't have ingame models with default lighting
|
||||
if (Template()->Game() == eReturns && !mpInstance->HasInGameModel() && CGraphics::sLightMode == CGraphics::eWorldLighting)
|
||||
{
|
||||
CGraphics::SetDefaultLighting();
|
||||
CGraphics::sVertexBlock.COLOR0_Amb = CGraphics::skDefaultAmbientColor;
|
||||
}
|
||||
|
||||
else
|
||||
LoadLights(ViewInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -144,15 +144,11 @@ void WInstancesTab::OnTreeDoubleClick(QModelIndex Index)
|
|||
if ((mpEditor) && (IndexType == CInstancesModel::eInstanceIndex))
|
||||
{
|
||||
CInstancesModel::ENodeType NodeType = mpTypesModel->IndexNodeType(SourceIndex);
|
||||
CSceneNode *pSelectedNode = nullptr;
|
||||
|
||||
if (NodeType == CInstancesModel::eScriptType)
|
||||
pSelectedNode = mpScene->NodeForObject( static_cast<CScriptObject*>(SourceIndex.internalPointer()) );
|
||||
|
||||
if (pSelectedNode)
|
||||
{
|
||||
mpEditor->ClearSelection();
|
||||
mpEditor->SelectNode(pSelectedNode);
|
||||
CSceneNode *pSelectedNode = mpScene->NodeForObject( static_cast<CScriptObject*>(SourceIndex.internalPointer()) );
|
||||
mpEditor->ClearAndSelectNode(pSelectedNode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue