Commit: 08eee16d7fe6b090a1725a5ac7f2246d2fe9fa9f
Author: Sybren A. Stüvel
Date: Tue Nov 26 17:03:45 2019 +0100
Branches: temp-sybren-usd-patch-02
https://developer.blender.org/rB08eee16d7fe6b090a1725a5ac7f2246d2fe9fa9f
USD: use BKE_object_visibility()
===================================================================
M source/blender/usd/intern/usd_writer_mesh.cc
===================================================================
diff --git a/source/blender/usd/intern/usd_writer_mesh.cc
b/source/blender/usd/intern/usd_writer_mesh.cc
index d497f2b504c..410ffe7b3f7 100644
--- a/source/blender/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/usd/intern/usd_writer_mesh.cc
@@ -33,6 +33,7 @@ extern "C" {
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
+#include "BKE_object.h"
#include "DEG_depsgraph.h"
@@ -49,15 +50,9 @@ USDGenericMeshWriter::USDGenericMeshWriter(const
USDExporterContext &ctx) : USDA
bool USDGenericMeshWriter::is_supported(const Object *object) const
{
- // Reject meshes that have a particle system that should have its emitter
hidden.
- if (object->particlesystem.first != NULL) {
- char check_flag = usd_export_context_.export_params.evaluation_mode ==
DAG_EVAL_RENDER ?
- OB_DUPLI_FLAG_RENDER :
- OB_DUPLI_FLAG_VIEWPORT;
- return object->duplicator_visibility_flag & check_flag;
- }
-
- return true;
+ int visibility = BKE_object_visibility(object,
+
usd_export_context_.export_params.evaluation_mode);
+ return (visibility & OB_VISIBLE_SELF) != 0;
}
void USDGenericMeshWriter::do_write(HierarchyContext &context)
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs