Export volumes #58

Merged
Bogdan Nagirniak merged 10 commits from BLEN-384 into hydra-render 2023-07-04 09:57:33 +02:00
5 changed files with 20 additions and 16 deletions
Showing only changes of commit 5909ec8465 - Show all commits

View File

@ -39,7 +39,9 @@ void PreviewEngine::update_render_result(std::vector<float> &pixels)
RenderLayer *layer = (RenderLayer *)result->layers.first;
RenderPass *pass = (RenderPass *)layer->passes.first;
memcpy(pass->buffer.data, pixels.data(), sizeof(float) * pass->rectx * pass->recty * pass->channels);
memcpy(pass->buffer.data,
pixels.data(),
sizeof(float) * pass->rectx * pass->recty * pass->channels);
RE_engine_end_result(bl_engine_, result, false, false, false);
}

View File

@ -288,7 +288,9 @@ pxr::SdfPath BlenderSceneDelegate::world_prim_id() const
ObjectData *BlenderSceneDelegate::object_data(pxr::SdfPath const &id) const
{
pxr::SdfPath p_id = (id.GetName().find("SM_") == 0 || id.GetName().find("VF_") == 0) ? id.GetParentPath() : id;
pxr::SdfPath p_id = (id.GetName().find("SM_") == 0 || id.GetName().find("VF_") == 0) ?
id.GetParentPath() :
id;
auto obj_data = objects_.lookup_ptr(p_id);
if (obj_data) {
return obj_data->get();

View File

@ -17,8 +17,8 @@
#include "light.h"
#include "mesh.h"
#include "object.h"
#include "world.h"
#include "volume.h"
#include "world.h"
namespace blender::render::hydra {

View File

@ -1,17 +1,17 @@
/* SPDX-License-Identifier: Apache-2.0
* Copyright 2011-2022 Blender Foundation */
#include <pxr/imaging/hd/tokens.h>
#include <pxr/imaging/hd/bprim.h>
#include <pxr/imaging/hd/tokens.h>
#include <pxr/imaging/hd/volumeFieldSchema.h>
#include <pxr/usd/usdHydra/tokens.h>
#include <pxr/usd/usdVol/tokens.h>
#include <pxr/usdImaging/usdVolImaging/tokens.h>
#include "BKE_volume.h"
#include "BKE_material.h"
#include "DNA_volume_types.h"
#include "BKE_volume.h"
#include "BLI_index_range.hh"
#include "DNA_volume_types.h"
#include "blender_scene_delegate.h"
#include "volume.h"