7
$\begingroup$

This question already has an answer here:

I'm developing an add-on, that sits in the graph editor. I've just upgraded to Blender 2.78 and saw that the panel is divided into different tabs (View, Modifiers, F-Curve, etc.). My add-on is placed in its own tab (mmvt). How can I change the currently open tab to be my tab (in code)?

enter image description here

$\endgroup$

marked as duplicate by Ray Mairlot, metaphor_set, Duarte Farrajota Ramos May 2 at 17:13

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    $\begingroup$ See this. $\endgroup$ – JakeD Oct 14 '16 at 16:52
  • 1
    $\begingroup$ I could be wrong, but I don't think this is possible $\endgroup$ – Billy S Oct 14 '16 at 21:24
  • $\begingroup$ Maybe you should go to stackoverflow $\endgroup$ – Ivan Jul 22 '17 at 9:33
  • $\begingroup$ @Noam Peled exactly where do you exactly where do you want to place that thing in your Add-on or tab? It's not very clear what you want to do, I do not understand if you want to do something in the add-on tab or if you want it to appear somewhere else!want to place that thing in your Add-on or tab? $\endgroup$ – user52430 Feb 16 '18 at 14:18
  • $\begingroup$ @NikolaTeslaMandici I want (in code) to change to currently open tab from "Modifiers" (in this example) to my addon tab (mmvt). $\endgroup$ – Noam Peled Feb 16 '18 at 21:03
0
$\begingroup$

Old question I know. I found this: https://wiki.blender.org/index.php/Dev:Doc/Projects/UI/Tab_Guidelines

you have a panel right? People seem to need a property called bl_category be set to the tab page name they want to place it on. In regard to this question it may be:

class panelName(bpy.types.Panel): bl_category = "Modifiers"

Also, changing the focus is a completely different task

$\endgroup$
  • $\begingroup$ Thanks Ruben! Yes, I'm setting the bl_category to "mmvt", this is why the tab's name is "mmvt". I'm trying to see how in my code I can change the currently open tab, so the user will see my tab instead of "Modifiers" for example. $\endgroup$ – Noam Peled May 14 '18 at 19:41
  • 1
    $\begingroup$ please note: "changing the focus is a completely different task" ;D my approach would be: - get a reference to a panel inside the tab - search the documentation for some Panel.Focus() functionality - then shoot it! ;D $\endgroup$ – Ruben Boeck May 15 '18 at 7:55

Not the answer you're looking for? Browse other questions tagged or ask your own question.