Screen Tabs Add-on 1.3.2 for 2.79+ (a la workspace tabs in 2.8)

Thanx for finding and fixing bugs :sweat_smile:
I don’t use daily build because for last several months there is broken one thing or another.

I don’t know what is your add-on about, but I fixed GoB ZBrush Import Export add-on simply this way:

 # Define operator
class GoB_export(bpy.types.Operator):
	bl_idname = "scene.gob_export"
	bl_label = "Export to Zbrush"
        ...

 # Define layout
def gob_menu(self, context):
        ...
	layout.operator(operator="scene.gob_export")
        ...

# Add layout to header
def register():
        ...
	bpy.types.INFO_HT_header.append(gob_menu)

# Remove layout from header
def unregister():
        ...
	bpy.types.INFO_HT_header.remove(gob_menu)

About Load UI thing. There is no way to load UI without loading screens, because everything about layout stores in it. The only way is load both from file and from startup.blend.

P.S. I will add your fix to the next version, thanx!

HI Milate, it there anyway to change the color of the select tab? i want change it from light red to light blue to match my theme?
It would be great to if you can point out which line of code should i change.

thank you.

by the way, i also use auto reload image addon
https://github.com/samytichadou/Auto_Reload_Images-Blender_addon.

like Editon said, enable screen tab first, then enable auoto reload addon, the icon apears agian.

Nah, my addon isn’t using the INFO_HT_header. The only reason to use that would’ve been to prepend().
I use bpy.types.Header, not pre/append to the header.

Essentially, my addon loaded it’s header, then yours remove the default header, and reloads it after mine.
Changing the load order, meant yours reload the header first, then mine loads afterwards, as though yours is actually the default.

A side benefit to load order is I can mimic prepend without ever touching the header.

Basically this is what happens, when I meant for my ui to go to the right of the info data:


Changing the Addons load order, I can have it correctly load to the right (note: the refresh is a separate addon, so I can leave it to load first and have it stay to the left)

Hi! Thanx for feedback.
Actually, there is no way in blender (as far as I know) to change color of the button through code. For now I use .alert option to highlight tab. I think I can replace button with toggles and then it will use color from theme settings. But it will be the same for all elements of this type.

Interesting behaviour. Well, it seems that’s the way blender works!

Thanks, I have a little proposal, you can reference the color from inner selected button from Radio Buttons.

Radio buttons is enums in terms of blender python API, so it a little bit of a pain to do it this way. I can reference it to the Regular color I think.

That would be great, wait for your updates. No need to hurry.

Screen Tabs 1.3.1

Changes:

  • Tab highlight color now references to the Inner Selected color of Regular section in User Interface area of Theme

Fixes:

  • Tab icon updates only when OK button was pressed
  • Statistics memory display was broken in daily builds (Thanx to @Edtion)

Note for using Screen Tabs with other Info Header add-ons - first enable Screen Tabs add-on, then the rest.

Download Screen Tabs v1.3.1 [Gumroad]
Download Screen Tabs v1.3.1 [Google Drive]

5 Likes

Thanks for the updates

Noticed bones were missing when using icons for the statistics. here's changes to include them:

line # 44

stats_icons = OrderedDict([
	('Verts:', 'VERTEXSEL'),
	('Edges:', 'EDGESEL'),
	('Faces:', 'FACESEL'),
	('Tris:', 'MOD_TRIANGULATE'),
	('Bones:', 'ARMATURE_DATA'),
	('Objects:', 'OUTLINER_OB_GROUP_INSTANCE'),
	('Lamps:', 'LAMP_SUN'),
	('Mem:', 'DISK_DRIVE')])

line #348

					if stat_value and scene.stat_flags[i]:
						if key == 'Mem:':
							stat_value = str(round(float(stat_value[:-1]))) + 'M'
						if key == 'Verts:' and context.mode == 'EDIT_ARMATURE':
							val	=	'BONE_DATA'
						if key == 'Bones:' and context.mode == 'POSE':
							val	=	'BONE_DATA'

						row.label(stat_value, icon = val)

Line numbers are approximate, because I made changes somewhere to only display two letters in scene names, to shrink the tabs down to take less header space

I’m not saying it as a request or anything but a thought occurred to me that this could be used to display more data, like number of different object types in scene/data, materials in objects, objects in group, etc.

Hi! Thanx for finding another ‘bug’ :grinning:
Could you please contribute a fix via GitHub?

I guess I figured out how to use github but either way, my changes are available ¯\_(ツ)_/¯

First pull only adds bones fix. Second pull also adds adjustable displayed text length for scene tabs.

…and then I realized I could also add a scale for them to shrink without removing too many letters.

New release 1.3.2 via GitHub.
Thanx to @Edtion for pull requests!

1 Like

Loving this add-on. It really cleans up the menu! Thanks a ton.

Can we link the tabs and cathide addon (by Samy Tichadou) some how.

@thedaemon Hi! Glad it makes your blender experience nicer!

@swathi Hi! Please, provide a link to add-on and describe the problem a bit more.

This addon allow us to make presets of addons. So if we could link it with tabs it will work like workspace addons in blender 2.8. And we could make tabs like architecture tab, rigging tab etc.
Less addons in toolbar and less searching the long list

Sorry for late response!
So, as I see you want to hide Toolshelf categories per tab (screen). But then it is not related to my add-on in any way. The way to achieve this is store CatHide add-on settings in screen, not globally. It is not hard to program this, ask me if you need help! :grinning:

Many thanks!