Fix #106641: missing Annotation widgets #112688

Merged
Pratik Borhade merged 5 commits from MilanDavidovic/blender:fix-annotation-missing-widgets into main 2024-03-28 12:15:43 +01:00
Contributor

Annotation layer widget was missing on the Tool Settings bar and the
side bar for some of the editors, as well as both color and layer
widgets on the Tool tab of the Properties editor.

Also fixed the Tool Settings bar not updating when drawing annotations
on the Image editor viewport, and the Tool panel in Properties editor
not updating when drawing annotations on the 3D scene.


Before above, after below:

image

Annotation layer widget was missing on the Tool Settings bar and the side bar for some of the editors, as well as both color and layer widgets on the Tool tab of the Properties editor. Also fixed the Tool Settings bar not updating when drawing annotations on the Image editor viewport, and the Tool panel in Properties editor not updating when drawing annotations on the 3D scene. --- Before above, after below: ![image](/attachments/9b22fe4b-5d96-4fba-b020-cda289b69208)
208 KiB
Milan Davidović added 1 commit 2023-09-21 21:03:20 +02:00
b7faa5a4ac Fix #106641: missing Annotation widgets
Annotation layer widget was missing on the Tool Settings bar and the
side bar for some of the editors, as well as both color and layer
widgets on the Tool tab of the Properties editor.

Also fixed the Tool Settings bar not updating when drawing annotations
on the Image editor viewport, and the Tool panel in Properties editor
not updating when drawing annotations on the 3D scene.
Milan Davidović requested review from Pratik Borhade 2024-02-04 18:26:50 +01:00
Pratik Borhade reviewed 2024-02-05 12:20:33 +01:00
Pratik Borhade left a comment
Member

Hi, thanks for the PR. Works correctly here. Added one comment.

Haven't checked the every case of space listener code but looks correct to me on first look.

@pablovazquez , can you review as well? 🙂


This PR is been around for ~5 months without review/reviewer. Sorry for that.

Hi, thanks for the PR. Works correctly here. Added one comment. Haven't checked the every case of space listener code but looks correct to me on first look. @pablovazquez , can you review as well? 🙂 - - - This PR is been around for ~5 months without review/reviewer. Sorry for that.
@ -187,0 +188,4 @@
row = layout.row(align=True)
row.prop(gpl, "color", text="Annotation")
row.popover(
panel="PROPERTIES_PT_annotation_layers",
Member

why not to use TOPBAR_PT_annotation_layers here?

why not to use `TOPBAR_PT_annotation_layers` here?
Author
Contributor

If I remember correctly, TOPBAR_PT_annotation_layers didn't work for Tools tab in Properties when I was first fixing this. That's why I added PROPERTIES_PT_annotation_layers, the only difference being bl_region_type = 'WINDOW' instead of 'HEADER'. But now it works with TOPBAR_PT_annotation_layers when applied to blender-v4.0-release.

Should I change it to TOPBAR_PT_annotation_layers? The name doesn't really reflect the usage context though.

If I remember correctly, `TOPBAR_PT_annotation_layers` didn't work for Tools tab in Properties when I was first fixing this. That's why I added `PROPERTIES_PT_annotation_layers`, the only difference being `bl_region_type = 'WINDOW`' instead of `'HEADER'`. But now it works with `TOPBAR_PT_annotation_layers `when applied to blender-v4.0-release. Should I change it to `TOPBAR_PT_annotation_layers`? The name doesn't really reflect the usage context though.
Member

Yes, I would prefer to use TOPBAR_PT_annotation_layers :)

Yes, I would prefer to use `TOPBAR_PT_annotation_layers` :)
Author
Contributor

Sure, I'll make the change. :)

Sure, I'll make the change. :)
MilanDavidovic marked this conversation as resolved
Pratik Borhade requested review from Pablo Vazquez 2024-02-06 11:38:35 +01:00
Milan Davidović added 1 commit 2024-02-06 15:26:27 +01:00
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
365efa81fd
Fix #106641: missing Annotation widgets
Reuse TOPBAR_PT_annotation_layers for annotation layer popup in the Tool tab of the Properties panel.
Pratik Borhade approved these changes 2024-02-07 10:52:54 +01:00
Pratik Borhade left a comment
Member

Thanks 🙏

Thanks 🙏
Pratik Borhade requested review from Harley Acheson 2024-03-21 11:20:04 +01:00
Member

I updated the first comment to include a capture that illustrates some of the changes here.

Accepting, but I think @pablovazquez should have the final say.

I updated the first comment to include a capture that illustrates some of the changes here. Accepting, but I think @pablovazquez should have the final say.
Harley Acheson approved these changes 2024-03-22 17:30:16 +01:00
Harley Acheson left a comment
Member

Thanks!

Thanks!
Pablo Vazquez approved these changes 2024-03-27 19:14:11 +01:00
Pablo Vazquez left a comment
Member

Makes sense to unify this. Thanks!

Makes sense to unify this. Thanks!
Member

@blender-bot build

@blender-bot build
Author
Contributor

Just to check, I should merge main rather than rebase it and force push?

Just to check, I should merge main rather than rebase it and force push?
Member

@MilanDavidovic hi, can you merge latest main in this branch? So we can run buildbot again (just to play on safer side 🙂). Builds are failing due to old code.

- make update (make sure you're on main branch to pull latest main)
- git checkout fix-annotation-missing-widgets
- git merge main
- git push me fix-annotation-missing-widgets

These sequence of commands might help ^

@MilanDavidovic hi, can you merge latest main in this branch? So we can run buildbot again (just to play on safer side 🙂). Builds are failing due to old code. ``` - make update (make sure you're on main branch to pull latest main) - git checkout fix-annotation-missing-widgets - git merge main - git push me fix-annotation-missing-widgets ``` These sequence of commands might help ^
Author
Contributor

Great, thanks!

Great, thanks!
Milan Davidović added 1 commit 2024-03-28 10:41:47 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
350d4ea176
Merge branch 'main' into fix-annotation-missing-widgets
Member

@blender-bot build

@blender-bot build
Milan Davidović added 1 commit 2024-03-28 10:56:19 +01:00
Pratik Borhade reviewed 2024-03-28 11:25:12 +01:00
@ -418,3 +418,3 @@
def draw_header(self, context):
if context.space_data.type not in {'VIEW_3D', 'TOPBAR', 'SEQUENCE_EDITOR'}:
if context.space_data.type not in {'VIEW_3D', 'TOPBAR', 'SEQUENCE_EDITOR', 'IMAGE_EDITOR', 'NODE_EDITOR', 'PROPERTIES'}:
Member

Thanks, one more formatting change is detected https://builder.blender.org/admin/#/builders/210/builds/1270 :

-        if context.space_data.type not in {'VIEW_3D', 'TOPBAR', 'SEQUENCE_EDITOR', 'IMAGE_EDITOR', 'NODE_EDITOR', 'PROPERTIES'}:
+        if context.space_data.type not in {
+            'VIEW_3D',
+            'TOPBAR',
+            'SEQUENCE_EDITOR',
+            'IMAGE_EDITOR',
+            'NODE_EDITOR',
+                'PROPERTIES'}:
             self.layout.prop(context.space_data, "show_annotation", text="")
Thanks, one more formatting change is detected https://builder.blender.org/admin/#/builders/210/builds/1270 : ``` - if context.space_data.type not in {'VIEW_3D', 'TOPBAR', 'SEQUENCE_EDITOR', 'IMAGE_EDITOR', 'NODE_EDITOR', 'PROPERTIES'}: + if context.space_data.type not in { + 'VIEW_3D', + 'TOPBAR', + 'SEQUENCE_EDITOR', + 'IMAGE_EDITOR', + 'NODE_EDITOR', + 'PROPERTIES'}: self.layout.prop(context.space_data, "show_annotation", text="") ```
Author
Contributor

Thanks, make format didn't fix that one, I'll fix it now.

Thanks, `make format` didn't fix that one, I'll fix it now.
Member

This formatting change looks odd to me as well. But let's make the change for now :)

This formatting change looks odd to me as well. But let's make the change for now :)
Milan Davidović added 1 commit 2024-03-28 11:41:18 +01:00
buildbot/vexp-code-patch-lint Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
9a4dfa425d
Fixed formatting.
Member

@blender-bot build

@blender-bot build
Pratik Borhade merged commit c056c58493 into main 2024-03-28 12:15:43 +01:00
Member

Merged, thanks for working on this 🙂

Merged, thanks for working on this 🙂
Author
Contributor

My pleasure :)

My pleasure :)
Harley Acheson added this to the User Interface project 2024-03-28 15:51:09 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#112688
No description provided.