GithubHelp home page GithubHelp logo

jonike / cefwidget Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fxtd-odyssey/cefwidget

0.0 1.0 0.0 6.09 MB

CefPython Embed to the python Qt Framework software

License: GNU General Public License v3.0

Python 4.39% CSS 0.42% HTML 0.50% JavaScript 94.68%

cefwidget's Introduction

CefWidget

CefPython Embed to the python Qt Framework software

中文说明

maya

houdini

python

Usage

Cef is Chromium Embed Framework, And I want to use it for multiplatform WebGL displaying.
Especially for DCC like Maya Houdini.

RefPython pyinstaller

Using pyinstaller to generate a cefpython3 exe file

First, you need to install all the dependencies , you can use the pip run the requiremnets.txt in top of the repo.
Finnally cd to the cef_compile directory and run the pyinstaller.py will automatically generate the exe version for you.

pip install -r requirements.txt
cd cef_compile
python pyinstaller.py

This is compile example modify from the cefpython3 example
I fix a little Bug in the hook-cefpython3.py (add "." on the 133 line)

Run CefWidget

And I got to commit that Cef is really large so I upload the exe version on the release page.
Please download the refapp.rar file and unzip to the CefWidget folder.
Then you can use python code from CefWidget import CefBrowser to use the CefBrowser.
It already wrapped by the QWidget and communicate the Cef using socket.

Notice

Don't forget that embed function need to run after all the UI layout have been set. otherwise it would error.
And I add a decorator autoCefEmbed which can recusive find all the CefBrowser and call embed method, you can add the decorator to your main window launch method.
By default, the socket run on the 4789 Port, you can modify it

release

you can change to the release branch , I clear all the irrelevant folder.
then you can download the zip file on the github release and then unzip the cefapp.rar into the CefWidget folder

how to implement the CefWidget Moudle , you can check with the test folder importTest.py on the master branch

downside

Cef Framework is very large and it doesn't support lots of the video format like h.264 by default (because of the license problems)

there is another C++ Chromium base Framework which is miniblink
miniblink is much smaller and even embeded node.js to run the electron app.
If I have more time to do some research,I hope I can find a way to compile it and use it like cef for DCC.

cefwidget's People

Contributors

fxtd-odyssey avatar zsd-tim avatar

Watchers

 avatar

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.