Cleanup: Use const char * for layer names in collada exporter #104585

Merged
Martijn Versteegh merged 3 commits from Baardaap/blender:constlayername_collada into main 2023-02-11 01:13:40 +01:00

CustomData layer names should not be written except via the CustomData
api. Therefore use const char * instead of char * when referencing the
layer name.

CustomData layer names should not be written except via the CustomData api. Therefore use const char * instead of char * when referencing the layer name.
Martijn Versteegh added the
Interest
Collada
label 2023-02-10 19:05:57 +01:00
Martijn Versteegh added 1 commit 2023-02-10 19:05:59 +01:00
CustomData layer names should not be written except via the CusomData
api. Therefore use const char * instead of char * when referencing the
layer name.
Martijn Versteegh added 1 commit 2023-02-10 19:06:23 +01:00
Hans Goudey reviewed 2023-02-10 19:28:30 +01:00
@ -120,3 +120,3 @@
}
char *bc_CustomData_get_active_layer_name(const CustomData *data, int type)
const char *bc_CustomData_get_active_layer_name(const CustomData *data, int type)
Member

I think this has an equivalent in CustomData_get_active_layer_name these days BTW

I think this has an equivalent in `CustomData_get_active_layer_name` these days BTW
Author
Member

I could port it to that. I wasn't really looking into it. Just adding consts to prevent writing to the name ;-)

I could port it to that. I wasn't really looking into it. Just adding consts to prevent writing to the name ;-)
Member

Just adding consts to prevent writing to the name ;-)

I'm not even sure that sort of change needs review then. Just adding const is not controversial at all I'd expect, in the vast majority of cases anyway.

>Just adding consts to prevent writing to the name ;-) I'm not even sure that sort of change needs review then. Just adding const is not controversial at all I'd expect, in the vast majority of cases anyway.
Author
Member

I'm in no way experienced enough to know what needs review and what doesn't :-D. I play it safe.

I'm in no way experienced enough to know what needs review and what doesn't :-D. I play it safe.
Hans Goudey approved these changes 2023-02-11 00:56:59 +01:00
Hans Goudey left a comment
Member

Right, of course, that's a good approach! I'll accept this then, it seems quite reasonable to me.

Right, of course, that's a good approach! I'll accept this then, it seems quite reasonable to me.
Martijn Versteegh added 1 commit 2023-02-11 01:09:28 +01:00
Martijn Versteegh changed title from WIP: Cleanup: Use const char * for layer names in collada exporter to Cleanup: Use const char * for layer names in collada exporter 2023-02-11 01:09:37 +01:00
Martijn Versteegh merged commit 343bb4a5a3 into main 2023-02-11 01:13:40 +01:00
Martijn Versteegh deleted branch constlayername_collada 2023-02-11 01:13:40 +01:00
Sign in to join this conversation.
No reviewers
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
2 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#104585
No description provided.