MaterialX: fix review comments #19

Merged
Bogdan Nagirniak merged 10 commits from matx-fix-review-comments into matx-export-material 2023-09-14 02:01:04 +02:00

Purpose

Fix review comments

Technical steps

  • Added comments
  • fixed includes
  • added ifdefs
### Purpose Fix review comments ### Technical steps * Added comments * fixed includes * added ifdefs
Georgiy Markelov added 5 commits 2023-09-12 14:20:31 +02:00
Georgiy Markelov requested review from Brian Savery (AMD) 2023-09-12 14:20:36 +02:00
Georgiy Markelov requested review from Bogdan Nagirniak 2023-09-12 14:20:37 +02:00
Georgiy Markelov requested review from Vasyl Pidhirskyi 2023-09-12 14:20:37 +02:00
Georgiy Markelov added 2 commits 2023-09-13 15:30:24 +02:00
Georgiy Markelov added 1 commit 2023-09-13 15:31:27 +02:00
Bogdan Nagirniak requested changes 2023-09-13 15:44:37 +02:00
@ -88,2 +93,4 @@
usd_material = usd::create_usd_material(export_context, material_path, (Material *)id, "st");
#ifdef WITH_MATERIALX
}
#endif
Collaborator

simplify to:

....
  else
#endif
{
usd_material = usd::create_usd_material(export_context, material_path, (Material *)id, "st");
}
simplify to: ``` .... else #endif { usd_material = usd::create_usd_material(export_context, material_path, (Material *)id, "st"); } ```
BogdanNagirniak marked this conversation as resolved
@ -26,0 +27,4 @@
#else
# define NODE_SHADER_MATERIALX_BEGIN \
void node_shader_materialx(void *data, struct bNode *node, struct bNodeSocket *out)
# define NODE_SHADER_MATERIALX_END
Collaborator

Seems could be simpliifed to:

#  define NODE_SHADER_MATERIALX_BEGIN \
    void *node_shader_materialx = nullptr;
#  define NODE_SHADER_MATERIALX_END

Export code would be:

NODE_SHADER_MATERIALX_BEGIN
#ifdef WITH_MATERIALX
{
....
}
#endif
NODE_SHADER_MATERIALX_END
Seems could be simpliifed to: ``` # define NODE_SHADER_MATERIALX_BEGIN \ void *node_shader_materialx = nullptr; # define NODE_SHADER_MATERIALX_END ``` Export code would be: ``` NODE_SHADER_MATERIALX_BEGIN #ifdef WITH_MATERIALX { .... } #endif NODE_SHADER_MATERIALX_END ```
BogdanNagirniak marked this conversation as resolved
Georgiy Markelov added 1 commit 2023-09-13 16:09:23 +02:00
Georgiy Markelov added 1 commit 2023-09-13 18:45:53 +02:00
Bogdan Nagirniak approved these changes 2023-09-14 02:00:14 +02:00
Bogdan Nagirniak left a comment
Collaborator

Tested - works good

Tested - works good
Bogdan Nagirniak merged commit 9b836a944b into matx-export-material 2023-09-14 02:01:04 +02:00
Sign in to join this conversation.
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: DagerD/blender#19
No description provided.