Fix review comments #27

Merged
Bogdan Nagirniak merged 14 commits from BLEN-392 into hydra-render 2023-04-21 15:02:44 +02:00
3 changed files with 9 additions and 6 deletions
Showing only changes of commit 15efdf229c - Show all commits

View File

@ -150,7 +150,7 @@ pxr::GfMatrix4d BlenderSceneDelegate::GetInstancerTransform(pxr::SdfPath const &
return i_data->transform();
}
void BlenderSceneDelegate::populate(Depsgraph * deps, bContext * cont)
void BlenderSceneDelegate::populate(Depsgraph *deps, bContext *cont)
{
bool is_populated = depsgraph_ != nullptr;

View File

@ -41,6 +41,7 @@ template<class T> const T IdData::get_data(pxr::TfToken const &key) const
}
#define ID_LOG(level, msg, ...) \
CLOG_INFO(LOG_RENDER_HYDRA_SCENE, level, "%s (%s): " msg, p_id_.GetText(), id_->name, __VA_ARGS__);
CLOG_INFO( \
LOG_RENDER_HYDRA_SCENE, level, "%s (%s): " msg, p_id_.GetText(), id_->name, __VA_ARGS__);
} // namespace blender::render::hydra

View File

@ -128,7 +128,8 @@ bool InstancerData::update_visibility(View3D *view3d)
return ret;
}
pxr::HdPrimvarDescriptorVector InstancerData::primvar_descriptors(pxr::HdInterpolation interpolation)
pxr::HdPrimvarDescriptorVector InstancerData::primvar_descriptors(
pxr::HdInterpolation interpolation)
{
pxr::HdPrimvarDescriptorVector primvars;
if (interpolation == pxr::HdInterpolationInstance) {
@ -192,8 +193,8 @@ void InstancerData::check_remove(std::set<std::string> &available_objects)
}
if (ret) {
set_instances();
scene_delegate_->GetRenderIndex().GetChangeTracker().MarkInstancerDirty(p_id_,
pxr::HdChangeTracker::AllDirty);
scene_delegate_->GetRenderIndex().GetChangeTracker().MarkInstancerDirty(
p_id_, pxr::HdChangeTracker::AllDirty);
}
}
@ -217,7 +218,8 @@ void InstancerData::set_instances()
Instance *inst;
pxr::SdfPath path;
ListBase *lb = object_duplilist(scene_delegate_->depsgraph_, scene_delegate_->scene_, (Object *)id_);
ListBase *lb = object_duplilist(
scene_delegate_->depsgraph_, scene_delegate_->scene_, (Object *)id_);
LISTBASE_FOREACH (DupliObject *, dupli, lb) {
path = ObjectData::prim_id(scene_delegate_, dupli->ob);
path = p_id_.AppendElementString(path.GetName());