Blender Git Loki

Blender Git "temp-usd-prev-export2" branch commits.

December 28, 2021, 05:10 (GMT)
USD Preview Surface export format fixes.
December 28, 2021, 05:05 (GMT)
USD texture export refactor.

Updated the texture export functions to use BLI_path_join(),
additional minor cleanup.
December 28, 2021, 03:00 (GMT)
USD Preview Surface export refactor.

Added new get_tex_image_asset_path() which simplifies
texture path resolution logic, to replace similar functions
where the logic was fragmented. Now calling BLI_path_join(),
to replace string concatenation for paths. Added comments,
additional minor cleanup.
December 27, 2021, 19:49 (GMT)
USD export: skip texture copy for equal paths.

Skip texture copy when the source and destination paths
are equivalent.
December 27, 2021, 19:13 (GMT)
USD material export: reorder code.

Moved related get_node_tex_image_filepath() functions closer
togther, per suggestion by Sybren in his review.
December 27, 2021, 17:18 (GMT)
USD Preview Surface export report warnings.

Report warnings in UI instead of printing them to the
console.
December 27, 2021, 16:04 (GMT)
USD export: format fixes.
December 27, 2021, 12:57 (GMT)
USD Preview Surface export refactor.

Refactored the create_usd_preview_surface_material() implementation
to use a map to avoid multiple if/else statments. Further
simplified this function by moving some of its functionality
to a new create_uvmap_shader() function.
December 27, 2021, 05:42 (GMT)
USD Preview Surface export code cleanup.

Removed excessive null argument checks at the beginning
of utility functions. Added missing braces in if
statement. Misc. minor cleanup.
December 27, 2021, 04:31 (GMT)
USD Preview Surface export typo in comments.
December 27, 2021, 04:19 (GMT)
USD Preview Surface export cleanup.

Misc. fixes suggested by Sybren in his review,
including:

Renamed get_bsdf_node() to find_bsdf_node().

Remove excessively defensive validation and initialization.

Remove unneeded console output.

Early returns to avoid else statements.

Use LISTBASE_FOREACH macro.
December 27, 2021, 02:53 (GMT)
USD Preview Surface export cleanup.

Now calling standard BLI_path_slash_native()
in the path comparison function.
December 27, 2021, 02:06 (GMT)
USD Preview Surface export code reorganization.

Re-ordered the code to place high-level functions first in the
file and the lower-level/helper functions later (per suggestion
by Sybren in his review). Also removed declarartions of
helper functions from the header, as these can be static for now.
Some additional minor cleanup to formatting and comments.
December 27, 2021, 01:23 (GMT)
USD Preview Surface export code comments.

Moved comments from usd_writer_material.cc to header (per
suggestion by Sybren in his review).
December 27, 2021, 01:03 (GMT)
USD Preview Surface export code cleanup.

Removed declarations of unused UsdToken variables.
December 27, 2021, 00:41 (GMT)
USD Preview Surface export code cleanup.

Compacted the code by removing spaces between variable declarations
and their use (per suggestion by Sybren in his review).
December 27, 2021, 00:12 (GMT)
USD Export: shared code to get active uv name.

Added CustomData_get_active_layer_name() function to
BKE_customdata.h to return the name of the active
layer of a given type, as this functionality can
be used in both the USD export and Collada IO
utility functions when retrieving the name of a
mesh's active UV layer. Refactored the USD Preview
Surface code to use this function.
December 26, 2021, 20:20 (GMT)
USD Preview Surface export code cleanup.

Following convention to make context the first
parameter.
December 26, 2021, 19:20 (GMT)
USD Preview Surface export UI improvements.

Updates based on suggestions by Hans Goudey in his
review.

Made variables const.

Now calling uiLayoutSetActive() instead of uiLayoutSetEnabled().

Shortened the 'USD Preview Surface From Nodes' property name
and improved property descriptions.
December 21, 2021, 16:51 (GMT)
USD Preview Surface material export.

Added "USD Preview Surface From Nodes" export option,
to convert a Principled BSDF material node tree to an
approximate USD Preview Surface shader representation.

Also added the following options for texture export.

Export Textures: If converting Preview Surface, export
textures referenced by shader nodes to a 'textures'
directory next to the USD file.

Overwrite Textures: Allow overwriting existing texture
files when exporting textures (this option is off by
default).

Relative Texture Paths: Save material texture asset
paths as relative paths in the USD.

USD export format fixes.

USD export: fixed typo in comparison.

Differential Revision: https://developer.blender.org/D13647
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021