Matinee needs more C++ Coverage

Being able to Play and Stop matinee sequences from C++ and ideally getting matinee controller callbacks would be a godsend.

In our game, we are handling level transitions with a series of matinee sequences and character teleporting.

Example of entering a new planet:

  1. Start Level Streaming
  2. Play Entry Matinee
  3. Play Loop Matinee until level is loaded
  4. Display new level and Play Arrival Matinee
  5. Teleport Character
  6. Transition to Game Mode

Here’s a programmer version of the animation sequence.

https://dl.dropboxusercontent.com/u/7079101/ue4/transitionssmall.gif

As you might imagine this mostly deals with starting Matinee sequences, blending between cameras and listening for matinee finished events. In the example above with only 2 matinee sequences and 2 cameras, the BP looks like this:
130ccc870951cc23f8f216542381a39d212b81dd.jpeg

Unfortunately I designed a C++ system to manage this by pawing through unreal api docs and seeing what functions were exposed on AMatineeActor. Imagine my surprise when AMatineeActor was essentially useless and my references were incomplete types. This raises an interesting question: When looking at API docs, what can I look for that would tell me whether a class or function is accessible? Here’s the UCLASS for AMatineeActor:


UCLASS(MinimalAPI, NotBlueprintable, HideCategories=(Collision, Game, Input),
       ShowCategories=("Input|MouseInput", "Input|TouchInput", "Game|Damage"))

I can probably design a better re-usable blueprint version of this in a macro library, but for me it will never be as clean, manageable, searchable, extendable and testable as my C++ version would be.

Please extend the C++ implementation of AMatineeActor, I would really appreciate it!

If you mean accessible to C++, it’s basically everything that’s tagged ENGINE_API within that class. Without that keyword, you will be able to include and compile the function in your code, but it won’t be exported into the Matinee module and linking will fail. The only UCLASS keyword that controls exports is MinimalAPI, which essentially exports only the strict minimum to use that class as a UObject, cast, etc. (basically exports StaticClass()).

If you so desire, you can export the entire class by removing the MinimalAPI keyword and adding ENGINE_API to the class declaration like so:


UCLASS(NotBlueprintable, hidecategories=(Collision, Game, Input), showcategories=("Input|MouseInput", "Input|TouchInput", "Game|Damage"))
class ENGINE_API AMatineeActor : public AActor

But Epic generally restricts export of certain functions because they are not meant to be used outside of that module.

Thanks, that is helpful.

Also trying to access some MatineeActor from C++.
There seems to be very little support there. I’d like to use matinees as a camera track. It would be perfect to simply load the InterpData into a single MatineeActor and move the camera to this matinee/track.

With the little api access I don’t seem to find a proper way, though : s.