2
$\begingroup$

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

$\endgroup$
4
  • $\begingroup$ 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. $\endgroup$
    – p2or
    Sep 10, 2019 at 18:40
  • $\begingroup$ @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. $\endgroup$ Sep 11, 2019 at 14:31
  • $\begingroup$ @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! $\endgroup$ Sep 15, 2019 at 13:53
  • $\begingroup$ 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! $\endgroup$
    – p2or
    Sep 18, 2019 at 17:47

0

You must log in to answer this question.

Browse other questions tagged .