I want to modify the sculpt mode header, do I really have to copy everything from space_view3d.py?

Oh, I didn’t even think about unregistering the old ones! Blender did make some warnings in the console, but they were like this already exists, lemme unregister that for you, dumbass :stuck_out_tongue:

Tip for anyone trying to unregister the class: the path is not bl_ui.space_view3d.VIEW3D_HT_header, it’s bpy.types.VIEW3D_HT_header. Took me a while to figure it out…

I also did find an old thread about this, and another method is to overwrite just the draw method of the class. Seems cleaner, but at the end of the day I’m still copying a lot of code that I’ll have re-copy for every Blender release because grease pencil might have added a button to their header.

@nickberckley my intention is definitely to reorder and remove stuff. I was using append before but it just wasn’t enough for what I wanted to do.

1 Like