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:
Diffstat (limited to 'source/blender/io')
-rw-r--r--source/blender/io/alembic/intern/abc_writer_points.cc2
-rw-r--r--source/blender/io/usd/intern/usd_writer_mesh.cc9
2 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/io/alembic/intern/abc_writer_points.cc b/source/blender/io/alembic/intern/abc_writer_points.cc
index d45af2eed4c..ac663b62693 100644
--- a/source/blender/io/alembic/intern/abc_writer_points.cc
+++ b/source/blender/io/alembic/intern/abc_writer_points.cc
@@ -104,7 +104,7 @@ void AbcPointsWriter::do_write()
}
if (m_psys->lattice_deform_data) {
- end_latt_deform(m_psys->lattice_deform_data);
+ BKE_lattice_deform_data_destroy(m_psys->lattice_deform_data);
m_psys->lattice_deform_data = NULL;
}
diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc
index 841501bcf42..61337beff20 100644
--- a/source/blender/io/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/io/usd/intern/usd_writer_mesh.cc
@@ -335,6 +335,7 @@ void USDGenericMeshWriter::assign_materials(const HierarchyContext &context,
* which is why we always bind the first material to the entire mesh. See
* https://github.com/PixarAnimationStudios/USD/issues/542 for more info. */
bool mesh_material_bound = false;
+ pxr::UsdShadeMaterialBindingAPI material_binding_api(usd_mesh.GetPrim());
for (short mat_num = 0; mat_num < context.object->totcol; mat_num++) {
Material *material = BKE_object_material_get(context.object, mat_num + 1);
if (material == nullptr) {
@@ -342,7 +343,7 @@ void USDGenericMeshWriter::assign_materials(const HierarchyContext &context,
}
pxr::UsdShadeMaterial usd_material = ensure_usd_material(material);
- usd_material.Bind(usd_mesh.GetPrim());
+ material_binding_api.Bind(usd_material);
/* USD seems to support neither per-material nor per-face-group double-sidedness, so we just
* use the flag from the first non-empty material slot. */
@@ -378,9 +379,9 @@ void USDGenericMeshWriter::assign_materials(const HierarchyContext &context,
pxr::UsdShadeMaterial usd_material = ensure_usd_material(material);
pxr::TfToken material_name = usd_material.GetPath().GetNameToken();
- pxr::UsdShadeMaterialBindingAPI api = pxr::UsdShadeMaterialBindingAPI(usd_mesh);
- pxr::UsdGeomSubset usd_face_subset = api.CreateMaterialBindSubset(material_name, face_indices);
- usd_material.Bind(usd_face_subset.GetPrim());
+ pxr::UsdGeomSubset usd_face_subset = material_binding_api.CreateMaterialBindSubset(
+ material_name, face_indices);
+ pxr::UsdShadeMaterialBindingAPI(usd_face_subset.GetPrim()).Bind(usd_material);
}
}