HoudiniEngineForUnreal-v2 icon indicating copy to clipboard operation
HoudiniEngineForUnreal-v2 copied to clipboard

Spline references break on Rebuild

Open Robmaister opened this issue 5 years ago • 2 comments

Could be related to one of our local changes, but this appears for us with both Alpha 2 and Alpha 3. I got this workaround checked in yesterday but waited until today to see if it was fixed in Alpha 3.

We should be able to provide an HDA if necessary, but to repro:

  • Set an input of type "World Outliner" to an actor with a SplineComponent on it
  • Press the Rebuild button the actor
  • Observe the following error in the Output Log: LogHoudiniEngine: Error: Hapi failed: HAPI Error: The node is invalid. Either the otl/hda asset library file was deleted or another otl/hda asset library file was loaded that contained an operator type with the same name as this asset's operator type. You must unload this node's asset and re-instantiate it.
  • Move a spline point
  • The actor should enter an infinite loop of cooking

Deleting the reference to the actor with a spline on it and re-selecting should stop the cook loop.

I narrowed the logged error down to FHoudiniSplineTranslator::HapiCreateCurveInputNodeForData. It appears that CurveNodeId never gets reset to -1, so the old ID is used despite being invalid. FHoudiniApi::GetParmIdFromName fails and causes the function to return false. Because this function fails, the HoudiniInputObject would never have Update() called on it. Because it never updated, the cached spline length does not match the current spline length, which triggers another cook.

Not sure if there's a better place to reset the ID to -1, but changing the CurveNodeId < 0 check to !FHoudiniEngineUtils::IsHoudiniNodeValid(CurveNodeId) towards the top of HapiCreateCurveInputNodeForData works for us.

Robmaister avatar Jul 17 '20 20:07 Robmaister

Hi Rob, This should normally be fixed in the Alpha3.1 update. Let us know if it's not!

dpernuit avatar Aug 07 '20 23:08 dpernuit

Hey, I was pulled from the project that's using Houdini for a few weeks, I'll let the team know that there's new alpha versions available and probably merge in the latest one when I'm back on the project in early September. Thanks!

Robmaister avatar Aug 12 '20 23:08 Robmaister