Page MenuHome

Multi object editing - UV_OT_snap_selected
AbandonedPublic

Authored by Alan Troth (Al) on May 22 2018, 9:12 PM.

Details

Summary

Multi object editing - UV_OT_snap_selected

Diff Detail

Repository
rB Blender
Branch
UV_OT_snap_selected (branched from blender2.8)
Build Status
Buildable 1806
Build 1806: arc lint + arc unit

Event Timeline

Alan Troth (Al) edited the summary of this revision. (Show Details)May 22 2018, 10:12 PM

Hi Alan,

is there a reason why you added ED_uvedit_minmax_multi(..) instead of replacing ED_uvedit_minmax(..) ? ED_uvedit_minmax is now redundant.

I'm asking because I'd like to port UV_OT_align and UV_OT_weld and I'm wondering if I should do the same.

Best,
Habib.

EDIT: I can see that you probably did so in order to keep other (unfinished) operators running. But do we still want to keep both once all operators have been ported?

Hi Alan,
is there a reason why you added ED_uvedit_minmax_multi(..) instead of replacing ED_uvedit_minmax(..) ? ED_uvedit_minmax is now redundant.
I'm asking because I'd like to port UV_OT_align and UV_OT_weld and I'm wondering if I should do the same.
Best,
Habib.
EDIT: I can see that you probably did so in order to keep other (unfinished) operators running. But do we still want to keep both once all operators have been ported?

Hi Habib

You're right I kept the original in case other code uses it. I don't remember whether I checked to see if it was still used or not.

I'm still fairly new to blender code but I think if I was sure the code was no longer used I'd remove it. I hope that helps.

Just so you know, I'm currently working on UV_OT_remove_doubles

  • Removed white space.
  • Added comment for clarifaction.
  • Changed 'if (!changed)' flow to a 'if (changed)' flow.
Alan Troth (Al) edited the summary of this revision. (Show Details)Jul 5 2018, 9:27 PM
Dalai Felinto (dfelinto) requested changes to this revision.Sep 4 2018, 11:02 PM
Dalai Felinto (dfelinto) added inline comments.
source/blender/editors/uvedit/uvedit_ops.c
3609

For consistency sake I would say call this objects?

3618

You are leaving the function without freeing `objects_edit, this will lead to memory leak.

3653

Why MEM_SAFE_FREE instead of MEM_freeN?

3655

return FINISHED only if changed. We are doing this for other operators, look for changed_multi in the code.

This revision now requires changes to proceed.Sep 4 2018, 11:02 PM

Thanks for the patch. Committed a slightly different version on rB92f70c45eae188e0ecb754d03d61e0a05b80175e.
Main change is the offset calculation handled once instead of once per object.