UV: Migrate UV packing from Editor to bf_geometry. #105212

Merged
Chris Blackbourn merged 4 commits from Chris_Blackbourn/blender:uv-pack-migrate into main 2023-02-27 22:41:22 +01:00

No response

_No response_
Chris Blackbourn added 1 commit 2023-02-26 01:34:39 +01:00
Chris Blackbourn requested review from Campbell Barton 2023-02-26 01:34:55 +01:00
Hans Goudey reviewed 2023-02-26 14:47:23 +01:00
Hans Goudey left a comment
Member

I think it's worth cleaning up the public header a little bit, just noticed a few small things.

I think it's worth cleaning up the public header a little bit, just noticed a few small things.
@ -0,0 +10,4 @@
#include "BLI_vector.hh"
#include "DNA_vec_types.h"
typedef enum {
Member

Typedef typedef isn't necessary in C++, you can just use enum Name {

Typedef `typedef` isn't necessary in C++, you can just use `enum Name {`
Chris_Blackbourn marked this conversation as resolved
@ -0,0 +44,4 @@
public:
rctf bounds_rect;
};
Member

Is extern necessary here? I wouldn't think so.

Is `extern` necessary here? I wouldn't think so.
Chris_Blackbourn marked this conversation as resolved
@ -0,0 +45,4 @@
rctf bounds_rect;
};
extern BoxPack *pack_islands(const blender::Vector<PackIsland *> &island_vector,
Member

Pass a Span rather than a const reference to a vector, so the function doesn't depend on which container the elements are stored in.

Pass a `Span` rather than a const reference to a vector, so the function doesn't depend on which container the elements are stored in.
Chris_Blackbourn marked this conversation as resolved
@ -0,0 +46,4 @@
};
extern BoxPack *pack_islands(const blender::Vector<PackIsland *> &island_vector,
const struct UVPackIsland_Params &params,
Member

The struct keyword is unnecessary here

The `struct` keyword is unnecessary here
Chris_Blackbourn marked this conversation as resolved
Chris Blackbourn added 1 commit 2023-02-27 01:16:40 +01:00
Author
Member

@HooglyBoogly Nice spotting! Have updated as 496567acce

If you see anything else, feel free to edit inline or post here.

@HooglyBoogly Nice spotting! Have updated as 496567acce8c If you see anything else, feel free to edit inline or post here.
Campbell Barton approved these changes 2023-02-27 12:10:09 +01:00
Hans Goudey requested changes 2023-02-27 14:52:23 +01:00
Hans Goudey left a comment
Member

Noticed one more thing. Also, could you press "Resolve Conversation" on my comments that you've addressed? Thanks.

Noticed one more thing. Also, could you press "Resolve Conversation" on my comments that you've addressed? Thanks.
@ -0,0 +9,4 @@
#include "BLI_boxpack_2d.h"
#include "BLI_span.hh"
#include "DNA_vec_types.h"
Member

Like the other public headers in the geometry module, I think this should all be in the blender::geometry namespace. That's what's used here instead of the GEO prefix that would be used for C code. It also means the blender:: namespace doesn't have to be specified every time in the new cc file.

Like the other public headers in the geometry module, I think this should all be in the `blender::geometry` namespace. That's what's used here instead of the `GEO` prefix that would be used for C code. It also means the `blender::` namespace doesn't have to be specified every time in the new cc file.
Chris_Blackbourn marked this conversation as resolved
Chris Blackbourn added 1 commit 2023-02-27 22:04:13 +01:00
6f011576f0 UV: Migrate UV packing from Editor to bf_geometry.
Move to blender::geometry namespace.
Hans Goudey approved these changes 2023-02-27 22:06:50 +01:00
Hans Goudey left a comment
Member

Looks good now, thanks.

Looks good now, thanks.
@ -0,0 +18,4 @@
};
/** See also #UnwrapOptions. */
struct UVPackIsland_Params {
Member

I'd put these in the namespace too, for consistency, not a big deal though.

I'd put these in the namespace too, for consistency, not a big deal though.
Chris_Blackbourn marked this conversation as resolved
Chris Blackbourn added 1 commit 2023-02-27 22:36:16 +01:00
809d7a61a3 UV: Migrate UV packing from Editor to bf_geometry.
Add comments and fix minor warnings.
Chris Blackbourn merged commit cb1af1fbd9 into main 2023-02-27 22:41:22 +01:00
Chris Blackbourn deleted branch uv-pack-migrate 2023-02-27 22:41:23 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#105212
No description provided.