Page MenuHome

Add multi-object mode for UV_OT_reset, UV_OT_cube_project, UV_OT_cylinder_project, UV_OT_sphere_project

Authored by Cyril Bissey (Cykyrios) on May 10 2018, 3:59 PM.



First diff here, I modified several operators but realized a bit too late I should have separated the tasks.

The following operators are ported to Multi-Object Editing:

  • UV_OT_reset
  • UV_OT_cube_project
  • UV_OT_cylinder_project
  • UV_OT_sphere_project

Additionally, UV_OT_unwrap is already compatible with multi-object editing.

If there is a way to have these tasks as separate revisions, I will do that ASAP.

Diff Detail

rB Blender
multi-object-uv-tools (branched from blender2.8)
Build Status
Buildable 1530
Build 1530: arc lint + arc unit

Event Timeline

Falk David (Fulk33) retitled this revision from Add multi-object mode for UV_OT_reset to Add multi-object mode for UV_OT_reset, UV_OT_cube_project, UV_OT_cylinder_project, UV_OT_sphere_project.May 10 2018, 9:55 PM
Dalai Felinto (dfelinto) requested changes to this revision.May 11 2018, 12:55 PM

We should have the patches submitted individually. That said, a few comments:

  • RNA_.*_get should all be outside the for loops.
  • Move the { of the for loop to the same line as the for with a space between them (only reason to break this rule in the sample patch was to make the patch simpler, to prevent change the indentation of the code).
  • Loop should be skipped (continue) when no element is selected. If there is no equivalent to totvertsel/edge/face for UV data it needs to be added (as a separated patch), before anything else.
This revision now requires changes to proceed.May 11 2018, 12:55 PM

I will close this revision and open new ones for each operator, but before I do that, I have a question about your last point: when you say "element" here, do you mean faces from the 3D view, or vertices/edges/faces from the UV editor?
The former should work with totfacesel, but I don't think the latter is necessary for operators in the unwrap menu, since they work with selection from the 3D view. They may be needed for other operators though, I'll have a look and see if I can find something.

I'm closing this revision as I created new ones for each operator, which can be found below:

  • UV_OT_reset: D3343
  • UV_OT_sphere_project: D3344
  • UV_OT_cylinder_project: D3345
  • UV_OT_cube_project: D3346