Duplicating a matinee Actor creates multiple instances of it's Matinee Controller in Level blueprint

We are using 4.5

When i duplicate a matinee actor in my level, and then try to add a new Matinee controller for the newly duplicated matinee into the level blueprint I get an error message that there are now multiple copies of the original matinee scenes controller in the level.

this creates a huge amount of cross linkages behind the scenes, I found if i duplicate the same scene 6 or 7 times, there are hundreds of cross references between all the actors referenced by the matinee scenes.

Hey AJ -

I am not seeing an error in any version of the engine from 4.5.0 onward. Let me give you my reproduction steps and see if they break for you and where:

  1. Open a blank project.
  2. Create a New Matinee
  3. Add a New Empty Group
  4. In the New Empty Group, Create a New Event Track
  5. Add 2 Events named Event and Event2
  6. Close Matinee
  7. Open the Level Blueprint
  8. With the Matinee Actor selected in the Level, Right Click in Level BP and add Matinee Controller from Matinee Referenced
  9. In the Level Viewport, Hold ALT and Drag the Matinee Actor to create a duplicate actor
  10. In the level Blueprint and the new Matinee Actor selected, Right Click and add Matinee Controller from Matinee Referenced

RESULTS: Two Controls in Level BP each identical except referencing the separate matinee actors

Let me know your exact steps if different and the outcome

Thank You

Eric Ketchum

Hi Eric,

I just got back from holidays, here is the repro steps for the bug. Which I can confirm still happens in 4.6

  1. open a new level.
  2. Create a matinee actor
  3. Add a matinee controller to the level blueprint for the matinee actor
  4. Duplicate the Matinee actor in the level
  5. Add a Matinee controller for the second matinee actor in the level blueprint

6. Compile the Level Blueprint (this step was missing from your steps above)

A blueprint compile error occurs saying that there are more than one function with the same name. (see attached screenshot)

We had a bit of a look into the code for this: When you duplicate a matinee actor, under the hood it’s duplicating the matinee controller in the blueprint as well but not adding the blueprint node. If you then manually add the matinee controller node in the blueprint it lets you add a second controller when it’s not supposed to.

The next part of the problem this causes is:

  1. Compiling the blueprint for a second time appears to resolves the error (in the blueprint log anyway)
  2. If you now add a skeletal mesh with a Visibility track to the duplicated matinee, and create some keys in the visibility track, nodes for each key are added to the output of the matinee controller.
  3. This causes the matinee scene to slow down, and eventually

lock up the more visibility events (keys) that get added.

Hey UppercutAJ -

I was able to reproduce this issue and have reported it to our engineers for further investigation, for reference UE-7115 and UE-7116.

Thank you for your help in tracking down this issue and I will let you know when a resolution has been reached.

Eric Ketchum

Hi Eric,

This issue has completely stalled our cutscene work, which is a large part of finishing our project, so I’ve had to go and put some hack fixes in myself. Here’s some extra info for your engineers:

Problem 1: Adding keys to tracks that aren’t event tracks (like adding show/hide keys to a visibility track) is causing events to be added to the matinee controller. My hack fix is this:

#if 1 // UG_CHANGE: ryan: Never call OnEventKeyframeAdded if the track being added to is not an event track
			if( !bCommonName && Track->IsA(UInterpTrackEvent::StaticClass()))
#else
			if( !bCommonName )
#endif

in FMatinee::FinishAddKey.

Problem 2: Duplicate matinee controllers are being created. Every time an event is added to a matinee controller the blueprint is recompiled (it’s a partial recompile I think, but I don’t really understand the blueprint compiler at all). This compilation causes the entire blueprint graph to be completely duplicated which includes duplicating the matinee controller.

My understanding is there is only supposed to be one matinee controller per matinee actor. There are many and because the matinee controller’s constructor adds the controller to a bunch of delegates, even though the controllers aren’t in the blueprint graph they are still having those delegates called on them which causes a blueprint recompile! See “Problem 1” for why this can explode into a serious problem.

My hack fix is this:

#if 1 // UG_CHANGE: ryan: duplicate matinee controllers exist! Make sure the matinee actor actually has our name as it's MatineeControllerName
	if ( MatineeActor == InMatineeActor && InMatineeActor->MatineeControllerName == GetFName())
#else
	if ( MatineeActor == InMatineeActor )
#endif

in each delegate implementation of UK2Node_MatineeController. I’m making sure the matinee actor’s MatineeControllerName is equal to the matinee controller the delegate has been called on.

Cheers,

Ryan.

Hey Ryan -

Thank You for the additional information. I’ve passed it along to our engineers.

Eric Ketchum