Update Tab Addons to Choose tab name #48459

Closed
opened 7 years ago by BrendonMurphy · 7 comments
Collaborator

This task is spread out over several addons in release & contrib.

Purpose: To allow users to change which tabs the Addons appear in.

Fixes: It's a very common compliant that tabs get easily overcrowded & misused. This fixes that by allowing users to set up their own tab system or relocate addons to where they need them within the toolshelf.

Usage: Open Addons Preferences, Rename the current Tab name to one you choose or leave as default.

Code:
Using Align Tools in contrib as an example

## Addons Preferences Update Panel
def update_panel(self, context):
    try:
        bpy.utils.unregister_class(AlignUi)
    except:
        pass
    AlignUi.bl_category = context.user_preferences.addons[__name__].preferences.category
    bpy.utils.register_class(AlignUi)   
    
class AddonPreferences(bpy.types.AddonPreferences):
    - this must match the addon name, use '__package__'
    - when defining this in a submodule of a python package.
    bl_idname = __name__

    category = bpy.props.StringProperty(
            name="Category",
            description="Choose a name for the category of the panel",
            default="Tools",
            update=update_panel)

    def draw(self, context):

        layout = self.layout
        row = layout.row()
        col = row.column()
        col.label(text="Category:")
        col.prop(self, "category", text="")

Addons Affected:
Note:`Defaults will not change
Addons Contrib (in Testing Category):
space_view3d_align_tools *Completed
space_view3d_toolshelf_menu *Completed
object_boolean_tools *Completed
oscurart_tools *Completed

Contrib I/O: Note:Whilst Defaults will not change per se, it seems like i/o addons could be changed to a category Import/Export
i/o cacharanth *fix registration bug, no other change
i/o export paper model *no change
i/o mesh cache tools *no change

Addons Affected:
Addons Release (in Community Category):
space_view3d_3d_navigation *requires own Task
ui_layer_manager * Complete

Release I/O:`
io_import_scene_unreal_psa_psk ( still uses Misc Tab, will change to Import/Export ) *Complete
io_export_unreal_psk_psa ( still uses Misc Tab, will change to Import/Export ) *Complete
io_online_sketchfab *no change
light_field_tools ( still uses Misc Tab, will change to Tools Tab ) *Complete

Summary: This set's a positive trend in addons ui management, With the exception of the i/o tools I will be updating all the listed addons to include this function. Also misc category should not be used the three affected addons will have tab change as indicated above.

Thanks.

This task is spread out over several addons in release & contrib. **Purpose:** To allow users to change which tabs the Addons appear in. **Fixes:** It's a very common compliant that tabs get easily overcrowded & misused. This fixes that by allowing users to set up their own tab system or relocate addons to where they need them within the toolshelf. **Usage:** Open Addons Preferences, Rename the current Tab name to one you choose or leave as default. **Code:** Using Align Tools in contrib as an example ``` ## Addons Preferences Update Panel def update_panel(self, context): try: bpy.utils.unregister_class(AlignUi) except: pass AlignUi.bl_category = context.user_preferences.addons[__name__].preferences.category bpy.utils.register_class(AlignUi) class AddonPreferences(bpy.types.AddonPreferences): - this must match the addon name, use '__package__' - when defining this in a submodule of a python package. bl_idname = __name__ category = bpy.props.StringProperty( name="Category", description="Choose a name for the category of the panel", default="Tools", update=update_panel) def draw(self, context): layout = self.layout row = layout.row() col = row.column() col.label(text="Category:") col.prop(self, "category", text="") ``` **Addons Affected:** Note:`Defaults will not change *Addons Contrib (in Testing Category):* space_view3d_align_tools *Completed space_view3d_toolshelf_menu *Completed object_boolean_tools *Completed oscurart_tools *Completed *Contrib I/O:*` Note:`Whilst Defaults will not change per se, it seems like i/o addons could be changed to a category Import/Export i/o cacharanth *fix registration bug, no other change i/o export paper model *no change i/o mesh cache tools *no change **Addons Affected:** *Addons Release (in Community Category):* space_view3d_3d_navigation *requires own Task ui_layer_manager * Complete *Release I/O:*` io_import_scene_unreal_psa_psk ( still uses Misc Tab, will change to Import/Export ) *Complete io_export_unreal_psk_psa ( still uses Misc Tab, will change to Import/Export ) *Complete io_online_sketchfab *no change light_field_tools ( still uses Misc Tab, will change to Tools Tab ) *Complete **Summary:** This set's a positive trend in addons ui management, With the exception of the i/o tools I will be updating all the listed addons to include this function. Also misc category should not be used the three affected addons will have tab change as indicated above. Thanks.
Poster
Collaborator

Changed status to: 'Open'

Changed status to: 'Open'
BrendonMurphy self-assigned this 7 years ago
Poster
Collaborator

Added subscriber: @BrendonMurphy

Added subscriber: @BrendonMurphy
Collaborator

Added subscriber: @mano-wii

Added subscriber: @mano-wii
Poster
Collaborator

Update status:
Addons Contrib (in Testing Category):
space_view3d_align_tools *Completed
space_view3d_toolshelf_menu *Completed
object_boolean_tools *Completed
oscurart_tools *Completed

Update status: Addons Contrib (in Testing Category): space_view3d_align_tools *Completed space_view3d_toolshelf_menu *Completed object_boolean_tools *Completed oscurart_tools *Completed
italic commented 7 years ago

Added subscriber: @italic

Added subscriber: @italic
Poster
Collaborator

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
BrendonMurphy closed this issue 7 years ago
Poster
Collaborator

Update Status: Complete.
I decided to pass over some addons in the list as they are quite specific & the Authors should handle the naming of the addons Tab Category's themselves.
Whilst this goes only a small way to address the issues with Tab name misuse, already other addons devs are adopting the system in their own.
Hopefully this will continue to be used within & outside Blender to allow users more freedom to change Tab names & move Panels to suit themselves & clean up their ui.
Thanks.
Closing as Resolved.

Update Status: Complete. I decided to pass over some addons in the list as they are quite specific & the Authors should handle the naming of the addons Tab Category's themselves. Whilst this goes only a small way to address the issues with Tab name misuse, already other addons devs are adopting the system in their own. Hopefully this will continue to be used within & outside Blender to allow users more freedom to change Tab names & move Panels to suit themselves & clean up their ui. Thanks. Closing as Resolved.
Sign in to join this conversation.
No Label
good first issue
legacy module/Animation & Rigging
legacy module/Core
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Rendering & Cycles
legacy module/Sculpt, Paint & Texture
legacy module/User Interface
legacy module/VFX & Video
legacy project/2.81
legacy project/2.82
legacy project/2.83
legacy project/2.90
legacy project/2.92
legacy project/2.93
legacy project/3.0
legacy project/3.1
legacy project/3.2
legacy project/3.4
legacy project/Add-ons (BF-Blender)
legacy project/Add-ons (Community)
legacy project/Alembic
legacy project/Animation & Rigging
legacy project/Asset Browser
legacy project/Automated Testing
legacy project/BF Blender: 2.8
legacy project/BF Blender: After Release
legacy project/BF Blender: Next
legacy project/BF Blender: Regressions
legacy project/BF Blender: Unconfirmed
legacy project/Blender 2.70
legacy project/Blender Cloud
legacy project/Code Quest
legacy project/Collada
legacy project/Compositing
legacy project/Core
legacy project/Cycles
legacy project/Datablocks and Libraries
legacy project/Dependency Graph
legacy project/Documentation
legacy project/EEVEE & Viewport
legacy project/Freestyle
legacy project/Game Data Conversion
legacy project/Game Engine
legacy project/Game Physics
legacy project/Game Python
legacy project/Game UI
legacy project/Geometry Nodes
legacy project/Good First Issue
legacy project/Grease Pencil
legacy project/Images & Movies
legacy project/Import/Export
legacy project/Infrastructure: Blender Buildbot
legacy project/Infrastructure: Blender Web Assets
legacy project/Infrastructure: Websites
legacy project/Modeling
legacy project/Modifiers
legacy project/Motion Tracking
legacy project/Nodes
legacy project/Nodes & Physics
legacy project/OpenGL Error
legacy project/Overrides
legacy project/Papercut
legacy project/Physics
legacy project/Pillar
legacy project/Pipeline, Assets & I/O
legacy project/Platform: Linux
legacy project/Platform: macOS
legacy project/Platforms, Builds, Tests & Devices
legacy project/Platform: Windows
legacy project/Python API
legacy project/Render & Cycles
legacy project/Render Pipeline
legacy project/Sculpt, Paint & Texture
legacy project/Straightforward Issue
legacy project/Text Editor
legacy project/Tracker Curfew
legacy project/Translations
legacy project/USD
legacy project/User Interface
legacy project/UV Editing
legacy project/VFX & Video
legacy project/Video Sequencer
legacy project/Virtual Reality
papercut
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
straightforward issue
Type › Bug
Type › Design
Type › Known Issue
Type › Patch
Type › Report
Type › To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#48459
Loading…
There is no content yet.