BLEN-367: Fix code style #14

Merged
Bogdan Nagirniak merged 11 commits from BLEN-367 into hydra-render 2023-03-15 09:42:17 +01:00
4 changed files with 12 additions and 12 deletions
Showing only changes of commit 533d9006aa - Show all commits

View File

@ -44,7 +44,7 @@ void BlenderSceneDelegate::update_material(Material *material)
MaterialData *mat_data = material_data(MaterialData::prim_id(this, material)); MaterialData *mat_data = material_data(MaterialData::prim_id(this, material));
if (mat_data) { if (mat_data) {
mat_data->export_mtlx(); mat_data->export_mtlx();
mat_data->mark_prim_dirty(IdData::DirtyBits::AllDirty); mat_data->mark_prim_dirty(IdData::DirtyBits::ALL_DIRTY);
} }
} }
@ -61,7 +61,7 @@ void BlenderSceneDelegate::update_world()
else { else {
if (world) { if (world) {
world_data = WorldData::init(this, world, context); world_data = WorldData::init(this, world, context);
world_data->mark_prim_dirty(IdData::DirtyBits::AllDirty); world_data->mark_prim_dirty(IdData::DirtyBits::ALL_DIRTY);
} }
else { else {
world_data->remove_prim(); world_data->remove_prim();
@ -149,7 +149,7 @@ void BlenderSceneDelegate::update_collection(bool remove, bool visibility)
/* Check and update visibility */ /* Check and update visibility */
for (auto &obj : objects) { for (auto &obj : objects) {
if (obj.second->update_visibility(view3d)) { if (obj.second->update_visibility(view3d)) {
obj.second->mark_prim_dirty(IdData::DirtyBits::DirtyVisibility); obj.second->mark_prim_dirty(IdData::DirtyBits::DIRTY_VISIBILITY);
}; };
} }
} }
@ -250,16 +250,16 @@ void BlenderSceneDelegate::add_update_object(Object *object,
if (m_data) { if (m_data) {
set_material(*m_data); set_material(*m_data);
} }
obj_data->mark_prim_dirty(IdData::DirtyBits::AllDirty); obj_data->mark_prim_dirty(IdData::DirtyBits::ALL_DIRTY);
return; return;
} }
if (transform) { if (transform) {
obj_data->mark_prim_dirty(IdData::DirtyBits::DirtyTransform); obj_data->mark_prim_dirty(IdData::DirtyBits::DIRTY_TRANSFORM);
} }
if (shading) { if (shading) {
obj_data->mark_prim_dirty(IdData::DirtyBits::DirtyMaterial); obj_data->mark_prim_dirty(IdData::DirtyBits::DIRTY_MATERIAL);
} }
} }

View File

@ -109,7 +109,7 @@ void MaterialData::mark_prim_dirty(DirtyBits dirty_bits)
{ {
pxr::HdDirtyBits bits = pxr::HdMaterial::Clean; pxr::HdDirtyBits bits = pxr::HdMaterial::Clean;
switch (dirty_bits) { switch (dirty_bits) {
case DirtyBits::AllDirty: case DirtyBits::ALL_DIRTY:
bits = pxr::HdMaterial::AllDirty; bits = pxr::HdMaterial::AllDirty;
break; break;
default: default:

View File

@ -241,16 +241,16 @@ void MeshData::mark_prim_dirty(DirtyBits dirty_bits)
pxr::HdDirtyBits bits = pxr::HdChangeTracker::Clean; pxr::HdDirtyBits bits = pxr::HdChangeTracker::Clean;
switch (dirty_bits) { switch (dirty_bits) {
case DirtyBits::DirtyTransform: case DirtyBits::DIRTY_TRANSFORM:
bits = pxr::HdChangeTracker::DirtyTransform; bits = pxr::HdChangeTracker::DirtyTransform;
break; break;
case DirtyBits::DirtyVisibility: case DirtyBits::DIRTY_VISIBILITY:
bits = pxr::HdChangeTracker::DirtyVisibility; bits = pxr::HdChangeTracker::DirtyVisibility;
break; break;
case DirtyBits::DirtyMaterial: case DirtyBits::DIRTY_MATERIAL:
bits = pxr::HdChangeTracker::DirtyMaterialId; bits = pxr::HdChangeTracker::DirtyMaterialId;
break; break;
case DirtyBits::AllDirty: case DirtyBits::ALL_DIRTY:
bits = pxr::HdChangeTracker::AllDirty; bits = pxr::HdChangeTracker::AllDirty;
break; break;
default: default:

View File

@ -144,7 +144,7 @@ void WorldData::mark_prim_dirty(DirtyBits dirty_bits)
{ {
pxr::HdDirtyBits bits = pxr::HdLight::Clean; pxr::HdDirtyBits bits = pxr::HdLight::Clean;
switch (dirty_bits) { switch (dirty_bits) {
case DirtyBits::AllDirty: case DirtyBits::ALL_DIRTY:
bits = pxr::HdLight::AllDirty; bits = pxr::HdLight::AllDirty;
break; break;
default: default: