WIP: RNA: Initial step to make PointerRNA non-trivial. #123435

Draft
Bastien Montagne wants to merge 1 commits from mont29/blender:tmp-pointerrna-nontrivial into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.

For now, PointerRNA is made non-trivial by giving explicit default
values to its members. Most of the changes are fairly trivial.

The main change (besides the creation/deletion part) is the replacement
of memset by zero-initialized assignment (using {}).

This is a pre-requirement to work on adding RNA 'parent path' info to the pointers (see #122431).

Knows Issues/TODOs

  • BPY structs (like BPy_StructRNA and many more) store PointerRNA data, this will require quite some efforts: #124794.
For now, PointerRNA is made non-trivial by giving explicit default values to its members. Most of the changes are fairly trivial. The main change (besides the creation/deletion part) is the replacement of `memset` by zero-initialized assignment (using `{}`). This is a pre-requirement to work on adding RNA 'parent path' info to the pointers (see #122431). ## Knows Issues/TODOs * [ ] BPY structs (like `BPy_StructRNA` and many more) store `PointerRNA` data, this will require quite some efforts: #124794.
Author
Owner

@blender-bot build

@blender-bot build
Author
Owner

@JulianEisel you can find the 'new-created data assigned to MEM_freed void pointer' cases by searching for FIXME: MEM_new freed by MEM_freeN: in this PR. There are 5 currently, all in UI area (templates and layout).

@JulianEisel you can find the 'new-created data assigned to MEM_freed void pointer' cases by searching for `FIXME: MEM_new freed by MEM_freeN:` in this PR. There are 5 currently, all in UI area (templates and layout).
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from a265c51967 to 9b2bea84d4 2024-07-08 14:08:44 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 9b2bea84d4 to 1f405e0dda 2024-07-10 15:36:43 +02:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 1f405e0dda to 79b73d57e0 2024-07-12 17:00:10 +02:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 79b73d57e0 to d6477f17b4 2024-07-15 12:09:49 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from d6477f17b4 to b3b5f0e651 2024-07-15 16:58:59 +02:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from b3b5f0e651 to 62189c0c39 2024-07-15 18:30:23 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 62189c0c39 to a9d961abcf 2024-07-16 15:03:21 +02:00 Compare
Author
Owner

Found quite a few more invalid MEM_new/MEM_FreeN cases, and... a nice BPY nightmare! Currently investigating how to handle our now-non-trivial PointerRNA data in BPY types.

Found quite a few more invalid MEM_new/MEM_FreeN cases, and... a nice BPY nightmare! Currently investigating how to handle our now-non-trivial PointerRNA data in BPY types.
Author
Owner

@blender-bot build

@blender-bot build
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from a9d961abcf to 9491f63e5b 2024-08-06 15:16:38 +02:00 Compare
Author
Owner

@blender-bot build

@blender-bot build
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 9491f63e5b to 86287d4ca3 2024-08-08 12:16:07 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 86287d4ca3 to 30e4987931 2024-08-08 17:11:48 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 30e4987931 to 2bfe8dda44 2024-08-08 18:03:43 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 2bfe8dda44 to 095d1fe4e8 2024-08-10 17:55:57 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 095d1fe4e8 to 3deb10c9cb 2024-08-12 13:07:39 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 3deb10c9cb to e4bf11cecc 2024-08-12 20:04:04 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from e4bf11cecc to 0018eda360 2024-08-13 13:13:36 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 0018eda360 to 0ed3b4be55 2024-08-13 13:32:59 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 0ed3b4be55 to 616098d66b 2024-08-14 17:39:32 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 616098d66b to 3053aa5b8c 2024-08-16 10:36:18 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 3053aa5b8c to 224b1c5e3e 2024-08-16 11:00:49 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 224b1c5e3e to 912cd5b1bb 2024-08-16 15:18:06 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 912cd5b1bb to 83d163bb84 2024-08-16 16:18:15 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 83d163bb84 to 3136f3e982 2024-08-23 13:16:52 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 3136f3e982 to 1056c3d30d 2024-08-27 17:07:24 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 1056c3d30d to 90cbb78e7f 2024-08-27 17:07:43 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 90cbb78e7f to d5f2334246 2024-08-28 18:00:28 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from d5f2334246 to 84568cc2fd 2024-08-29 14:22:07 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 84568cc2fd to b7e8e2360c 2024-08-30 22:13:14 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from b7e8e2360c to 4cc7b213bd 2024-09-02 16:36:46 +02:00 Compare
Bastien Montagne force-pushed tmp-pointerrna-nontrivial from 4cc7b213bd to b86807141b 2024-09-02 17:51:41 +02:00 Compare
This pull request is marked as a work in progress.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u tmp-pointerrna-nontrivial:mont29-tmp-pointerrna-nontrivial
git checkout mont29-tmp-pointerrna-nontrivial
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
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
Viewport & EEVEE
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
1 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#123435
No description provided.