Python: Rename legacy Grease Pencil types to Annotation

This renames the legacy Grease Pencil python types to what
they are used for now: Annotations!

## Updated types
| Before | After |
| --- | --- |
| `bpy.types.GPencilStrokePoint` | `bpy.types.AnnotationStrokePoint` |
| `bpy.types.GPencilStroke` | `bpy.types.AnnotationStroke` |
| `bpy.types.GPencilFrame` | `bpy.types.AnnotationFrame` |
| `bpy.types.GPencilFrames` | `bpy.types.AnnotationFrames` |
| `bpy.types.GPencilLayer` | `bpy.types.AnnotationLayer` |
| `bpy.types.GPencilLayers` | `bpy.types.AnnotationLayers` |
| `bpy.types.GreasePencil` | `bpy.types.Annotation` |
| `bpy.types.BlendDataGreasePencils` | `bpy.types.BlendDataAnnotations` |

## Updated properties
| Before | After |
| --- | --- |
| `bpy.data.grease_pencils` | `bpy.types.annotations` |
| `MovieClip.grease_pencil` | `MovieClip.annotation` |
| `NodeTree.grease_pencil` | `NodeTree.annotation` |
| `Scene.grease_pencil` | `Scene.annotation` |
| `SpaceImageEditor.grease_pencil` | `SpaceImageEditor.annotation` |
| `SpaceSequenceEditor.grease_pencil` | `SpaceSequenceEditor.annotation` |
| `MovieTrackingTrack.grease_pencil` | `MovieTrackingTrack.annotation` |

Pull Request: https://projects.blender.org/blender/blender/pulls/142236
This commit is contained in:
Falk David
2025-07-18 12:57:01 +02:00
committed by Falk David
parent 42fbb6149c
commit 20383e4d82
18 changed files with 66 additions and 67 deletions

View File

@@ -263,12 +263,12 @@ def fake_main():
bpy.types.Operator = Operator
# ID Subclasses
bpy.types.Annotation = type("Annotation", (), {})
bpy.types.Armature = type("Armature", (), {})
bpy.types.Brush = type("Brush", (), {})
bpy.types.Brush.bl_rna = NewAttr("bpy.types.Brush.bl_rna", "bl_rna")
bpy.types.Camera = type("Camera", (), {})
bpy.types.Curve = type("Curve", (), {})
bpy.types.GreasePencil = type("GreasePencil", (), {})
bpy.types.Lattice = type("Lattice", (), {})
bpy.types.Light = type("Light", (), {})
bpy.types.Material = type("Material", (), {})
@@ -383,7 +383,7 @@ def fake_runtime():
bpy.data.movieclips = ()
bpy.data.armatures = ()
bpy.data.particles = ()
bpy.data.grease_pencils = ()
bpy.data.annotations = ()
bpy.data.cache_files = ()
bpy.data.workspaces = ()