GithubHelp home page GithubHelp logo

Comments (8)

bob-white avatar bob-white commented on June 3, 2024

So bqt.py is designed to be run as a startup script. Not sure how the execution model differs when run directly like that.

I also get an error, but related to operators registration not the icon code:

found bundled python: e:\Blender\2.80\python
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "e:\Blender\bqt.py", line 408, in <module>
    unregister()
  File "e:\Blender\bqt.py", line 381, in unregister
    bpy.utils.unregister_class(QOperator)
RuntimeError: unregister_class(...):, missing bl_rna attribute from 'RNAMeta' instance (may not be registered)

from bqt.

cmcpasserby avatar cmcpasserby commented on June 3, 2024

@bob-white well the block that calls unregister only runs if you execute the script from the cli to start blender, so i feel it is just running too early

from bqt.

bob-white avatar bob-white commented on June 3, 2024

You are correct, if I remove that block I no longer get the error.
Also, I still don't get the error that you are.
I tried this both in an admin console, and a non-elevated console so I don't believe this is a permissions issue.

from bqt.

JeffHanna avatar JeffHanna commented on June 3, 2024

I don't get the IndexError. But the Blender frame is without an icon.

from bqt.

bob-white avatar bob-white commented on June 3, 2024

So poking around with this, it appears loading the bytes from GetBitmapBits into a QImage or QPixmap just doesn't work. It will work with a PIL.Image though. So its probably some kind of formatting thing.

from bqt.

cmcpasserby avatar cmcpasserby commented on June 3, 2024

likely just something simple like needing to go into a QByteArray first instead of a python list.
though i think we can kill off the code for finding the process. since bpy.app.binary_path will just give you the blender exe directly

from bqt.

JeffHanna avatar JeffHanna commented on June 3, 2024

The latest commit uses bpy.app.binary_path to get the path to the blender.exe. The code to step through running Windows processes to find the blender.exe has been removed.

from bqt.

JeffHanna avatar JeffHanna commented on June 3, 2024

With my latest change I successfully get an application icon when starting Blender from a command prompt using the "blender.exe --debug --python bqt.exe" command posted above.

Closing.

from bqt.

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.