Page MenuHome

Stamp: Make drawing stamp labels optional.
AbandonedPublic

Authored by Sybren A. Stüvel (sybren) on Aug 31 2016, 6:53 PM.

Details

Summary

When using metadata stamping, it's often handy to have "Camera" in front of the camera name, "Marker" in front of the marker text, etc., but sometimes those get in the way. This patch allows an artist (in this case: @Hjalti Hjálmarsson (hjalti)) to turn those labels on/off.

already done with Sergey's feedback:
One thing that still needs work, and I would love some feedback on, is the initialisation of the flag. With the code as-is, it's defaulting to "off", whereas the behaviour before this patch is "on". Is there any way to initialise to "on" if not yet set?

Alternatively, is there a way to store the negative value in DNA while keeping the current behaviour in Python? I want to keep the Python/UI side positive (so "draw/not draw" instead of "hide/not hide").

still left to discuss:
We should look at D1856 as well, and with ppl from the UI team determine what the best approach would be.

Diff Detail

Repository
rB Blender
Branch
temp-sybren-stamp-labels-optional (branched from master)
Build Status
Buildable 139
Build 139: arc lint + arc unit

Event Timeline

Sybren A. Stüvel (sybren) retitled this revision from to Stamp: Make drawing stamp labels optional..
Sybren A. Stüvel (sybren) updated this object.
Sybren A. Stüvel (sybren) set the repository for this revision to rB Blender.

Just technical review.

The thing here is that we also have D1856, so how do we make it all work nice and flexible without interface clutter.

Time to summon @Julian Eisel (Severin)!

source/blender/blenkernel/intern/image.c
1629

Move to the callee function.

source/blender/makesrna/intern/rna_scene.c
6293

You RNA_def_property_boolean_negative_sdna() and negative meaning of the flag, so old files keep working.

Sybren A. Stüvel (sybren) edited edge metadata.
Sybren A. Stüvel (sybren) updated this object.
  • Stamp: Make drawing stamp labels optional.
  • Included feedback from Sergey
Sybren A. Stüvel (sybren) marked 2 inline comments as done.Sep 1 2016, 9:58 AM
Sybren A. Stüvel (sybren) updated this object.
  • Moved "Draw labels" checkbox so that it's next to "font size".

Discussed with @venomgfx (who is in the UI team) and @Hjalti Hjálmarsson (hjalti). Executive summary:

D1856 is still very nice, and could be used instead of this patch, but:

  1. it would loose the positioning of the fields (timecode in bottom left, filename top left, etc), and put everything in one blob of text.
  2. it makes it hard to enable/disable specific fields, as you can't use the checkboxes any more.
  3. You have to know all Python paths to all the data you need, instead of just checking boxes.
  4. You have to know Python string formatting stuff.
  5. It still adds a checkbox to enable/disable formatting.

We moved the "Draw labels" checkbox to a better spot, one that's approved by @venomgfx.

Already in master.