forked from blender/blender
Export volumes #58
@ -39,7 +39,9 @@ void PreviewEngine::update_render_result(std::vector<float> &pixels)
|
|||||||
|
|
||||||
RenderLayer *layer = (RenderLayer *)result->layers.first;
|
RenderLayer *layer = (RenderLayer *)result->layers.first;
|
||||||
RenderPass *pass = (RenderPass *)layer->passes.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);
|
RE_engine_end_result(bl_engine_, result, false, false, false);
|
||||||
}
|
}
|
||||||
|
@ -288,7 +288,9 @@ pxr::SdfPath BlenderSceneDelegate::world_prim_id() const
|
|||||||
|
|
||||||
ObjectData *BlenderSceneDelegate::object_data(pxr::SdfPath const &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);
|
auto obj_data = objects_.lookup_ptr(p_id);
|
||||||
if (obj_data) {
|
if (obj_data) {
|
||||||
return obj_data->get();
|
return obj_data->get();
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
#include "light.h"
|
#include "light.h"
|
||||||
#include "mesh.h"
|
#include "mesh.h"
|
||||||
#include "object.h"
|
#include "object.h"
|
||||||
#include "world.h"
|
|
||||||
#include "volume.h"
|
#include "volume.h"
|
||||||
|
#include "world.h"
|
||||||
|
|
||||||
namespace blender::render::hydra {
|
namespace blender::render::hydra {
|
||||||
|
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
/* SPDX-License-Identifier: Apache-2.0
|
/* SPDX-License-Identifier: Apache-2.0
|
||||||
* Copyright 2011-2022 Blender Foundation */
|
* Copyright 2011-2022 Blender Foundation */
|
||||||
|
|
||||||
#include <pxr/imaging/hd/tokens.h>
|
|
||||||
#include <pxr/imaging/hd/bprim.h>
|
#include <pxr/imaging/hd/bprim.h>
|
||||||
|
#include <pxr/imaging/hd/tokens.h>
|
||||||
#include <pxr/imaging/hd/volumeFieldSchema.h>
|
#include <pxr/imaging/hd/volumeFieldSchema.h>
|
||||||
#include <pxr/usd/usdHydra/tokens.h>
|
#include <pxr/usd/usdHydra/tokens.h>
|
||||||
#include <pxr/usd/usdVol/tokens.h>
|
#include <pxr/usd/usdVol/tokens.h>
|
||||||
#include <pxr/usdImaging/usdVolImaging/tokens.h>
|
#include <pxr/usdImaging/usdVolImaging/tokens.h>
|
||||||
|
|
||||||
#include "BKE_volume.h"
|
|
||||||
#include "BKE_material.h"
|
#include "BKE_material.h"
|
||||||
#include "DNA_volume_types.h"
|
#include "BKE_volume.h"
|
||||||
#include "BLI_index_range.hh"
|
#include "BLI_index_range.hh"
|
||||||
|
#include "DNA_volume_types.h"
|
||||||
|
|
||||||
#include "blender_scene_delegate.h"
|
#include "blender_scene_delegate.h"
|
||||||
#include "volume.h"
|
#include "volume.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user