2

I need to hide the part of the header that has transform orientation, snapping etc. buttons using python script.

bpy.context.space_data.show_region_tool_header = False hides the entire header, but I need to keep showing Menu and Tool Settings.

Does anyone know how to do this?

enter image description here

Blender Dadaist
  • 1,559
  • 8
  • 15
  • Also had this issue a while ago but I think it's still not possible to manipulate headers the way it should be. However, if you really want to go down into the rabbit hole you can change space_view3d.py by an addon removing the lines temporary: Rearranging elements of a panel or re-define the draw method of the header. – p2or Sep 10 '19 at 18:40
  • @p2or OMG, this a very deep hole! I will be sued by the user if I do this with his / her installation through my script :) But thank you for giving an insight into Blender UI. BTW, it looks like VIEW3D_PT_view3d_meshdisplay is no more there in 2.8. – Blender Dadaist Sep 11 '19 at 14:31
  • @p2or I guess, I did not explore the pointer given by you thoroughly. Sorry about that. As suggested in the thread, setting the draw reference to a dummy function does the trick. The menu object in this case is: bpy.types.VIEW3D_HT_tool_header. Appreciate your help! – Blender Dadaist Sep 15 '19 at 13:53
  • Glad I could help. Re-read your question right now, I'm sure you already know that but just for the sake: you can temporary hide the elements in order to display some text onto the header area like the grab operator does for example, there is: C.area.header_text_set("string") and you can also pass an empty string of course... Cheers! – p2or Sep 18 '19 at 17:47

0 Answers0