diff --git a/scripts/startup/bl_ui/properties_grease_pencil_common.py b/scripts/startup/bl_ui/properties_grease_pencil_common.py index e77103c2e74..7a034706c66 100644 --- a/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -304,7 +304,7 @@ class AnnotationDataPanel: return row = layout.row() - row.template_ID(gpd_owner, "grease_pencil", new="gpencil.annotation_add", unlink="gpencil.data_unlink") + row.template_ID(gpd_owner, "annotation", new="gpencil.annotation_add", unlink="gpencil.data_unlink") # List of layers/notes. if gpd and gpd.layers: diff --git a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc index 80f233364a1..3b352830935 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_rna.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_rna.cc @@ -273,7 +273,7 @@ RNANodeIdentifier RNANodeQuery::construct_node_identifier(const PointerRNA *ptr, } else if (RNA_struct_is_a(ptr->type, &RNA_Mesh) || RNA_struct_is_a(ptr->type, &RNA_Modifier) || RNA_struct_is_a(ptr->type, &RNA_Spline) || RNA_struct_is_a(ptr->type, &RNA_TextBox) || - RNA_struct_is_a(ptr->type, &RNA_GPencilLayer) || + RNA_struct_is_a(ptr->type, &RNA_AnnotationLayer) || RNA_struct_is_a(ptr->type, &RNA_LatticePoint) || RNA_struct_is_a(ptr->type, &RNA_MeshUVLoop) || RNA_struct_is_a(ptr->type, &RNA_MeshLoopColor) || diff --git a/source/blender/editors/animation/anim_channels_defines.cc b/source/blender/editors/animation/anim_channels_defines.cc index 9f0f5d30a53..c0176b9c0bd 100644 --- a/source/blender/editors/animation/anim_channels_defines.cc +++ b/source/blender/editors/animation/anim_channels_defines.cc @@ -3790,7 +3790,7 @@ static void acf_gpl_name_legacy(bAnimListElem *ale, char *name) static bool acf_gpl_name_prop_legacy(bAnimListElem *ale, PointerRNA *r_ptr, PropertyRNA **r_prop) { if (ale->data) { - *r_ptr = RNA_pointer_create_discrete(ale->id, &RNA_GPencilLayer, ale->data); + *r_ptr = RNA_pointer_create_discrete(ale->id, &RNA_AnnotationLayer, ale->data); *r_prop = RNA_struct_name_property(r_ptr->type); return (*r_prop != nullptr); @@ -6429,7 +6429,7 @@ void ANIM_channel_draw_widgets(const bContext *C, bGPDlayer *gpl = static_cast(ale->data); /* Create the RNA pointers. */ - ptr = RNA_pointer_create_discrete(ale->id, &RNA_GPencilLayer, ale->data); + ptr = RNA_pointer_create_discrete(ale->id, &RNA_AnnotationLayer, ale->data); PointerRNA id_ptr = RNA_id_pointer_create(ale->id); int icon; diff --git a/source/blender/editors/screen/screen_context.cc b/source/blender/editors/screen/screen_context.cc index 384ab801729..ba99b013c54 100644 --- a/source/blender/editors/screen/screen_context.cc +++ b/source/blender/editors/screen/screen_context.cc @@ -847,7 +847,7 @@ static eContextResult screen_ctx_active_annotation_layer(const bContext *C, bGPDlayer *gpl = BKE_gpencil_layer_active_get(gpd); if (gpl) { - CTX_data_pointer_set(result, &gpd->id, &RNA_GPencilLayer, gpl); + CTX_data_pointer_set(result, &gpd->id, &RNA_AnnotationLayer, gpl); return CTX_RESULT_OK; } } diff --git a/source/blender/editors/space_action/space_action.cc b/source/blender/editors/space_action/space_action.cc index 66ae36b5af3..5e0d7f9e707 100644 --- a/source/blender/editors/space_action/space_action.cc +++ b/source/blender/editors/space_action/space_action.cc @@ -445,9 +445,9 @@ static void saction_channel_region_message_subscribe(const wmRegionMessageSubscr &RNA_Keyframe, &RNA_FCurveSample, - &RNA_GreasePencil, /* Grease Pencil */ - &RNA_GPencilLayer, - &RNA_GPencilFrame, + &RNA_Annotation, /* Grease Pencil */ + &RNA_AnnotationLayer, + &RNA_AnnotationFrame, }; for (int i = 0; i < ARRAY_SIZE(type_array); i++) { diff --git a/source/blender/editors/space_buttons/buttons_context.cc b/source/blender/editors/space_buttons/buttons_context.cc index a00905369e5..67abb6028eb 100644 --- a/source/blender/editors/space_buttons/buttons_context.cc +++ b/source/blender/editors/space_buttons/buttons_context.cc @@ -1166,7 +1166,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, return CTX_RESULT_OK; } if (CTX_data_equals(member, "gpencil")) { - set_pointer_type(path, result, &RNA_GreasePencil); + set_pointer_type(path, result, &RNA_Annotation); return CTX_RESULT_OK; } if (CTX_data_equals(member, "grease_pencil")) { diff --git a/source/blender/editors/space_outliner/outliner_draw.cc b/source/blender/editors/space_outliner/outliner_draw.cc index a7974c20f62..eef8dfb648a 100644 --- a/source/blender/editors/space_outliner/outliner_draw.cc +++ b/source/blender/editors/space_outliner/outliner_draw.cc @@ -874,11 +874,11 @@ static void namebutton_fn(bContext *C, void *tsep, char *oldname) BLI_uniquename( &gpd->layers, gpl, "GP Layer", '.', offsetof(bGPDlayer, info), sizeof(gpl->info)); - WM_msg_publish_rna_prop(mbus, &gpd->id, gpl, GPencilLayer, info); + WM_msg_publish_rna_prop(mbus, &gpd->id, gpl, AnnotationLayer, info); DEG_id_tag_update(&gpd->id, ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, gpd); DEG_id_tag_update(tselem->id, ID_RECALC_SYNC_TO_EVAL); - undo_str = "Rename Grease Pencil Layer"; + undo_str = "Rename Annotation Layer"; break; } case TSE_GREASE_PENCIL_NODE: { diff --git a/source/blender/makesrna/intern/rna_ID.cc b/source/blender/makesrna/intern/rna_ID.cc index 1beaf1fd162..ad3c4880ed6 100644 --- a/source/blender/makesrna/intern/rna_ID.cc +++ b/source/blender/makesrna/intern/rna_ID.cc @@ -382,7 +382,7 @@ short RNA_type_to_ID_code(const StructRNA *type) if (base_type == &RNA_Curve) { return ID_CU_LEGACY; } - if (base_type == &RNA_GreasePencil) { + if (base_type == &RNA_Annotation) { return ID_GD_LEGACY; } if (base_type == &RNA_GreasePencilv3) { @@ -503,7 +503,7 @@ StructRNA *ID_code_to_RNA_type(short idcode) case ID_CU_LEGACY: return &RNA_Curve; case ID_GD_LEGACY: - return &RNA_GreasePencil; + return &RNA_Annotation; case ID_GP: return &RNA_GreasePencilv3; case ID_GR: diff --git a/source/blender/makesrna/intern/rna_annotations.cc b/source/blender/makesrna/intern/rna_annotations.cc index b2cc61882b7..d00af5c2d68 100644 --- a/source/blender/makesrna/intern/rna_annotations.cc +++ b/source/blender/makesrna/intern/rna_annotations.cc @@ -250,7 +250,7 @@ static void rna_def_annotation_stroke_point(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna = RNA_def_struct(brna, "GPencilStrokePoint", nullptr); + srna = RNA_def_struct(brna, "AnnotationStrokePoint", nullptr); RNA_def_struct_sdna(srna, "bGPDspoint"); RNA_def_struct_ui_text(srna, "Annotation Stroke Point", "Data point for freehand stroke curve"); @@ -266,14 +266,14 @@ static void rna_def_annotation_stroke(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna = RNA_def_struct(brna, "GPencilStroke", nullptr); + srna = RNA_def_struct(brna, "AnnotationStroke", nullptr); RNA_def_struct_sdna(srna, "bGPDstroke"); RNA_def_struct_ui_text(srna, "Annotation Stroke", "Freehand curve defining part of a sketch"); /* Points */ prop = RNA_def_property(srna, "points", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, nullptr, "points", "totpoints"); - RNA_def_property_struct_type(prop, "GPencilStrokePoint"); + RNA_def_property_struct_type(prop, "AnnotationStrokePoint"); RNA_def_property_ui_text(prop, "Stroke Points", "Stroke data points"); } @@ -282,7 +282,7 @@ static void rna_def_annotation_frame(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna = RNA_def_struct(brna, "GPencilFrame", nullptr); + srna = RNA_def_struct(brna, "AnnotationFrame", nullptr); RNA_def_struct_sdna(srna, "bGPDframe"); RNA_def_struct_ui_text( srna, "Annotation Frame", "Collection of related sketches on a particular frame"); @@ -290,7 +290,7 @@ static void rna_def_annotation_frame(BlenderRNA *brna) /* Strokes */ prop = RNA_def_property(srna, "strokes", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, nullptr, "strokes", nullptr); - RNA_def_property_struct_type(prop, "GPencilStroke"); + RNA_def_property_struct_type(prop, "AnnotationStroke"); RNA_def_property_ui_text(prop, "Strokes", "Freehand curves defining the sketch on this frame"); /* Frame Number */ @@ -314,8 +314,8 @@ static void rna_def_annotation_frames_api(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; PropertyRNA *parm; - RNA_def_property_srna(cprop, "GPencilFrames"); - srna = RNA_def_struct(brna, "GPencilFrames", nullptr); + RNA_def_property_srna(cprop, "AnnotationFrames"); + srna = RNA_def_struct(brna, "AnnotationFrames", nullptr); RNA_def_struct_sdna(srna, "bGPDlayer"); RNA_def_struct_ui_text(srna, "Annotation Frames", "Collection of annotation frames"); @@ -333,21 +333,21 @@ static void rna_def_annotation_frames_api(BlenderRNA *brna, PropertyRNA *cprop) MAXFRAME); RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED); RNA_def_boolean(func, "active", false, "Active", ""); - parm = RNA_def_pointer(func, "frame", "GPencilFrame", "", "The newly created frame"); + parm = RNA_def_pointer(func, "frame", "AnnotationFrame", "", "The newly created frame"); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "remove", "rna_annotation_frame_remove"); RNA_def_function_ui_description(func, "Remove an annotation frame"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_pointer(func, "frame", "GPencilFrame", "Frame", "The frame to remove"); + parm = RNA_def_pointer(func, "frame", "AnnotationFrame", "Frame", "The frame to remove"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, ParameterFlag(0)); func = RNA_def_function(srna, "copy", "rna_annotation_frame_copy"); RNA_def_function_ui_description(func, "Copy an annotation frame"); - parm = RNA_def_pointer(func, "source", "GPencilFrame", "Source", "The source frame"); + parm = RNA_def_pointer(func, "source", "AnnotationFrame", "Source", "The source frame"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED); - parm = RNA_def_pointer(func, "copy", "GPencilFrame", "", "The newly copied frame"); + parm = RNA_def_pointer(func, "copy", "AnnotationFrame", "", "The newly copied frame"); RNA_def_function_return(func, parm); } @@ -359,7 +359,7 @@ static void rna_def_annotation_layer(BlenderRNA *brna) static const float default_onion_color_b[] = {0.302f, 0.851f, 0.302f}; static const float default_onion_color_a[] = {0.250f, 0.1f, 1.0f}; - srna = RNA_def_struct(brna, "GPencilLayer", nullptr); + srna = RNA_def_struct(brna, "AnnotationLayer", nullptr); RNA_def_struct_sdna(srna, "bGPDlayer"); RNA_def_struct_ui_text(srna, "Annotation Layer", "Collection of related sketches"); RNA_def_struct_path_func(srna, "rna_annotation_layer_path"); @@ -374,7 +374,7 @@ static void rna_def_annotation_layer(BlenderRNA *brna) /* Frames */ prop = RNA_def_property(srna, "frames", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, nullptr, "frames", nullptr); - RNA_def_property_struct_type(prop, "GPencilFrame"); + RNA_def_property_struct_type(prop, "AnnotationFrame"); RNA_def_property_ui_text(prop, "Frames", "Sketches for this layer on different frames"); rna_def_annotation_frames_api(brna, prop); @@ -504,8 +504,8 @@ static void rna_def_annotation_layers_api(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; PropertyRNA *parm; - RNA_def_property_srna(cprop, "GreasePencilLayers"); - srna = RNA_def_struct(brna, "GreasePencilLayers", nullptr); + RNA_def_property_srna(cprop, "AnnotationLayers"); + srna = RNA_def_struct(brna, "AnnotationLayers", nullptr); RNA_def_struct_sdna(srna, "bGPdata"); RNA_def_struct_ui_text(srna, "Annotation Layers", "Collection of annotation layers"); @@ -515,13 +515,13 @@ static void rna_def_annotation_layers_api(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED); RNA_def_boolean( func, "set_active", true, "Set Active", "Set the newly created layer to the active layer"); - parm = RNA_def_pointer(func, "layer", "GPencilLayer", "", "The newly created layer"); + parm = RNA_def_pointer(func, "layer", "AnnotationLayer", "", "The newly created layer"); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "remove", "rna_annotation_layer_remove"); RNA_def_function_ui_description(func, "Remove a annotation layer"); RNA_def_function_flag(func, FUNC_USE_REPORTS); - parm = RNA_def_pointer(func, "layer", "GPencilLayer", "", "The layer to remove"); + parm = RNA_def_pointer(func, "layer", "AnnotationLayer", "", "The layer to remove"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, ParameterFlag(0)); @@ -550,8 +550,8 @@ static void rna_def_annotation_data(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - /* NOTE: This used to be the legacy Grease Pencil ID type, hence the name. */ - srna = RNA_def_struct(brna, "GreasePencil", "ID"); + /* NOTE: This used to be the legacy Grease Pencil ID type. */ + srna = RNA_def_struct(brna, "Annotation", "ID"); RNA_def_struct_sdna(srna, "bGPdata"); RNA_def_struct_ui_text(srna, "Annotation", "Freehand annotation sketchbook"); RNA_def_struct_ui_icon(srna, ICON_OUTLINER_DATA_GREASEPENCIL); @@ -559,7 +559,7 @@ static void rna_def_annotation_data(BlenderRNA *brna) /* Layers */ prop = RNA_def_property(srna, "layers", PROP_COLLECTION, PROP_NONE); RNA_def_property_collection_sdna(prop, nullptr, "layers", nullptr); - RNA_def_property_struct_type(prop, "GPencilLayer"); + RNA_def_property_struct_type(prop, "AnnotationLayer"); RNA_def_property_ui_text(prop, "Layers", ""); rna_def_annotation_layers_api(brna, prop); diff --git a/source/blender/makesrna/intern/rna_main.cc b/source/blender/makesrna/intern/rna_main.cc index e3a846ecefe..113b1bed33b 100644 --- a/source/blender/makesrna/intern/rna_main.cc +++ b/source/blender/makesrna/intern/rna_main.cc @@ -327,8 +327,8 @@ void RNA_def_main(BlenderRNA *brna) "Palettes", "Palette data-blocks", RNA_def_main_palettes}, - {"grease_pencils", - "GreasePencil", + {"annotations", + "Annotation", "rna_Main_gpencils_begin", "Annotation", "Annotation data-blocks (legacy Grease Pencil)", diff --git a/source/blender/makesrna/intern/rna_main_api.cc b/source/blender/makesrna/intern/rna_main_api.cc index e4a293327b8..4d4e18539a4 100644 --- a/source/blender/makesrna/intern/rna_main_api.cc +++ b/source/blender/makesrna/intern/rna_main_api.cc @@ -2013,8 +2013,8 @@ void RNA_def_main_annotations(BlenderRNA *brna, PropertyRNA *cprop) FunctionRNA *func; PropertyRNA *parm; - RNA_def_property_srna(cprop, "BlendDataGreasePencils"); - srna = RNA_def_struct(brna, "BlendDataGreasePencils", nullptr); + RNA_def_property_srna(cprop, "BlendDataAnnotations"); + srna = RNA_def_struct(brna, "BlendDataAnnotations", nullptr); RNA_def_struct_sdna(srna, "Main"); RNA_def_struct_ui_text(srna, "Main Annotations", "Collection of annotations"); @@ -2024,16 +2024,16 @@ void RNA_def_main_annotations(BlenderRNA *brna, PropertyRNA *cprop) func = RNA_def_function(srna, "new", "rna_Main_annotations_new"); RNA_def_function_ui_description(func, "Add a new annotation datablock to the main database"); - parm = RNA_def_string(func, "name", "GreasePencil", 0, "", "New name for the data-block"); + parm = RNA_def_string(func, "name", "Annotation", 0, "", "New name for the data-block"); RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED); /* return type */ - parm = RNA_def_pointer(func, "grease_pencil", "GreasePencil", "", "New annotation data-block"); + parm = RNA_def_pointer(func, "annotation", "Annotation", "", "New annotation data-block"); RNA_def_function_return(func, parm); func = RNA_def_function(srna, "remove", "rna_Main_ID_remove"); RNA_def_function_flag(func, FUNC_USE_REPORTS); RNA_def_function_ui_description(func, "Remove annotation instance from the current blendfile"); - parm = RNA_def_pointer(func, "grease_pencil", "GreasePencil", "", "Grease Pencil to remove"); + parm = RNA_def_pointer(func, "annotation", "Annotation", "", "Grease Pencil to remove"); RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR); RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, ParameterFlag(0)); RNA_def_boolean( diff --git a/source/blender/makesrna/intern/rna_movieclip.cc b/source/blender/makesrna/intern/rna_movieclip.cc index c36be097169..d00539742af 100644 --- a/source/blender/makesrna/intern/rna_movieclip.cc +++ b/source/blender/makesrna/intern/rna_movieclip.cc @@ -375,14 +375,14 @@ static void rna_def_movieclip(BlenderRNA *brna) "Create proxy images in a custom directory (default is movie location)"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, "rna_MovieClip_reload_update"); - /* grease pencil */ - prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); + /* annotations */ + prop = RNA_def_property(srna, "annotation", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, nullptr, "gpd"); - RNA_def_property_struct_type(prop, "GreasePencil"); + RNA_def_property_struct_type(prop, "Annotation"); RNA_def_property_pointer_funcs( prop, nullptr, nullptr, nullptr, "rna_GPencil_datablocks_annotations_poll"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); - RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this movie clip"); + RNA_def_property_ui_text(prop, "Annotation", "Annotation data for this movie clip"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, nullptr); /* start_frame */ diff --git a/source/blender/makesrna/intern/rna_nodetree.cc b/source/blender/makesrna/intern/rna_nodetree.cc index 27026a5fae0..27d6a1e3d51 100644 --- a/source/blender/makesrna/intern/rna_nodetree.cc +++ b/source/blender/makesrna/intern/rna_nodetree.cc @@ -10138,15 +10138,15 @@ static void rna_def_nodetree(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Links", ""); rna_def_nodetree_link_api(brna, prop); - /* Grease Pencil */ - prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); + /* Annotation */ + prop = RNA_def_property(srna, "annotation", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, nullptr, "gpd"); - RNA_def_property_struct_type(prop, "GreasePencil"); + RNA_def_property_struct_type(prop, "Annotation"); RNA_def_property_pointer_funcs( prop, nullptr, nullptr, nullptr, "rna_GPencil_datablocks_annotations_poll"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); - RNA_def_property_ui_text(prop, "Grease Pencil Data", "Grease Pencil data-block"); + RNA_def_property_ui_text(prop, "Annotation", "Annotation data"); RNA_def_property_update(prop, NC_NODE, nullptr); prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_object.cc b/source/blender/makesrna/intern/rna_object.cc index c9a02fce228..307238890f4 100644 --- a/source/blender/makesrna/intern/rna_object.cc +++ b/source/blender/makesrna/intern/rna_object.cc @@ -600,7 +600,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr) case OB_LIGHTPROBE: return &RNA_LightProbe; case OB_GPENCIL_LEGACY: - return &RNA_GreasePencil; + return &RNA_Annotation; case OB_GREASE_PENCIL: return &RNA_GreasePencilv3; case OB_CURVES: diff --git a/source/blender/makesrna/intern/rna_scene.cc b/source/blender/makesrna/intern/rna_scene.cc index f3d508ccfaa..bc259ef3b4a 100644 --- a/source/blender/makesrna/intern/rna_scene.cc +++ b/source/blender/makesrna/intern/rna_scene.cc @@ -9019,15 +9019,14 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_function_return(func, parm); /* Grease Pencil */ - prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); + prop = RNA_def_property(srna, "annotation", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, nullptr, "gpd"); - RNA_def_property_struct_type(prop, "GreasePencil"); + RNA_def_property_struct_type(prop, "Annotation"); RNA_def_property_pointer_funcs( prop, nullptr, nullptr, nullptr, "rna_GPencil_datablocks_annotations_poll"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY); - RNA_def_property_ui_text( - prop, "Annotations", "Grease Pencil data-block used for annotations in the 3D view"); + RNA_def_property_ui_text(prop, "Annotations", "Data-block used for annotations in the 3D view"); RNA_def_property_update(prop, NC_GPENCIL | ND_DATA | NA_EDITED, nullptr); /* active MovieClip */ diff --git a/source/blender/makesrna/intern/rna_space.cc b/source/blender/makesrna/intern/rna_space.cc index 5ddaff24285..744158d9a15 100644 --- a/source/blender/makesrna/intern/rna_space.cc +++ b/source/blender/makesrna/intern/rna_space.cc @@ -6112,14 +6112,14 @@ static void rna_def_space_image(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, nullptr); - /* grease pencil */ - prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); + /* Annotations */ + prop = RNA_def_property(srna, "annotation", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, nullptr, "gpd"); - RNA_def_property_struct_type(prop, "GreasePencil"); + RNA_def_property_struct_type(prop, "Annotation"); RNA_def_property_pointer_funcs( prop, nullptr, nullptr, nullptr, "rna_GPencil_datablocks_annotations_poll"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); - RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this space"); + RNA_def_property_ui_text(prop, "Annotation", "Annotation data for this space"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, nullptr); /* update */ @@ -6496,14 +6496,14 @@ static void rna_def_space_sequencer(BlenderRNA *brna) prop, "Limit View to Contents", "Limit timeline height to maximum used channel slot"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, nullptr); - /* grease pencil */ - prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); + /* Annotations */ + prop = RNA_def_property(srna, "annotation", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, nullptr, "gpd"); - RNA_def_property_struct_type(prop, "GreasePencil"); + RNA_def_property_struct_type(prop, "Annotation"); RNA_def_property_pointer_funcs( prop, nullptr, nullptr, nullptr, "rna_GPencil_datablocks_annotations_poll"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); - RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this Preview region"); + RNA_def_property_ui_text(prop, "Annotation", "Annotation data for this Preview region"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, nullptr); prop = RNA_def_property(srna, "overlay_frame_type", PROP_ENUM, PROP_NONE); diff --git a/source/blender/makesrna/intern/rna_tracking.cc b/source/blender/makesrna/intern/rna_tracking.cc index 5e02365521b..1782470f7f9 100644 --- a/source/blender/makesrna/intern/rna_tracking.cc +++ b/source/blender/makesrna/intern/rna_tracking.cc @@ -1717,14 +1717,14 @@ static void rna_def_trackingTrack(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_EDITABLE); RNA_def_property_ui_text(prop, "Average Error", "Average error of re-projection"); - /* grease pencil */ - prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); + /* Annotations */ + prop = RNA_def_property(srna, "annotation", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, nullptr, "gpd"); - RNA_def_property_struct_type(prop, "GreasePencil"); + RNA_def_property_struct_type(prop, "Annotation"); RNA_def_property_pointer_funcs( prop, nullptr, nullptr, nullptr, "rna_GPencil_datablocks_annotations_poll"); RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); - RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this track"); + RNA_def_property_ui_text(prop, "Annotation", "Annotation data for this track"); RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, nullptr); /* weight */ diff --git a/tools/utils_api/bpy_introspect_ui.py b/tools/utils_api/bpy_introspect_ui.py index 75420e52f23..7ced0c408f6 100644 --- a/tools/utils_api/bpy_introspect_ui.py +++ b/tools/utils_api/bpy_introspect_ui.py @@ -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 = ()