Giter Site home page Giter Site logo

Sequencer API about unrealenginepython HOT 10 CLOSED

20tab avatar 20tab commented on August 25, 2024
Sequencer API

from unrealenginepython.

Comments (10)

RonFischer avatar RonFischer commented on August 25, 2024

Would you like a snippet which traverses the structure?

On Sep 26, 2016 3:09 PM, "rdeioris" [email protected] wrote:

Extend the editor api to allow scripting of the sequencer


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#28, or mute the thread
https://github.com/notifications/unsubscribe-auth/AK2vQgPgABay0mWCBUnRrEChf48uJOWzks5qt2-RgaJpZM4KGM5Y
.

from unrealenginepython.

rdeioris avatar rdeioris commented on August 25, 2024

Yes, absolutely

from unrealenginepython.

RonFischer avatar RonFischer commented on August 25, 2024

Just a sketch. Please pardon the unusual formatting. It gets down to the
animation underlying a section.

UMovieScene* scene = levelSeq->GetMovieScene();

if (!scene) {

    UE_LOG(LogTemp, Error, TEXT("Level sequence %s had no movie scene"),

name)

    return "failed";

}



UE_LOG(LogTemp, Display, TEXT("Parsing sequence %s"), name);



const TArray< FMovieSceneBinding >allBindings = scene->GetBindings();

for (int bindingIndex=0; bindingIndex < allBindings.Num();

++bindingIndex) {

    FMovieSceneBinding binding = allBindings[bindingIndex];

    FString bindingName = binding.GetName();

    //FGuid bindingGuid = binding.GetObjectGuid();

    TArray< UMovieSceneTrack * > tracks = binding.GetTracks();

    int numTracks = tracks.Num();

    UE_LOG(LogTemp, Display, TEXT("Binding %s has %d tracks"),

*bindingName,
numTracks);

    for (int trackIndex = 0; trackIndex < numTracks; ++trackIndex) {

        UMovieSceneTrack* track = tracks[trackIndex];

        if (!track) {

            UE_LOG(LogTemp, Error, TEXT("\tNull track %s (ignored)"), *

(track->GetName()));

            continue;

        }

        UE_LOG(LogTemp, Display, TEXT("\tTrack %s"), *

(track->GetName()));

        const TArray<UMovieSceneSection*> sections =

track->GetAllSections();

        int numSections = sections.Num();

        for (int j = 0; j < numSections; ++j) {

            UMovieSceneSection* section = sections[j];

            if (!section) {

                UE_LOG(LogTemp, Error, TEXT("\t\tNull section (ignored)"

));

                continue;

            }

float trackStart = section->GetStartTime();

float trackEnd = section->GetEndTime();

UClass* sectionClass = section->GetClass();

FString sectionClassName = sectionClass->GetName();

UE_LOG(LogTemp, Display, TEXT("\t\t%f - %f %s"), trackStart, trackEnd, *
sectionClassName);

UMovieSceneSkeletalAnimationSection* skelAnimSection =

Cast(section);

if (!skelAnimSection) {

                UE_LOG(LogTemp, Error, TEXT("\t\t\tNon skeletal

animation section (ignored)"));

                continue;

            }

float clipStart = skelAnimSection->GetStartOffset();

            float clipEnd = skelAnimSection->GetEndOffset();

            UAnimSequenceBase* animSeq =

skelAnimSection->GetAnimSequence();

            const TArray<class UAnimMetaData*>clipMeta =

animSeq->GetMetaData();

            UE_LOG(LogTemp, Display, TEXT("\t\t\t%f - %f"),

                   clipStart, clipEnd

                   );

            for (int clipMetaIndex = 0; clipMetaIndex < clipMeta.Num();

++clipMetaIndex) {

                UAnimMetaData* animMeta = clipMeta[clipMetaIndex];

                FString animName = animMeta->GetName();

UE_LOG(LogTemp, Display, TEXT("\t\t\t\tmeta %s"), *name);

            }

        }

    }

On Mon, Sep 26, 2016 at 4:27 PM, rdeioris [email protected] wrote:

Yes, absolutely


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK2vQttTH2kPtbobHyEbOke_W8CCa0QCks5qt4HjgaJpZM4KGM5Y
.

from unrealenginepython.

RonFischer avatar RonFischer commented on August 25, 2024

Also, this was in 4.13. The driving animation API changed a bit between the
two I think.

On Mon, Sep 26, 2016 at 4:31 PM, Ron Fischer [email protected] wrote:

Just a sketch. Please pardon the unusual formatting. It gets down to the
animation underlying a section.

UMovieScene* scene = levelSeq->GetMovieScene();

if (!scene) {

    UE_LOG(LogTemp, Error, TEXT("Level sequence %s had no movie scene"),

name)

    return "failed";

}



UE_LOG(LogTemp, Display, TEXT("Parsing sequence %s"), name);



const TArray< FMovieSceneBinding >allBindings = scene->GetBindings();

for (int bindingIndex=0; bindingIndex < allBindings.Num();

++bindingIndex) {

    FMovieSceneBinding binding = allBindings[bindingIndex];

    FString bindingName = binding.GetName();

    //FGuid bindingGuid = binding.GetObjectGuid();

    TArray< UMovieSceneTrack * > tracks = binding.GetTracks();

    int numTracks = tracks.Num();

    UE_LOG(LogTemp, Display, TEXT("Binding %s has %d tracks"), *bindingName,

numTracks);

    for (int trackIndex = 0; trackIndex < numTracks; ++trackIndex) {

        UMovieSceneTrack* track = tracks[trackIndex];

        if (!track) {

            UE_LOG(LogTemp, Error, TEXT("\tNull track %s (ignored)"),

*(track->GetName()));

            continue;

        }

        UE_LOG(LogTemp, Display, TEXT("\tTrack %s"), *

(track->GetName()));

        const TArray<UMovieSceneSection*> sections =

track->GetAllSections();

        int numSections = sections.Num();

        for (int j = 0; j < numSections; ++j) {

            UMovieSceneSection* section = sections[j];

            if (!section) {

                UE_LOG(LogTemp, Error, TEXT("\t\tNull section

(ignored)"));

                continue;

            }

float trackStart = section->GetStartTime();

float trackEnd = section->GetEndTime();

UClass* sectionClass = section->GetClass();

FString sectionClassName = sectionClass->GetName();

UE_LOG(LogTemp, Display, TEXT("\t\t%f - %f %s"), trackStart, trackEnd, *
sectionClassName);

UMovieSceneSkeletalAnimationSection* skelAnimSection =

Cast(section);

if (!skelAnimSection) {

                UE_LOG(LogTemp, Error, TEXT("\t\t\tNon skeletal

animation section (ignored)"));

                continue;

            }

float clipStart = skelAnimSection->GetStartOffset();

            float clipEnd = skelAnimSection->GetEndOffset();

            UAnimSequenceBase* animSeq = skelAnimSection->

GetAnimSequence();

            const TArray<class UAnimMetaData*>clipMeta =

animSeq->GetMetaData();

            UE_LOG(LogTemp, Display, TEXT("\t\t\t%f - %f"),

                   clipStart, clipEnd

                   );

            for (int clipMetaIndex = 0; clipMetaIndex <

clipMeta.Num(); ++clipMetaIndex) {

                UAnimMetaData* animMeta = clipMeta[clipMetaIndex];

                FString animName = animMeta->GetName();

UE_LOG(LogTemp, Display, TEXT("\t\t\t\tmeta %s"), *name);

            }

        }

    }

On Mon, Sep 26, 2016 at 4:27 PM, rdeioris [email protected]
wrote:

Yes, absolutely


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK2vQttTH2kPtbobHyEbOke_W8CCa0QCks5qt4HjgaJpZM4KGM5Y
.

from unrealenginepython.

rdeioris avatar rdeioris commented on August 25, 2024

Ok, thanks to your pdf and the pasted code i have a clear view of the sequencer.

I will start adding access to the bindings. Next step will be mapping guid to something useful.

Do you know if there is any specific behaviour for camera track ?

from unrealenginepython.

RonFischer avatar RonFischer commented on August 25, 2024

I need to look at camera tracks. Have not tried to walk any examples yet.

I am deep into C++ code for parsing skeletal mesh tracks down to their
animation curves.

The spawn and possess object guids are tricky. E.g. possess bindings are
resolved by either the level sequence or a movie scene instance. Spawn is
just a template.

I am also still trying to fully understand the bone to skeleton index
through track index map to curve API chain.

On Sep 29, 2016 4:49 PM, "rdeioris" [email protected] wrote:

Ok, thanks to your pdf and the pasted code i have a clear view of the
sequencer.

I will start adding access to the bindings. Next step will be mapping guid
to something useful.

Do you know if there is any specific behaviour for camera track ?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK2vQtuV2T-9za068hzmTvCcirap5VKCks5qu3t-gaJpZM4KGM5Y
.

from unrealenginepython.

rdeioris avatar rdeioris commented on August 25, 2024

Here i am tracking api progresses:

https://github.com/20tab/UnrealEnginePython/blob/master/sequencer_API.md

feel free to improve it with pull requests

from unrealenginepython.

rdeioris avatar rdeioris commented on August 25, 2024

@RonFischer Just grasped camera track system. Tomorrow i will add more functions to the api

from unrealenginepython.

RonFischer avatar RonFischer commented on August 25, 2024

@rdeioris thank you! I look forward to review, comment and build the new
code.

On Oct 21, 2016 2:27 PM, "rdeioris" [email protected] wrote:

@RonFischer https://github.com/RonFischer Just grasped camera track
system. Tomorrow i will add more functions to the api


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#28 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AK2vQhUNW7ZdpUGsti3BqNP-PyVMWZGlks5q2FtEgaJpZM4KGM5Y
.

from unrealenginepython.

rdeioris avatar rdeioris commented on August 25, 2024

The sequencer api suppot has been improved heavily thanks to Matthew Whelan (http://www.mattwhelan.com/) sponsorship:

https://github.com/20tab/UnrealEnginePython/blob/master/examples/sequencer_scripting.py

This is a first round of patches, more to come soon

from unrealenginepython.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.