MeasureIt: measurements not appearing on all layers an object exists on
Details
Diff Detail
- Repository
- rBA Blender Add-ons
Event Timeline
I tested and can confirm this fixes the bug from T53766. This change looks fine to me. but I think this might be cleaner \ easier to follow:
if myobj.layers[x] is True and x in layers:
op = myobj.MeasureGenerator[0]
draw_segments(context, myobj, op, region, rv3d)
breakYour thoughts?
@nBurn (nBurn) : agree, commited like rBAdc6704ab42317256a0cad14728f275ee542f9904
thx for having a look
I forgot MeasureIt runs continuously when the add-on is enabled and measurements are set to "Show". That's why I think I originally left this as two separate statements than using boolean logic to join them as I was not sure how Python handled boolean logic behind the scenes.
@nBurn (nBurn): left me nervous :) , but checked here --> Short-circuit evaluation should apply for pythons and
@Philipp Oeser (lichtwerk) I thought I remembered reading that Python does 1 or 2 additional operations behind the scenes somewhere, but I can't remember the details. I didn't see any significant change in performance with this hastily written test code though, so I say leave the last commit as is. :)