Page MenuHome

Possible fix for T65824
AbandonedPublic

Authored by nBurn (nBurn) on Jun 22 2019, 9:12 AM.

Details

Summary

I'm taking a stab in the dark here, but it seems that a check may have been unintentionally dropped when fixing T60777.

This part of the code in "edbm_fill_grid_exec" was modified to fix the repeat last issue:

if ((op->flag & OP_IS_REPEAT) && RNA_property_is_set(op->ptr, prop_span)) {
  span = RNA_property_int_get(op->ptr, prop_span);
  span = min_ii(span, (clamp / 2) - 1);
  calc_span = false;
}

That change, in turn, prevented this check from happening before the else { block is reached. Adding this check back in before that else block seems to fix T65824

else if (RNA_property_is_set(op->ptr, prop_span)) {
  span = RNA_property_int_get(op->ptr, prop_span);
  span = min_ii(span, (clamp / 2) - 1);
  calc_span = false;
}
else {
  span = clamp / 4;
  calc_span = true;
}

The diff below was created with this as the most recent commit:
rB2642ba13b4639fc524bc77e30c112942cd3f5355

Diff Detail

Repository
rB Blender

Event Timeline

nBurn (nBurn) created this revision.Jun 22 2019, 9:12 AM
nBurn (nBurn) edited the summary of this revision. (Show Details)Jun 22 2019, 9:15 AM
nBurn (nBurn) edited the summary of this revision. (Show Details)
nBurn (nBurn) edited the summary of this revision. (Show Details)
nBurn (nBurn) edited the summary of this revision. (Show Details)
nBurn (nBurn) edited the summary of this revision. (Show Details)Jun 22 2019, 9:22 AM
nBurn (nBurn) edited the summary of this revision. (Show Details)Jun 22 2019, 9:31 AM

This would re-introduce the issue from T60777.

For this to work we'll need to add a new flag to detect 'Repeat Last', since this is a special case, unlike adjusting-the-last-operator repeat, the context may be different each time and why can't rely on property SKIP_SAVE not to store values for re-use.

This would re-introduce the issue from T60777.
For this to work we'll need to add a new flag to detect 'Repeat Last', since this is a special case, unlike adjusting-the-last-operator repeat, the context may be different each time and we can't rely on property SKIP_SAVE not to store values for re-use.

Interesting, this is a much more complex fix than I thought. I made my own test case to similar to that in T60777 when trying to debug the "span" option and repeat last worked. But when I just tried my fix again with the blend attached to that bug report and repeat last failed.

Thanks for looking into this, your commit appears to have fixed both T60777 and T65824.