techartorg / bqt

A Blender add-on to support & manage Qt Widgets in Blender (PySide2)
https://github.com/techartorg/bqt/wiki
Mozilla Public License 2.0
162 stars 23 forks source link

name of open file doesn't show in title bar when wrapped in qt #68

Open hannesdelbeke opened 1 year ago

hannesdelbeke commented 1 year ago

would be great to show name of open scene in blender title bar

hannesdelbeke commented 1 year ago

bpy.data.filepath contains the filename

show path if file open image show star if file dirty image show Blender if new file/ no file path

>>> bpy.data.filepath
'C:\\Users\\user\\Downloads\\testcase.blend'
hannesdelbeke commented 1 year ago

we either need to subscribe to a hook in Blender, or create a listener.

msgbus

msgbus might let us subscribe to changes in filepath or dirty state.

app handlers

app handlers might also be an option

might also need

it seems app handlers can handle file path but not dirty state of the blend session

hannesdelbeke commented 1 year ago

current workaround: disable qt wrapping with BQT_DISABLE_WRAP set to 1

hannesdelbeke commented 7 months ago

blender 4 slightly changed it. showing unsaved for new scene image

image