Implement Viewport render with material preview #56

Merged
Bogdan Nagirniak merged 22 commits from BLEN-421 into hydra-render 2023-06-30 09:03:28 +02:00
2 changed files with 6 additions and 3 deletions
Showing only changes of commit 03af6f785d - Show all commits

View File

@ -359,7 +359,8 @@ void InstancerData::write_instances()
LISTBASE_FOREACH (DupliObject *, dupli, lb) {
Object *ob = dupli->ob;
if (scene_delegate_->view3d && !V3D_USES_SCENE_LIGHTS(scene_delegate_->view3d) &&
ob->type == OB_LAMP) {
ob->type == OB_LAMP)
BogdanNagirniak marked this conversation as resolved Outdated

if (ob->type == OB_LAMP && !scene_delegate_->shading_settings.use_scene_lights)

`if (ob->type == OB_LAMP && !scene_delegate_->shading_settings.use_scene_lights)`
{
return;
}
if (!is_supported(ob) || !is_instance_visible(ob)) {

View File

@ -12,8 +12,8 @@
#include <pxr/usd/usdLux/tokens.h>
#include "BKE_context.h"
#include "DNA_node_types.h"
#include "DEG_depsgraph_query.h"
BogdanNagirniak marked this conversation as resolved Outdated

shouldn't be needed

shouldn't be needed
#include "DNA_node_types.h"
#include "BKE_node.h"
#include "BKE_node_runtime.hh"
@ -55,7 +55,9 @@ void WorldData::init()
data_[pxr::UsdLuxTokens->orientToStageUpAxis] = true;
eEvaluationMode deg_mode = DEG_get_mode(scene_delegate_->depsgraph);
if (world->use_nodes && ((deg_mode == DAG_EVAL_VIEWPORT && scene_delegate_->view3d && V3D_USES_SCENE_WORLD(scene_delegate_->view3d)) || deg_mode == DAG_EVAL_RENDER))
if (world->use_nodes && ((deg_mode == DAG_EVAL_VIEWPORT && scene_delegate_->view3d &&
V3D_USES_SCENE_WORLD(scene_delegate_->view3d)) ||
deg_mode == DAG_EVAL_RENDER))
{
/* TODO: Create nodes parsing system */