diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index 82f2dfbddd0..dc5a4bacb1a 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -1212,7 +1212,7 @@ context_type_map = { "editable_fcurves": [("FCurve", True)], "fluid": [("FluidSimulationModifier", False)], "gpencil": [("GreasePencil", False)], - "grease_pencil": [("GreasePencilv3", False)], + "grease_pencil": [("GreasePencil", False)], "curves": [("Hair Curves", False)], "id": [("ID", False)], "image_paint_object": [("Object", False)], diff --git a/scripts/startup/bl_operators/wm.py b/scripts/startup/bl_operators/wm.py index e161555c9a8..a1361b4ee71 100644 --- a/scripts/startup/bl_operators/wm.py +++ b/scripts/startup/bl_operators/wm.py @@ -2915,7 +2915,7 @@ class WM_OT_batch_rename(Operator): 'CURVE': ("curves", iface_("Curve(s)"), bpy.types.Curve), 'META': ("metaballs", iface_("Metaball(s)"), bpy.types.MetaBall), 'VOLUME': ("volumes", iface_("Volume(s)"), bpy.types.Volume), - 'GREASEPENCIL': ("grease_pencils_v3", iface_("Grease Pencil(s)"), bpy.types.GreasePencilv3), + 'GREASEPENCIL': ("grease_pencils_v3", iface_("Grease Pencil(s)"), bpy.types.GreasePencil), 'ARMATURE': ("armatures", iface_("Armature(s)"), bpy.types.Armature), 'LATTICE': ("lattices", iface_("Lattice(s)"), bpy.types.Lattice), 'LIGHT': ("lights", iface_("Light(s)"), bpy.types.Light), diff --git a/scripts/startup/bl_ui/properties_data_grease_pencil.py b/scripts/startup/bl_ui/properties_data_grease_pencil.py index f378bddd991..5739c509396 100644 --- a/scripts/startup/bl_ui/properties_data_grease_pencil.py +++ b/scripts/startup/bl_ui/properties_data_grease_pencil.py @@ -441,7 +441,7 @@ class DATA_PT_grease_pencil_animation(DataButtonsPanel, PropertiesAnimationMixin class DATA_PT_grease_pencil_custom_props(DataButtonsPanel, PropertyPanel, Panel): _context_path = "object.data" - _property_type = bpy.types.GreasePencilv3 + _property_type = bpy.types.GreasePencil class GREASE_PENCIL_UL_attributes(UIList): diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_layers.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_layers.cc index 4b9d4b52164..4f2dfe87f4b 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_layers.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_layers.cc @@ -118,7 +118,7 @@ static wmOperatorStatus grease_pencil_layer_add_exec(bContext *C, wmOperator *op std::string new_layer_name = RNA_string_get(op->ptr, "new_layer_name"); Layer &new_layer = grease_pencil.add_layer(new_layer_name); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layers); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layers); if (grease_pencil.has_active_layer()) { grease_pencil.move_node_after(new_layer.as_node(), @@ -190,7 +190,7 @@ static wmOperatorStatus grease_pencil_layer_remove_exec(bContext *C, wmOperator WM_msg_publish_rna_prop( CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3Layers, active); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layers); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layers); DEG_id_tag_update(&grease_pencil.id, ID_RECALC_GEOMETRY); WM_event_add_notifier(C, NC_GPENCIL | ND_DATA | NA_SELECTED, &grease_pencil); @@ -263,7 +263,7 @@ static wmOperatorStatus grease_pencil_layer_move_exec(bContext *C, wmOperator *o WM_event_add_notifier(C, NC_GEOM | ND_DATA, &grease_pencil); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layers); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layers); return OPERATOR_FINISHED; } @@ -344,7 +344,7 @@ static wmOperatorStatus grease_pencil_layer_group_add_exec(bContext *C, wmOperat LayerGroup &new_group = grease_pencil.add_layer_group(new_layer_group_name); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layer_groups); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layer_groups); if (grease_pencil.has_active_layer()) { grease_pencil.move_node_after(new_group.as_node(), @@ -410,7 +410,7 @@ static wmOperatorStatus grease_pencil_layer_group_remove_exec(bContext *C, wmOpe WM_msg_publish_rna_prop( CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3LayerGroup, active); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layer_groups); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layer_groups); return OPERATOR_FINISHED; } @@ -655,7 +655,7 @@ static wmOperatorStatus grease_pencil_layer_duplicate_exec(bContext *C, wmOperat active_layer, duplicate_frames, duplicate_drawings); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layers); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layers); grease_pencil.move_node_after(new_layer.as_node(), active_layer.as_node()); grease_pencil.set_active_layer(&new_layer); @@ -816,7 +816,7 @@ static wmOperatorStatus grease_pencil_merge_layer_exec(bContext *C, wmOperator * BKE_grease_pencil_nomain_to_grease_pencil(merged_grease_pencil, &grease_pencil); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layers); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layers); /* Try to set the active (merged) layer. */ TreeNode *node = grease_pencil.find_node_by_name(merged_layer_name); diff --git a/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc b/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc index fa7899905c7..6a8ffcd5823 100644 --- a/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc +++ b/source/blender/editors/grease_pencil/intern/grease_pencil_utils.cc @@ -1750,7 +1750,7 @@ float4x2 calculate_texture_space(const Scene *scene, GreasePencil *from_context(bContext &C) { GreasePencil *grease_pencil = static_cast( - CTX_data_pointer_get_type(&C, "grease_pencil", &RNA_GreasePencilv3).data); + CTX_data_pointer_get_type(&C, "grease_pencil", &RNA_GreasePencil).data); if (grease_pencil == nullptr) { Object *object = CTX_data_active_object(&C); diff --git a/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc b/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc index 862c07c415b..26d3eab5f1e 100644 --- a/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc +++ b/source/blender/editors/interface/templates/interface_template_grease_pencil_layer_tree.cc @@ -148,7 +148,7 @@ class LayerNodeDropTarget : public TreeViewItemDropTarget { WM_msg_publish_rna_prop( CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3Layers, active); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layers); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layers); } else if (drag_node.is_group()) { WM_msg_publish_rna_prop(CTX_wm_message_bus(C), @@ -157,7 +157,7 @@ class LayerNodeDropTarget : public TreeViewItemDropTarget { GreasePencilv3LayerGroup, active); WM_msg_publish_rna_prop( - CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencilv3, layer_groups); + CTX_wm_message_bus(C), &grease_pencil.id, &grease_pencil, GreasePencil, layer_groups); } ED_undo_push(C, "Reorder Layers"); diff --git a/source/blender/editors/space_buttons/buttons_context.cc b/source/blender/editors/space_buttons/buttons_context.cc index 6fba963f7f1..cae3996768d 100644 --- a/source/blender/editors/space_buttons/buttons_context.cc +++ b/source/blender/editors/space_buttons/buttons_context.cc @@ -259,7 +259,7 @@ static bool buttons_context_path_data(ButsContextPath *path, int type) if (RNA_struct_is_a(ptr->type, &RNA_LightProbe) && ELEM(type, -1, OB_LIGHTPROBE)) { return true; } - if (RNA_struct_is_a(ptr->type, &RNA_GreasePencilv3) && ELEM(type, -1, OB_GREASE_PENCIL)) { + if (RNA_struct_is_a(ptr->type, &RNA_GreasePencil) && ELEM(type, -1, OB_GREASE_PENCIL)) { return true; } if (RNA_struct_is_a(ptr->type, &RNA_Curves) && ELEM(type, -1, OB_CURVES)) { @@ -1170,7 +1170,7 @@ int /*eContextResult*/ buttons_context(const bContext *C, return CTX_RESULT_OK; } if (CTX_data_equals(member, "grease_pencil")) { - set_pointer_type(path, result, &RNA_GreasePencilv3); + set_pointer_type(path, result, &RNA_GreasePencil); return CTX_RESULT_OK; } return CTX_RESULT_MEMBER_NOT_FOUND; diff --git a/source/blender/makesrna/intern/rna_ID.cc b/source/blender/makesrna/intern/rna_ID.cc index 85c2f13a45f..184feb532ba 100644 --- a/source/blender/makesrna/intern/rna_ID.cc +++ b/source/blender/makesrna/intern/rna_ID.cc @@ -390,7 +390,7 @@ short RNA_type_to_ID_code(const StructRNA *type) if (base_type == &RNA_Annotation) { return ID_GD_LEGACY; } - if (base_type == &RNA_GreasePencilv3) { + if (base_type == &RNA_GreasePencil) { return ID_GP; } if (base_type == &RNA_Collection) { @@ -510,7 +510,7 @@ StructRNA *ID_code_to_RNA_type(short idcode) case ID_GD_LEGACY: return &RNA_Annotation; case ID_GP: - return &RNA_GreasePencilv3; + return &RNA_GreasePencil; case ID_GR: return &RNA_Collection; case ID_CV: diff --git a/source/blender/makesrna/intern/rna_grease_pencil.cc b/source/blender/makesrna/intern/rna_grease_pencil.cc index 36189c394b7..ea6d5ee48cc 100644 --- a/source/blender/makesrna/intern/rna_grease_pencil.cc +++ b/source/blender/makesrna/intern/rna_grease_pencil.cc @@ -1426,7 +1426,7 @@ static void rna_def_grease_pencil_data(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - srna = RNA_def_struct(brna, "GreasePencilv3", "ID"); + srna = RNA_def_struct(brna, "GreasePencil", "ID"); RNA_def_struct_sdna(srna, "GreasePencil"); RNA_def_struct_ui_text(srna, "Grease Pencil", "Grease Pencil data-block"); RNA_def_struct_ui_icon(srna, ICON_OUTLINER_DATA_GREASEPENCIL); diff --git a/source/blender/makesrna/intern/rna_main.cc b/source/blender/makesrna/intern/rna_main.cc index b73ac0e9949..f0da024129f 100644 --- a/source/blender/makesrna/intern/rna_main.cc +++ b/source/blender/makesrna/intern/rna_main.cc @@ -437,7 +437,7 @@ void RNA_def_main(BlenderRNA *brna) "Annotation data-blocks (legacy Grease Pencil)", RNA_def_main_annotations}, {"grease_pencils_v3", - "GreasePencilv3", + "GreasePencil", "rna_Main_grease_pencils_begin", "Grease Pencil", "Grease Pencil data-blocks", diff --git a/source/blender/makesrna/intern/rna_main_api.cc b/source/blender/makesrna/intern/rna_main_api.cc index 0efb058b60f..f661b2f403f 100644 --- a/source/blender/makesrna/intern/rna_main_api.cc +++ b/source/blender/makesrna/intern/rna_main_api.cc @@ -2131,14 +2131,14 @@ void RNA_def_main_grease_pencil(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_parameter_flags(parm, PropertyFlag(0), PARM_REQUIRED); /* return type */ parm = RNA_def_pointer( - func, "grease_pencil", "GreasePencilv3", "", "New Grease Pencil data-block"); + func, "grease_pencil", "GreasePencil", "", "New Grease Pencil 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 a Grease Pencil instance from the current blendfile"); - parm = RNA_def_pointer(func, "grease_pencil", "GreasePencilv3", "", "Grease Pencil to remove"); + parm = RNA_def_pointer(func, "grease_pencil", "GreasePencil", "", "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_object.cc b/source/blender/makesrna/intern/rna_object.cc index 696e60a26dd..1ec06f8f854 100644 --- a/source/blender/makesrna/intern/rna_object.cc +++ b/source/blender/makesrna/intern/rna_object.cc @@ -602,7 +602,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr) case OB_GPENCIL_LEGACY: return &RNA_Annotation; case OB_GREASE_PENCIL: - return &RNA_GreasePencilv3; + return &RNA_GreasePencil; case OB_CURVES: return &RNA_Curves; case OB_POINTCLOUD: diff --git a/source/blender/python/intern/bpy_geometry_set.cc b/source/blender/python/intern/bpy_geometry_set.cc index 590b15f2f9e..daa0ccefa5a 100644 --- a/source/blender/python/intern/bpy_geometry_set.cc +++ b/source/blender/python/intern/bpy_geometry_set.cc @@ -343,7 +343,7 @@ PyDoc_STRVAR( bpy_geometry_set_grease_pencil_doc, "The Grease Pencil data-block in the geometry set.\n" "\n" - ":type: :class:`bpy.types.GreasePencilv3`\n"); + ":type: :class:`bpy.types.GreasePencil`\n"); static PyObject *BPy_GeometrySet_get_grease_pencil(BPy_GeometrySet *self, void * /*closure*/) { return pyrna_id_CreatePyObject(