Cleanup: Move usd headers to C++ #117897

Merged
Bastien Montagne merged 2 commits from mont29/blender:tmp-usd-headers-to-cpp into main 2024-02-07 09:42:32 +01:00

Move usd.h to usd.hh and makes it using the blender::io::usd namespace.

Also rename original usd.hh to usd_private.hh.
This header is for 'internal' USD code only (also needed by the hydra code), and uses references to the USD library itself, so its previous name was a bit too generic.

Move `usd.h` to `usd.hh` and makes it using the `blender::io::usd` namespace. Also rename original `usd.hh` to `usd_private.hh`. This header is for 'internal' USD code only (also needed by the hydra code), and uses references to the USD library itself, so its previous name was a bit too generic.
Bastien Montagne added the
Module
Pipeline, Assets & IO
Interest
USD
labels 2024-02-06 14:25:04 +01:00
Bastien Montagne added this to the USD project 2024-02-06 14:25:11 +01:00
Bastien Montagne requested review from Jesse Yurkovich 2024-02-06 14:25:33 +01:00
Bastien Montagne requested review from Hans Goudey 2024-02-06 14:25:34 +01:00
Bastien Montagne requested review from Michael Kowalski 2024-02-06 14:25:34 +01:00
Author
Owner

@blender-bot build

@blender-bot build
Hans Goudey approved these changes 2024-02-06 14:51:14 +01:00
Hans Goudey left a comment
Member

usd_private.hh

Aren't these usually called "intern"?

io::usd::USD_

Eventually the "USD_" prefix should be removed from these functions, since it's redundant with the namespace. Doesn't have to be now though.

> `usd_private.hh` Aren't these usually called "intern"? > `io::usd::USD_` Eventually the "USD_" prefix should be removed from these functions, since it's redundant with the namespace. Doesn't have to be now though.
Author
Owner

usd_private.hh

Aren't these usually called "intern"?

Depends... In RNA they are called _internal, in BKE they are called _private. Here I chose private because this header is also used by areas of code outside of io/usd (mainly render/hydra), so it's not that internal?

io::usd::USD_

Eventually the "USD_" prefix should be removed from these functions, since it's redundant with the namespace. Doesn't have to be now though.

Yes I noticed that, but indeed would rather keep this renaming cleanup for later.

> > `usd_private.hh` > > Aren't these usually called "intern"? Depends... In RNA they are called `_internal`, in BKE they are called `_private`. Here I chose `private` because this header is also used by areas of code outside of `io/usd` (mainly `render/hydra`), so it's not that internal? > > `io::usd::USD_` > > Eventually the "USD_" prefix should be removed from these functions, since it's redundant with the namespace. Doesn't have to be now though. Yes I noticed that, but indeed would rather keep this renaming cleanup for later.
Bastien Montagne force-pushed tmp-usd-headers-to-cpp from 1d8f597bd1 to 1605156193 2024-02-06 15:21:22 +01:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Hans Goudey changed title from tmp-usd-headers-to-cpp to Cleanup: Move usd headers to C++ 2024-02-06 15:26:41 +01:00
Bastien Montagne force-pushed tmp-usd-headers-to-cpp from 1605156193 to f59c909e9b 2024-02-06 16:10:31 +01:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Jesse Yurkovich reviewed 2024-02-06 18:45:27 +01:00
@ -1,18 +1,216 @@
/* SPDX-FileCopyrightText: 2023 Blender Authors
/* SPDX-FileCopyrightText: 2019 Blender Authors

Accidental time-travel.

Accidental time-travel.
Author
Owner

Actually not! This file content was in usd.h before.

The 2023 copyright is for the file now named usd_private.hh (which used to be named usd.hh)

Bummer that gitea does not really represent the renamings, but git log seems to correctly handle them. This is also why there are two commits in this PR.

Actually not! This file content was in `usd.h` before. The 2023 copyright is for the file now named `usd_private.hh` (which used to be named `usd.hh`) Bummer that gitea does not really represent the renamings, but git log seems to correctly handle them. This is also why there are two commits in this PR.

Oh I see. Alright, if these changes aren't sufficient enough for a year bump, then yeah the dates are fine then.

Oh I see. Alright, if these changes aren't sufficient enough for a year bump, then yeah the dates are fine then.
Jesse Yurkovich approved these changes 2024-02-06 18:56:52 +01:00
Michael Kowalski approved these changes 2024-02-07 02:02:52 +01:00
Michael Kowalski left a comment
Member

The changes look good to me! Thank you!

The changes look good to me! Thank you!
Michael Kowalski approved these changes 2024-02-07 02:05:03 +01:00
Bastien Montagne merged commit 7ca62fa54e into main 2024-02-07 09:42:32 +01:00
Bastien Montagne deleted branch tmp-usd-headers-to-cpp 2024-02-07 09:42:35 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
Asset Browser Project
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
4 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#117897
No description provided.