[Bf-blender-cvs] [c4b84a76817] temp-sybren-usd-patch: USD: use BKE_object_visibility()
Sybren A. Stüvel
noreply at git.blender.org
Tue Nov 26 18:08:00 CET 2019
Commit: c4b84a768173196697430f4ed4f5d512390aa320
Author: Sybren A. Stüvel
Date: Tue Nov 26 17:03:45 2019 +0100
Branches: temp-sybren-usd-patch
https://developer.blender.org/rBc4b84a768173196697430f4ed4f5d512390aa320
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)
More information about the Bf-blender-cvs
mailing list