Page MenuHome

Multi object editing - UV_OT_stitch
ClosedPublic

Authored by Alan Troth (Al) on Jul 26 2018, 1:35 AM.

Details

Summary

Multi object editing - UV_OT_stitch

A little info to help with reading the diff:
In single object editing, struct StitchState held information about the objects uvs and also editor options (e.g. Snap). In multi object editing, struct StitchState now holds information for an object (UVs), while editing options and a list of struct StitchStates are in a new struct struct StitchStateColl (stitch state collection).

Many of the changes in this diff are related to adding struct StitchStateColl to the code.

  • It's been added to function definitions parameter lists.
  • It's been added to parameters when calling functions.
  • It's now the place to read editing options.

I've tried not to change the names of functions that act on a single StitchState, for functions that act on all states I've add '_all' to the end the relevant names. e.g.

static int stitch_process_data(StitchStateColl *stitch_coll, StitchState *state, Scene *scene, int final)

and

static int stitch_process_data_all(StitchStateColl *stitch_coll, Scene *scene, int final)

Missing RNA state save:
I couldn't figure out how to save the list of selected vertices for each object using RNA. I understand how a single object is saved but multiple objects is beyond me. I'll need a bit of guidance and then I (or someone) can create a new diff for that.

Followup Diffs.

I'll do a few followup diffs for problems (or small changes) that were also in the original version of this file.

  • Fix potential memory leaks.
  • Better interaction with small 'change options' dialogue that appears when the user finishes editing.
  • Change 'limit' option from manhattan distance to the proper distance (maybe?)

Diff Detail

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

Event Timeline

Campbell Barton (campbellbarton) edited the summary of this revision. (Show Details)

Reformat (patch messed w/ formatting)

Alan Troth (Al) planned changes to this revision.Aug 7 2018, 5:59 PM

Todo: fix infinite loop if operator used when no vertices are selected.

Sorry about the formatting. I'll catch it before it happens again.

  • Infinite loop fix when there are no stitchable uvs.
  • Renamed island_stops variable to something more descriptive.
This revision is now accepted and ready to land.Aug 8 2018, 6:19 AM