diff --git a/src/appleseedmaya/exporters/meshexporter.cpp b/src/appleseedmaya/exporters/meshexporter.cpp index ed68004..c5d97a2 100644 --- a/src/appleseedmaya/exporters/meshexporter.cpp +++ b/src/appleseedmaya/exporters/meshexporter.cpp @@ -418,13 +418,6 @@ void MeshExporter::meshAttributesToParams(renderer::ParamArray& params) int mediumPriority = 0; if (AttributeUtils::get(node(), "asMediumPriority", mediumPriority)) params.insert("medium_priority", mediumPriority); - - MString sssSet; - if (AttributeUtils::get(node(), "asSubsurfaceSet", sssSet)) - { - if (sssSet.length() != 0) - params.insert_path("sss_set_id", sssSet.asChar()); - } } int MeshExporter::getSmoothLevel(MStatus* ReturnStatus) const diff --git a/src/appleseedmaya/exporters/shapeexporter.cpp b/src/appleseedmaya/exporters/shapeexporter.cpp index ab83c81..7067d0d 100644 --- a/src/appleseedmaya/exporters/shapeexporter.cpp +++ b/src/appleseedmaya/exporters/shapeexporter.cpp @@ -29,6 +29,9 @@ // Interface header. #include "shapeexporter.h" +// appleseed-maya headers. +#include "appleseedmaya/attributeutils.h" + // appleseed.renderer headers. #include "renderer/api/scene.h" @@ -139,6 +142,17 @@ void ShapeExporter::createObjectInstance(const MString& objectName) } const MString objectInstanceName = appleseedName() + MString("_instance"); + + // Get object instance params. + { + MString sssSet; + if (AttributeUtils::get(node(), "asSubsurfaceSet", sssSet)) + { + if (sssSet.length() != 0) + params.insert_path("sss_set_id", sssSet.asChar()); + } + } + m_objectInstance.reset( asr::ObjectInstanceFactory::create( objectInstanceName.asChar(),