Page MenuHome

UDIM: Move UDIM grid to the Overlay panel
ClosedPublic

Authored by Jesse Yurkovich (deadpin) on Jul 9 2021, 7:03 AM.
Tags
  • Restricted Project
Tokens
"Love" token, awarded by dulrich."Pterodactyl" token, awarded by Gavriel5578."Love" token, awarded by Schamph."Like" token, awarded by Fracture128."Like" token, awarded by JulienKaspar."Love" token, awarded by gilberto_rodrigues."Love" token, awarded by riouxr.

Details

Summary

This change moves the grid panel from the View tab up into the main
Overlay panel for a variety of reasons.

User and artist sentiment for this change has been positive as well[1]

Reasons to move to an Overlay include:

  • It's consistent with the grid options in the 3D viewport
  • Adds a toggle to show/hide the grid which is consistent with overlays in general
  • It can respond to the main Overlay show/hide toggle now as well
  • The grid has been drawn as an Overlay for quite some time already

The UI itself is parented under a "Guides" panel not only to align more
closely to what the 3D View does but to also provide room for future
additions. The 2021 GSoC UV Editing project has also introduced some
"grid" features that I believe can fit in nicely here.[2]

[1] https://devtalk.blender.org/t/the-udim-tile-grid-design-and-feedback-thread/20136
[2] https://devtalk.blender.org/t/gsoc-2021-uv-editor-improvements-weekly-reports/19060/16

New location

Existing location

Diff Detail

Repository
rB Blender
Branch
udim_grid_overlay (branched from master)
Build Status
Buildable 21077
Build 21077: arc lint + arc unit

Event Timeline

Jesse Yurkovich (deadpin) requested review of this revision.Jul 9 2021, 7:03 AM
Jesse Yurkovich (deadpin) created this revision.
Jesse Yurkovich (deadpin) planned changes to this revision.Jul 9 2021, 7:03 AM
Jesse Yurkovich (deadpin) edited the summary of this revision. (Show Details)
Jesse Yurkovich (deadpin) added a project: Restricted Project.

Setting to keep out of review queue for now. Will use as a discussion to see if this is worthwhile or not.

Update now that previous UDIM changes are in

  • Update from master with proper versioning
  • Update from master
  • Add dynamic grid options to the panel

Hi @Jesse Yurkovich (deadpin) ! Tested the patch and works fine for me.

There's one thing that I'm not sure about - Grid and Background are both hidden when Display Grid is off.
When Display Grid is off, I feel that users would expect the grid to disappear and the background to remain visible, since the names suggests that it would only affect the grid

Maybe 2 separate toggles - one for the grid and another for the background could be used.
Video demonstrating the above suggestion :

I'm mainly weary of adding more configuration options or complicating the UI, but I could do it if more folks think that way. In a similar vein though, why does the Custom grid need a toggle at all? Couldn't it just always be On and default to 8 subdivisions?

The default grid (with custom grid off) is actually subdividing based on the zoom level (similar to the 3D viewport). If you zoom in, the grid will subdivide into smaller divisions and vice versa when zooming out.
As per your suggestion, setting the custom grid default to 8 divisions and always enabled would mean that the grid won't subdivide anymore when zooming in (grid would become static).

@Jesse Yurkovich (deadpin) I agree that adding more options/toggles would complicate the UI.
My main concern is that the current toggle is also disabling the background, which I feel doesn't serve many use cases.
If other users think that the background is required, then perhaps it could be always enabled and a single toggle for the grid overlay would be sufficient.

Other than that, the current patch looks good to me

Hmm, alright, I'll add a Background option and then poke the thread on devtalk to see what the feedback ends up being.

How about this layout for the options (somewhat mimicking what the 3dviewport has):

I made the suggested change to allow toggling the background separately.

Additionally, I just noticed that the Image Overylay settings have their
own dedicated struct in rna now. Moved the new options there instead.
Older options should probably be moved as part of T81287.

  • Make it more apparent that the new overlays are UV edit mode only

@Jeroen Bakker (jbakker), @Siddhartha Jejurkar (sidd017) I believe this is ready for review now in some official capacity. If there might be some better folks to add let me know.

  • Update from master

During testing I saw that this option is also available for normal images. What might be a bit confusing as it's not clear (at least to me) what the benefit is of having a grid. Could be that this has been discussed and agreed to have. If so would like to see this in the patch description.

'Custom' is also confusing. In this case it is used to difference between adaptive and user defined subdivisions.
Perhaps we should call it show_user_subdivision and move grid+custom to the subdivision line so it is more clear where it belongs to.

If the 'Guides' are disabled we should not draw the other options to save some space (see 3d viewport)

source/blender/makesrna/intern/rna_space.c
5253

Perhaps it is better to call this 'show_guides'. The term background is technical and should be hidden to API users. For camera a similar option is available.

Jeroen Bakker (jbakker) requested changes to this revision.Jan 24 2022, 1:35 PM

Sorry for the late reply. I am fine with the functionality, think that the UI/UX could have some tweaks.

This revision now requires changes to proceed.Jan 24 2022, 1:35 PM

During testing I saw that this option is also available for normal images. What might be a bit confusing as it's not clear (at least to me) what the benefit is of having a grid. Could be that this has been discussed and agreed to have. If so would like to see this in the patch description.

Oh, you're seeing it for normal images? Can you show me an example as I don't think that was intended.

'Custom' is also confusing. In this case it is used to difference between adaptive and user defined subdivisions.
Perhaps we should call it show_user_subdivision and move grid+custom to the subdivision line so it is more clear where it belongs to.

Agree, but I didn't want to change the naming -- can I break API in the middle of the 3.x series or is there a way to rename it without breaking scripts? See below for a middle-ground option at least from the UI perspective with a note at the very bottom for an alternate location.

If the 'Guides' are disabled we should not draw the other options to save some space (see 3d viewport)

Alright, can do, see below for how it could look.

For using 'show_guides' instead of 'show_grid_background' I suppose I can make this change. What would you display in the UI as the Panel.bl_label is already called Guides?

Here's a sequence of shots showing what it could look like if I skip drawing to save space now + trying to address the Custom confusion:

Overlays offOverlays onBackground onGrid onCustom on

If Custom is still too confusing in that location, I can go back to the following layout I think where it is completely separated and placed below the Shape controls. What do you think?

  • Merge master for versioning changes
  • Hide elements until they're needed

@Jesse Yurkovich (deadpin) We are getting closer. Think we should ask the UI/UX department to see how to finetune the overlay a bit better so it matches the UI/UX guidelines.
@Pablo Vazquez (pablovazquez) can you help out?

Hi, finally got time to test this patch.

My first impression was that the settings could be simplified.

  • Background checkbox renamed to Grid (like in the 3D Viewport), toggling it hides all guides (grid+borders)
  • A single row for:
    • Checkbox toggles subdivisions (which in practice looks like toggling between only-borders or grid)
    • The slider controls the amount of subdivisions (default is 8, same as the non-custom grid has)
  • Rename Shape to Tiles X, Y, it's a bit more descriptive.

This way there's no need for a dedicated Custom Subdivisions boolean.

Before:

After (quick mockup):

Part of the code I tweaked for the mockup.

def draw(self, context):
    layout = self.layout

    sima = context.space_data
    overlay = sima.overlay
    uvedit = sima.uv_editor

    layout.active = overlay.show_overlays

    row = layout.row()
    row_el = row.column()
    row_el.ui_units_x = 15
    row_el.prop(overlay, "show_grid_background", text="Grid")

    if overlay.show_grid_background:
        layout.use_property_split = True
        col = layout.column(align=False, heading="Subdivisions")
        col.use_property_decorate = False

        row = col.row(align=True)
        sub = row.row(align=True)
        sub.prop(overlay, "show_grid", text="")
        sub = sub.row(align=True)
        sub.active = overlay.show_grid_background
        sub.prop(uvedit, "custom_grid_subdivisions", text="")

        row = layout.row()
        row.use_property_split = True
        row.use_property_decorate = False
        row.prop(uvedit, "tile_grid_shape", text="Tiles X")

@Pablo Vazquez (pablovazquez) Hey, thanks for taking a look. However, I think you hit the same confusing part that I did. The Custom grid is different than the Default grid. The default grid will adaptively subdivide based on the zoom level whereas the Custom grid will not. So there still needs to be an option to switch between one or the other. At least, that's my understanding.

@Pablo Vazquez (pablovazquez) Hey, thanks for taking a look. However, I think you hit the same confusing part that I did. The Custom grid is different than the Default grid. The default grid will adaptively subdivide based on the zoom level whereas the Custom grid will not. So there still needs to be an option to switch between one or the other. At least, that's my understanding.

As discussed on blender.chat, a small change to my mockup could cover this and all cases, I think.

If the "Subdivisions" label became "Fixed Subdivisions":

Then the following is possible:

  • The "Grid" checkbox toggles the background border and grid shape.
  • "Fixed Subdivisions" checkbox toggles between adaptive and fixed grid.
  • Showing "only-borders" can be achieved by setting fixed subdivisions to 0.

Otherwise we could have an enum with these (Adaptive, Fixed, Only Borders, No Grid), but I think the above looks cleaner and covers most cases discussed.

@Pablo Vazquez (pablovazquez) I've updated the patch with your suggestions. Take a look when you have the time.

  • Merge after latest changes
  • Merge master
  • Accomodate custom grid into overlay panel
  • Merge master
  • Add dynamic grid options to the panel
  • Add a separate background option
  • Make it more apparent that the new overlays are UV edit mode only
  • Fully hide elements until they're needed
  • Tweak the hide logic
  • Feedback
  • Merge
  • Bump version

Code is good. Adding Pablo as blocking reviewer.

Perfect! Thanks for working on it @Jesse Yurkovich (deadpin)!

This revision is now accepted and ready to land.Apr 7 2022, 8:16 PM

@Jeroen Bakker (jbakker) @Pablo Vazquez (pablovazquez) Thanks for the review you guys! Is this ok for bcon2 or should it wait?

This change can be included in blender 3.2