Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAras Pranckevicius <aras@nesnausk.org>2022-06-14 10:19:02 +0300
committerAras Pranckevicius <aras@nesnausk.org>2022-06-14 10:19:02 +0300
commit1b4f35f6a5889d8d2e65c6231e84f8b1744c4f96 (patch)
treecfae52865680308729ad955ad623c3151188097a /source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
parent827fa8176737f822b7f8d2354b05e59976c7101a (diff)
obj: vertex colors support in importer and exporter
Adds support for vertex colors to OBJ I/O. Importer: - Supports both "xyzrgb" and "MRGB" vertex color formats. - Whenever vertex color is present in the file for a model, it is imported and a Color attribute is created (per-vertex, full float color data type). Color coming from the file is assumed to be sRGB, and is converted to linear upon import. Exporter: - Option to export the vertex colors. Defaults to "off", since not all 3rd party software supports vertex colors. - When the option is "on", if a mesh has a color attribute layer, the active one is exported in "xyzrgb" form. If the mesh has per-face-corner colors, they are averaged on the vertices. Colors are converted from linear to sRGB upon export. Reviewed By: Howard Trickey Differential Revision: https://developer.blender.org/D15159
Diffstat (limited to 'source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh')
-rw-r--r--source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
index 91213ec8152..ee2e6227700 100644
--- a/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
+++ b/source/blender/io/wavefront_obj/exporter/obj_export_mesh.hh
@@ -241,6 +241,11 @@ class OBJMesh : NonCopyable {
return i < 0 || i >= poly_order_.size() ? i : poly_order_[i];
}
+ Mesh *get_mesh() const
+ {
+ return export_mesh_eval_;
+ }
+
private:
/**
* Free the mesh if _the exporter_ created it.