[Bf-blender-cvs] [23f51eb4bbd] temp-sybren-usd-patch-02: USD: private indicators
Sybren A. Stüvel
noreply at git.blender.org
Wed Dec 11 16:37:16 CET 2019
Commit: 23f51eb4bbd893ec5a57b199a099ea6278ee1981
Author: Sybren A. Stüvel
Date: Wed Dec 11 16:16:15 2019 +0100
Branches: temp-sybren-usd-patch-02
https://developer.blender.org/rB23f51eb4bbd893ec5a57b199a099ea6278ee1981
USD: private indicators
No functional changes.
===================================================================
M source/blender/usd/intern/usd_hierarchy_iterator.cc
M source/blender/usd/intern/usd_hierarchy_iterator.h
M source/blender/usd/intern/usd_writer_abstract.cc
M source/blender/usd/intern/usd_writer_abstract.h
M source/blender/usd/intern/usd_writer_mesh.cc
===================================================================
diff --git a/source/blender/usd/intern/usd_hierarchy_iterator.cc b/source/blender/usd/intern/usd_hierarchy_iterator.cc
index c93a678d9be..f53cba8b2c6 100644
--- a/source/blender/usd/intern/usd_hierarchy_iterator.cc
+++ b/source/blender/usd/intern/usd_hierarchy_iterator.cc
@@ -47,16 +47,16 @@ namespace USD {
USDHierarchyIterator::USDHierarchyIterator(Depsgraph *depsgraph,
pxr::UsdStageRefPtr stage,
const USDExportParams ¶ms)
- : AbstractHierarchyIterator(depsgraph), stage(stage), params(params)
+ : AbstractHierarchyIterator(depsgraph), stage_(stage), params_(params)
{
}
bool USDHierarchyIterator::mark_as_weak_export(const Object *object) const
{
- if (params.selected_objects_only && (object->base_flag & BASE_SELECTED) == 0) {
+ if (params_.selected_objects_only && (object->base_flag & BASE_SELECTED) == 0) {
return true;
}
- if (params.visible_objects_only && (object->base_flag & BASE_VISIBLE_VIEWLAYER) == 0) {
+ if (params_.visible_objects_only && (object->base_flag & BASE_VISIBLE_VIEWLAYER) == 0) {
return true;
}
return false;
@@ -75,17 +75,17 @@ std::string USDHierarchyIterator::make_valid_name(const std::string &name) const
void USDHierarchyIterator::set_export_frame(float frame_nr)
{
// The USD stage is already set up to have FPS timecodes per frame.
- export_time = pxr::UsdTimeCode(frame_nr);
+ export_time_ = pxr::UsdTimeCode(frame_nr);
}
const pxr::UsdTimeCode &USDHierarchyIterator::get_export_time_code() const
{
- return export_time;
+ return export_time_;
}
USDExporterContext USDHierarchyIterator::create_usd_export_context(const HierarchyContext *context)
{
- return USDExporterContext{depsgraph_, stage, pxr::SdfPath(context->export_path), this, params};
+ return USDExporterContext{depsgraph_, stage_, pxr::SdfPath(context->export_path), this, params_};
}
AbstractHierarchyWriter *USDHierarchyIterator::create_transform_writer(
@@ -136,7 +136,7 @@ AbstractHierarchyWriter *USDHierarchyIterator::create_data_writer(const Hierarch
AbstractHierarchyWriter *USDHierarchyIterator::create_hair_writer(const HierarchyContext *context)
{
- if (!params.export_hair) {
+ if (!params_.export_hair) {
return nullptr;
}
return new USDHairWriter(create_usd_export_context(context));
diff --git a/source/blender/usd/intern/usd_hierarchy_iterator.h b/source/blender/usd/intern/usd_hierarchy_iterator.h
index cbff9f38ee7..a937df8f15b 100644
--- a/source/blender/usd/intern/usd_hierarchy_iterator.h
+++ b/source/blender/usd/intern/usd_hierarchy_iterator.h
@@ -36,9 +36,9 @@ namespace USD {
class USDHierarchyIterator : public AbstractHierarchyIterator {
private:
- const pxr::UsdStageRefPtr stage;
- pxr::UsdTimeCode export_time;
- const USDExportParams ¶ms;
+ const pxr::UsdStageRefPtr stage_;
+ pxr::UsdTimeCode export_time_;
+ const USDExportParams ¶ms_;
public:
USDHierarchyIterator(Depsgraph *depsgraph,
diff --git a/source/blender/usd/intern/usd_writer_abstract.cc b/source/blender/usd/intern/usd_writer_abstract.cc
index 07b42ef3d6b..4d0b4364fb5 100644
--- a/source/blender/usd/intern/usd_writer_abstract.cc
+++ b/source/blender/usd/intern/usd_writer_abstract.cc
@@ -43,7 +43,7 @@ namespace USD {
USDAbstractWriter::USDAbstractWriter(const USDExporterContext &usd_export_context)
: usd_export_context_(usd_export_context),
- usd_value_writer(),
+ usd_value_writer_(),
frame_has_been_written_(false),
is_animated_(false)
{
diff --git a/source/blender/usd/intern/usd_writer_abstract.h b/source/blender/usd/intern/usd_writer_abstract.h
index 136b9e70e86..cea4685c806 100644
--- a/source/blender/usd/intern/usd_writer_abstract.h
+++ b/source/blender/usd/intern/usd_writer_abstract.h
@@ -43,7 +43,7 @@ namespace USD {
class USDAbstractWriter : public AbstractHierarchyWriter {
protected:
const USDExporterContext usd_export_context_;
- pxr::UsdUtilsSparseValueWriter usd_value_writer;
+ pxr::UsdUtilsSparseValueWriter usd_value_writer_;
bool frame_has_been_written_;
bool is_animated_;
diff --git a/source/blender/usd/intern/usd_writer_mesh.cc b/source/blender/usd/intern/usd_writer_mesh.cc
index 4f9fa1cbd5f..ca0171fd60e 100644
--- a/source/blender/usd/intern/usd_writer_mesh.cc
+++ b/source/blender/usd/intern/usd_writer_mesh.cc
@@ -198,10 +198,10 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
pxr::UsdAttribute attr_face_vertex_counts = usd_mesh.CreateFaceVertexCountsAttr();
pxr::UsdAttribute attr_face_vertex_indices = usd_mesh.CreateFaceVertexIndicesAttr();
- usd_value_writer.SetAttribute(attr_points, pxr::VtValue(usd_mesh_data.points), timecode);
- usd_value_writer.SetAttribute(
+ usd_value_writer_.SetAttribute(attr_points, pxr::VtValue(usd_mesh_data.points), timecode);
+ usd_value_writer_.SetAttribute(
attr_face_vertex_counts, pxr::VtValue(usd_mesh_data.face_vertex_counts), timecode);
- usd_value_writer.SetAttribute(
+ usd_value_writer_.SetAttribute(
attr_face_vertex_indices, pxr::VtValue(usd_mesh_data.face_indices), timecode);
if (!usd_mesh_data.crease_lengths.empty()) {
@@ -209,11 +209,11 @@ void USDGenericMeshWriter::write_mesh(HierarchyContext &context, Mesh *mesh)
pxr::UsdAttribute attr_crease_indices = usd_mesh.CreateCreaseIndicesAttr();
pxr::UsdAttribute attr_crease_sharpness = usd_mesh.CreateCreaseSharpnessesAttr();
- usd_value_writer.SetAttribute(
+ usd_value_writer_.SetAttribute(
attr_crease_lengths, pxr::VtValue(usd_mesh_data.crease_lengths), timecode);
- usd_value_writer.SetAttribute(
+ usd_value_writer_.SetAttribute(
attr_crease_indices, pxr::VtValue(usd_mesh_data.crease_vertex_indices), timecode);
- usd_value_writer.SetAttribute(
+ usd_value_writer_.SetAttribute(
attr_crease_sharpness, pxr::VtValue(usd_mesh_data.crease_sharpnesses), timecode);
}
More information about the Bf-blender-cvs
mailing list