BLEN-345-Refactor export process #2

Merged
Bogdan Nagirniak merged 14 commits from BLEN-345 into hydra-render 2023-02-18 08:00:29 +01:00

Purpose

Move geometry export, working with HdRenderIndex to ObjectData classes, to be more flexible in future.

Technical steps

  1. Refactored ObjectData class: separated code to hierarchic classes IdData, ObjectData, MaterialData, MeshData, LightData.
  2. Moved working with HdRenderIndex (Insert/remove/mark_dirty) from BlenderSceneDelegate to *Data classes.
### Purpose Move geometry export, working with HdRenderIndex to ObjectData classes, to be more flexible in future. ### Technical steps 1. Refactored ObjectData class: separated code to hierarchic classes IdData, ObjectData, MaterialData, MeshData, LightData. 2. Moved working with HdRenderIndex (Insert/remove/mark_dirty) from BlenderSceneDelegate to \*Data classes.
Bogdan Nagirniak added 7 commits 2023-02-17 09:53:12 +01:00
Bogdan Nagirniak requested review from Georgiy Markelov 2023-02-17 09:55:27 +01:00
Bogdan Nagirniak added 1 commit 2023-02-17 11:50:45 +01:00
Bogdan Nagirniak added 1 commit 2023-02-17 14:22:07 +01:00
Bogdan Nagirniak added 2 commits 2023-02-17 15:07:54 +01:00
Georgiy Markelov approved these changes 2023-02-17 17:16:14 +01:00
Georgiy Markelov left a comment
Collaborator

see comments, also discussed offline.

see comments, also discussed offline.
@ -0,0 +17,4 @@
virtual ~IdData() = default;
std::string name();
virtual pxr::VtValue get_data(pxr::TfToken const &key);
Collaborator

seems like we can do this pure virtual, because we override this method in every subclass of ObjectData

seems like we can do this `pure virtual`, because we override this method in every subclass of `ObjectData`
Author
Owner

Let it be not virtual, due to IdData classes design

Let it be not virtual, due to IdData classes design
BogdanNagirniak marked this conversation as resolved
@ -0,0 +164,4 @@
}
HdDirtyBits bits = HdChangeTracker::Clean;
switch (dirty_bits) {
Collaborator

consider adding map<OurDirty, TheirDirty> so we can get needed value by key without switch case

consider adding `map<OurDirty, TheirDirty>` so we can get needed value by key without `switch case`
Author
Owner

switch case is preferable here

`switch case` is preferable here
BogdanNagirniak marked this conversation as resolved
Bogdan Nagirniak added 1 commit 2023-02-17 20:15:53 +01:00
Bogdan Nagirniak added 2 commits 2023-02-18 07:47:55 +01:00
Bogdan Nagirniak merged commit 5570d04563 into hydra-render 2023-02-18 08:00:29 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: BogdanNagirniak/blender#2
No description provided.