I am trying to add a track to a possessed actor in the sequencer via python.
To manually do this, I can make the actor possessable by dragging it into the sequencer, then adding the parameter (called visibility) track like so.
This is how far I have got so far via python.
ls = unreal.EditorAssetLibrary.load_asset(’/Game/Master/assets/sets/exampleSequence’)
possessables = ls.get_possessables()
#add track to first possessable
this creates the following
I am unsure how to link/bind this to a parameter on the actor (in this case a blueprint with a variable I made called visibility)
Am I on the right track, or is there a better way of getting what I am trying to achieve?
I had to do something similar but i used a movieSceneFloatTrack in order to animate the visibility overtime. In order to bind/link, I found that you need to know the property_name and property_path. To do that, I manually added visibility, drilled into the object and looked up what the property_name and property_path was which was bHidden…The following should work with pure code. Make sure you save and reopen the levelSequence to see if it worked.
TrackVis = possessables.add_track(unreal.MovieSceneBoolTrack)
TrackVis .set_property_name_and_path('bHidden', 'bHidden')
TrackVis .set_editor_property('display_name', 'Visibility')
section = TrackVis.add_section()
For code testing I also use the following
Thanks, this is what I was looking for!