forked from blender/blender
Implement instancing for light objects #35
@ -107,13 +107,15 @@ bool InstancerData::update_visibility()
|
|||||||
change_tracker.MarkInstancerDirty(prim_id, pxr::HdChangeTracker::DirtyVisibility);
|
change_tracker.MarkInstancerDirty(prim_id, pxr::HdChangeTracker::DirtyVisibility);
|
||||||
for (auto &it : mesh_instances_) {
|
for (auto &it : mesh_instances_) {
|
||||||
it.second.data->visible = visible;
|
it.second.data->visible = visible;
|
||||||
change_tracker.MarkRprimDirty(it.second.data->prim_id, pxr::HdChangeTracker::DirtyVisibility);
|
change_tracker.MarkRprimDirty(it.second.data->prim_id,
|
||||||
|
pxr::HdChangeTracker::DirtyVisibility);
|
||||||
}
|
}
|
||||||
char name[16];
|
char name[16];
|
||||||
for (auto &it : light_instances_) {
|
for (auto &it : light_instances_) {
|
||||||
for (int i = 0; i < it.second.count; ++i) {
|
for (int i = 0; i < it.second.count; ++i) {
|
||||||
snprintf(name, 16, "L_%08x", i);
|
snprintf(name, 16, "L_%08x", i);
|
||||||
change_tracker.MarkRprimDirty(it.second.data->prim_id.AppendElementString(name), pxr::HdChangeTracker::DirtyVisibility);
|
change_tracker.MarkRprimDirty(it.second.data->prim_id.AppendElementString(name),
|
||||||
|
pxr::HdChangeTracker::DirtyVisibility);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
#include "BKE_duplilist.h"
|
#include "BKE_duplilist.h"
|
||||||
|
|
||||||
#include "mesh.h"
|
|
||||||
#include "light.h"
|
#include "light.h"
|
||||||
|
#include "mesh.h"
|
||||||
|
|
||||||
namespace blender::render::hydra {
|
namespace blender::render::hydra {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user