Page MenuHome

Overlays: Add Multires Levels info to Stats
Needs ReviewPublic

Authored by Pablo Dobarro (pablodp606) on Apr 28 2020, 11:13 PM.
Tokens
"100" token, awarded by Torrent."Like" token, awarded by cfnjrey."Burninate" token, awarded by andruxa696."Love" token, awarded by gilberto_rodrigues."Love" token, awarded by bnzs."Like" token, awarded by filibis."Like" token, awarded by Frozen_Death_Knight."Love" token, awarded by Rubens91."Love" token, awarded by johnsyed.

Details

Summary

This adds an extra line to the Statistics overlay to display the active
sculpt level and the total number of levels when there is a Multires
modifier in the object is in Sculpt Mode.

With the current UI for switching levels it does not make much sense,
but the idea is to combine this with D7560 in order to control Multires
sculpting directly from the viewport, the same way the remesher can be
controlled. In that case, it is usefully to know how many levels the
object has and in which level you are in.

Diff Detail

Repository
rB Blender
Branch
sculpt-multires-stats (branched from master)
Build Status
Buildable 7775
Build 7775: arc lint + arc unit

Event Timeline

Pablo Dobarro (pablodp606) requested review of this revision.Apr 28 2020, 11:13 PM
Campbell Barton (campbellbarton) requested changes to this revision.Apr 29 2020, 9:12 AM

Looks fine, some minor notes.

source/blender/editors/space_info/info_stats.c
463

Return args should use r_ prefix.

635–636

SNPRINTF can be used here.

This revision now requires changes to proceed.Apr 29 2020, 9:12 AM
Sergey Sharybin (sergey) requested changes to this revision.Apr 29 2020, 9:13 AM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/space_info/info_stats.c
463–480

No need to duplicate logic of looking for a multires modifier. It is implemented in get_multires_modifier.

635–636

BLI_snprintf

Pablo Dobarro (pablodp606) marked 4 inline comments as done.
  • Review Update

Why somebody need to know amount of vertices or edges in multires? Really?

Why somebody need to know amount of vertices or edges in multires? Really?

This is not what's happening here.
Read again.

@Regnas (Regnas) done it. And can`t understand, what you want to say.
There is no info in the posts, but I see in the code, that new info is just append to existing.
You are right.

Campbell Barton (campbellbarton) requested changes to this revision.May 4 2020, 7:08 AM
Campbell Barton (campbellbarton) added inline comments.
source/blender/editors/space_info/info_stats.c
471–472

No need for parenthesis on assignment.

635–636

SNPRINTF avoids redundant repetition here.

This revision now requires changes to proceed.May 4 2020, 7:08 AM
Pablo Dobarro (pablodp606) marked 2 inline comments as done.
  • Review update

I don't see any outstanding issues with this change. Except that the mentioned D7560: Object: Switch Subdivision Level operator is still under review, so this patch has still limited value. I added D7560 as parent to this change to reflect that