Comments (10)
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.
Yes, absolutely
from unrealenginepython.
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.
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.
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.
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.
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.
@RonFischer Just grasped camera track system. Tomorrow i will add more functions to the api
from unrealenginepython.
@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.
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)
- upgrade python console to IPython or other alternatives?
- Error with module h5py
- 4.26.2 Python 3.7 Crash When call bind_event in uep HOT 2
- How to add force to pyactor HOT 1
- keyboard input HOT 2
- Where are the python modules? HOT 1
- Build Failed: Cannot open include file 'UEPyModule.h'
- seems not work at 4.27?
- How can I redirect a python class so that the engine can recognize him?(请问如何重定向一个python类,然后引擎能够识别他?)
- Spawn a pyactor in begin_play doesn't works fine.
- First demo in docs/Http_API.md cause the editor crashed in 4.27.2
- Great content! It might be possible to create an updated version (ue5) HOT 1
- How to call Python automation code from a UI button? HOT 4
- How do I get text from a UEditableTextBox?
- How to run a simple python function, with inputs & outputs, from blueprints? HOT 5
- I am using multithreading to Spawn a Blueprint Actor and Unreal Engine is crashing suddenly when the spawn function gets called.
- consider archiving the repo in github
- how can I change my python env in my own source(python3.8),rather then the give source(python3.6 in UnrealEnginePython/)
- a
- Issues about the HouseKeeper
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unrealenginepython.