Giter Site home page Giter Site logo

Comments (22)

tonybarbieri avatar tonybarbieri commented on July 22, 2024 1

@crispy4004 PyQt/Sip should work fine. Nothing I am doing is PySide specific at all.

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

Basically, anything you need, currently you can already build up levels:

import unreal_engine as ue

editor = ue.get_world_editor()

my_actor_blueprint = ue.find_class('YourBlueprint')

editor.actor_spawn(my_actor_blueprint)

or import assets like described here:

https://github.com/20tab/UnrealEnginePython/blob/master/PythonConsole.md#asset-importing

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

I'm trying it out now. Thank you for this work.

A Python console is useful, but perhaps an easier start is a simple script shelf? I.e. a set of named buttons made from python files in a directory. Press one of the buttons and the script runs, with log output. When the script completes, the instance of the Python interpreter is deleted.

For us, Python integration with Shotgun is the ultimate goal.

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

You mean shotgun the collaboration tool ?

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

Yes, http://www.shotgunsoftware.com/ and in particular the Shotgun Toolkit (formerly Tank). Shotgun acts as workflow and digital asset manager. The Shotgun API is useful to find FBX asset files in large productions, import and spawn them to build scene setups. Shotgun's Python toolkit module supports older 2.7, but there are several ways around this problem, or you might offer a 2.7 variation of this plugin ;-)

Your plugin could be a useful gateway for many companies to do this. Thank you and I hope to contribute what I can.

from unrealenginepython.

crispy4004 avatar crispy4004 commented on July 22, 2024

Not using Shotgun in production myself, we have our own custom PyQt Asset Manager/Build Tool, but I imagine you are looking to do the same we are, seamlessly import assets into the Engine from your management software and automate additional actions to or with those assets.

It is possible to open an RPC server within the Engine through Python and communicate with it from an outside Python console. It's also possible to trigger a new fbx import with the importer window. What I'm not sure we can do yet is importing Fbx files silently in the background, setting options, and assigning physics assets and skeletons if applicable. Also trigger a re-import on existing assets.

See today that 20tab added preliminary support for structs (thanks a bunch!), so maybe that opens up the possibilities. Not sure yet.

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

We came to the same conclusion about writing an RPC style service inside Unreal, thank you.

The frontier for us is access to the new Sequence Editor, building up tracks, querying. There's lots of potential for automation in there to integrate with Avid or FCP editorial processes.

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

Currently setting the skeleton is already working:

skeleton = ue.find_object('UE4_Mannequin_Skeleton')
asset = ue.import_asset(filename, asset_name)
asset.set_property('Skeleton', skeleton)

eventually you can directly set the importer to assign the skeleton:

factory = ue.find_class('FbxFactory')
factory_obj = ue.new_object(factory)
factory_obj.get_property('ImportUI').set_property('Skeleton', skeleton)

but the dialog (in both cases) is triggered.

I am investigating if it can be disabled and rely only on properties.

from unrealenginepython.

tonybarbieri avatar tonybarbieri commented on July 22, 2024

I have a prototype working where PySide is running within UE using python 2.7. An RPC server is probably not necessary to integrate with either Shotgun Toolkit or PyQt but I need to test more before I can confirm. With this working writing a Shotgun Toolkit Engine shouldn't be difficult. I have a separate project I've been working on this in but will look at forking this project and integrating my changes in. I'm not sure how different the API is between python 2.7 and python 3.5. I haven't used python 3 at all yet due to the applications we integrate with not having moved past 2.

from unrealenginepython.

crispy4004 avatar crispy4004 commented on July 22, 2024

Very cool Tony, using Qt in Unreal would be soo helpful. Would PyQt4/Sip in theory work as well? We transitioned to PyQt after watching PySide development fall behind and take a long hiatus, though I believe Autodesk is more invested now in keeping it up to date.

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

Amazing! Thanks so much.

On Fri, Sep 2, 2016 at 2:07 AM, Tony B [email protected] wrote:

@crispy4004 https://github.com/crispy4004 PyQt/Sip should work fine.
Nothing I am doing is PySide specific at all.


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

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

@RonFischer I have started implementing the sequencer api. Do you have a specific workflow in mind i can base the work on ? Thanks

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

I have added a section in the README for proper PyQT5 usage:

https://github.com/20tab/UnrealEnginePython/blob/master/README.md#integration-with-pyqt

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

@rdeioris very kind of you to ask Robb. Traversing tracks, reading the target actor, traversing clips in the track, reading the media and adjust offsets. That is the start.

I am amazed at your progress!

from unrealenginepython.

tonybarbieri avatar tonybarbieri commented on July 22, 2024

@rdeioris Thank you for writing up the PyQT5 usage. We are going to need to do a bit more to ensure PyQT and PySide are both running and have all the features available (Signals being one of them). In your example a QtApplication event loop is never started. Because it's a blocking process what I've done in the past is to manually pump the event loop by hooking into a callback provided by the host application. In my tests that I've gotten to work I've passed a callback to FTicker with a repeat duration of zero. This seems to work but one caveat is I was then running into threading issues so in the C++ code I wrapped the python callback in a lambda whose body looked like:

PyGILState_STATE gstate;
gstate = PyGILState_Ensure();
result = PYTHONCALLBACK();
PyGILState_Release(gstate);

This lambda is then passed to the FTimer command. I'm not 100% sure this is the correct way to deal with it but it did stop the crashes I was getting from happening. I also needed to put similar code elsewhere such as around the python call in PythonConsole .

Another bit that will help with integration is exposing the Unreal Editor HWND so we can cast it and parent an invisible QtWidget to it which will act as a parent for the rest of the Qt UI elements. This allows Qt windows to stay on top of the Unreal Editor when they lose focus to another portion of the editor. This technique was used when integrating Qt with Softimage.

Ideally I can get these changes into your code and pushed up today along with the changes I made so python 2.7 can be used as well as a few additional tweaks and features which hopefully will be alright with you.

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

@rdeioris in traversing the sequence editor folder I find a list of "child object binding strings" which appear to lead to the tracks (not the ChildMasterTracks property, which is what I expected). What are these "ChildObjectBindingStrings" and how do I traverse into them to get down to the clips and animation media?

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

@RonFischer hi, honestly i am still trying to understand the sequencer implementation :) while tracks, sections and possessable are pretty clear at the high level, the classes tree looks a bit weird (probably because docs are still incomplete). I should be able to address it during this week

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

Thanks Rob. I went through Sequencer classes API yesterday and will follow
up here with a summary for you.

On Sep 19, 2016 3:46 PM, "rdeioris" [email protected] wrote:

@RonFischer https://github.com/RonFischer hi, honestly i am still
trying to understand the sequencer implementation :) while tracks, sections
and possessable are pretty clear at the high level, the classes tree looks
a bit weird (probably because docs are still incomplete). I should be able
to address it during this week


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

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

@rdeioris please find attached a summary of the Unreal 4.12.5 sequencer API and a set of classes to access it (read-only for now). What do you think?

unreal_seq_api.pdf

from unrealenginepython.

RonFischer avatar RonFischer commented on July 22, 2024

@rdeioris I've branched locally to add support for FMovieSceneBinding, which is the key missing piece connecting scene to track traversals. FMovieSceneBinding is a struct. Can you point out an example for making structs available at Python level? I've looked at FVector but think that may not be the best. Also, do you make Guids visible in Python? Or convert? Again, pointer to example from this codebase would be helpful. Hope I can contribute.

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

You can access struct field with

your_struct.properties()

and then

your_struct.get_property('name')

I will check for guid soon. Thanks a lot for your pdf it clarified things a lot

from unrealenginepython.

rdeioris avatar rdeioris commented on July 22, 2024

@RonFischer hi, i am closing this and opening another new one specific to the sequencer

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.