Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Fixed:
UVs
Evaluation after reopening
  • Loading branch information
sjirka authored Mar 10, 2017
1 parent fd6a2ad commit a6d90cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
7 changes: 4 additions & 3 deletions SeamsEasyNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ MStatus SeamsEasyNode::compute(const MPlug &plug, MDataBlock &dataBlock) {
return MS::kUnknownParameter;

// Load attribs ///////////////////////////////////////////////////////////////////////////////
if (dirtyMesh) {
if (dirtyMesh || m_sourceMesh.isNull()) {
MObject sourceMesh = dataBlock.inputValue(aInMesh).asMesh();
if (m_sourceMesh.isNull() || !SMesh::isEquivalent(sourceMesh, m_sourceMesh))
dirtyBaseMesh = true;
m_sourceMesh = sourceMesh;
}
if (dirtyComponent) {
if (dirtyComponent || m_component.isNull()) {
dirtyBaseMesh = true;
dirtyComponent = false;
MObject oSeamsEasyData = dataBlock.inputValue(aSelectedEdges).data();
Expand Down Expand Up @@ -448,7 +448,8 @@ MStatus SeamsEasyNode::compute(const MPlug &plug, MDataBlock &dataBlock) {
CHECK_MSTATUS_AND_RETURN_IT(status);
}

dataBlock.outputValue(aOutMesh).set(extrudeMesh.getObject());
status = dataBlock.outputValue(aOutMesh).set(extrudeMesh.getObject());
CHECK_MSTATUS_AND_RETURN_IT(status);
dataBlock.setClean(aOutMesh);

return MS::kSuccess;
Expand Down
9 changes: 3 additions & 6 deletions StitchEasyNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,25 +247,22 @@ MStatus StitchEasyNode::compute(const MPlug &plug, MDataBlock &datablock) {
if (plug != aOutMesh)
return MS::kUnknownParameter;

if (m_dirtySourceMesh) {
if (m_dirtySourceMesh || m_sourceMesh.isNull()) {
MObject sourceMesh = datablock.inputValue(aInMesh).asMesh();
if (m_sourceMesh.isNull() || !SMesh::isEquivalent(sourceMesh, m_sourceMesh))
m_dirtyBaseMesh = true;
m_sourceMesh = sourceMesh;
}
if (m_dirtyComponent) {
if (m_dirtyComponent || m_component.isNull()) {
m_dirtyBaseMesh = true;
m_dirtyComponent = false;
MObject stichLineData = datablock.inputValue(aStitchLines).data();
MFnComponentListData compListData(stichLineData, &status);
CHECK_MSTATUS_AND_RETURN_IT(status);
if(!compListData[0].isNull())
m_component = compListData[0];
m_component = compListData[0];
}
if (m_component.apiType() != MFn::kMeshEdgeComponent || m_sourceMesh.isNull())
return MS::kInvalidParameter;

cout << m_component.isNull() << endl;

if (m_dirtySourceMesh || m_dirtyBaseMesh) {
m_dirtySourceMesh = false;
Expand Down

0 comments on commit a6d90cd

Please sign in to comment.