Permalink
Browse files

Add photon target object attribute

  • Loading branch information...
Mango-3 authored and est77 committed Jan 6, 2019
1 parent 40a7647 commit 04a13b000439c37440af65641395086e341047e6
@@ -106,6 +106,7 @@ def buildBody(self, nodeName):
self.callCustom(
self.meshAlphaMapNew, self.meshAlphaMapUpdate, 'asAlphaMap')
self.addControl('asMediumPriority', label='Medium Priority')
self.addControl('asIsPhotonTarget', label='Photon Target')
self.addControl('asSubsurfaceSet', label='SSS Set')

self.beginLayout('Export', collapse=1)
@@ -432,6 +432,10 @@ void MeshExporter::meshAttributesToParams(renderer::ParamArray& params)
int mediumPriority = 0;
if (AttributeUtils::get(node(), "asMediumPriority", mediumPriority))
params.insert("medium_priority", mediumPriority);

bool isPhotonTarget = false;
if (AttributeUtils::get(node(), "asIsPhotonTarget", isPhotonTarget))
params.insert("photon_target", isPhotonTarget);
}

int MeshExporter::getSmoothLevel(MStatus* ReturnStatus) const
@@ -160,6 +160,16 @@ namespace
AttributeUtils::makeInput(numAttrFn);
modifier.addExtensionAttribute(nodeClass, attr);

attr = createNumericAttribute<bool>(
numAttrFn,
"asIsPhotonTarget",
"asIsPhotonTarget",
MFnNumericData::kBoolean,
false,
status);
AttributeUtils::makeInput(numAttrFn);
modifier.addExtensionAttribute(nodeClass, attr);

MFnTypedAttribute typedAttrFn;
attr = typedAttrFn.create("asSubsurfaceSet", "asSubsurfaceSet", MFnData::kString);
AttributeUtils::makeInput(typedAttrFn);

0 comments on commit 04a13b0

Please sign in to comment.