Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion src/IECoreHoudini/ROP_SceneCacheWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "PRM/PRM_Parm.h"
#include "PRM/PRM_SpareData.h"
#include "ROP/ROP_Error.h"
#include "SOP/SOP_Node.h"
#include "UT/UT_PtrArray.h"
#include "UT/UT_StringMMPattern.h"

Expand Down Expand Up @@ -271,6 +272,30 @@ ROP_RENDER_CODE ROP_SceneCacheWriter::renderFrame( fpreal time, UT_Interrupt *bo
}
}
}
else
{
UT_String msg;
std::string messages = "Re-rooting flat geo failed.";
node->getErrorMessages( msg );
if ( msg != UT_String::getEmptyString() )
{
messages += "\n\nErrors from " + nodePath.toStdString() + ":\n" + msg.toStdString();
}

if ( SOP_Node *sop = node->getRenderSopPtr() )
{
sop->getErrorMessages( msg );
if ( msg != UT_String::getEmptyString() )
{
sop->getFullPath( nodePath );
messages += "\n\nErrors from " + nodePath.toStdString() + ":\n" + msg.toStdString();
}
}

addError( 0, messages.c_str() );
progress->opEnd();
return ROP_ABORT_RENDER;
}

if ( reRoot )
{
Expand All @@ -279,7 +304,11 @@ ROP_RENDER_CODE ROP_SceneCacheWriter::renderFrame( fpreal time, UT_Interrupt *bo
}

ROP_RENDER_CODE status = doWrite( m_liveScene, outScene, writeTime, progress );
executePostFrameScript( time );
if ( status != ROP_ABORT_RENDER )
{
executePostFrameScript( time );
}

progress->opEnd();
return status;
}
Expand Down
17 changes: 16 additions & 1 deletion test/IECoreHoudini/SceneCacheTest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
# Copyright (c) 2013-2014, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -2106,6 +2106,21 @@ def testRopFlattenedAndHidden( self ) :
self.assertTrue( child.isInstanceOf( IECore.TypeId.MeshPrimitive ) )
self.assertEqual( root.childNames(), [] )

def testRopFlattenedWithErrors( self ) :

self.writeSCC()
geo = self.geometry()
geo.parm( "expand" ).pressButton()
rop = self.rop( geo )
rop.parm( "rootObject" ).set( geo.path() )
rop.parm( "trange" ).set( 1 )
rop.parmTuple( "f" ).set( ( 1, 10, 1 ) )
geo.renderNode().parm( "file" ).set( "fake.scc" )
rop.parm( "execute" ).pressButton()
self.assertNotEqual( rop.errors(), "" )
self.assertTrue( geo.renderNode().path() in rop.errors() )
self.assertTrue( geo.renderNode().errors() in rop.errors() )

def testRopLinked( self ) :

self.writeTaggedSCC()
Expand Down