diff --git a/scripts/addons_core/rigify/utils/objects.py b/scripts/addons_core/rigify/utils/objects.py index e19821e575b..8492c1f13e8 100644 --- a/scripts/addons_core/rigify/utils/objects.py +++ b/scripts/addons_core/rigify/utils/objects.py @@ -34,7 +34,7 @@ def create_object_data(obj_type, name): if obj_type == 'VOLUME': return bpy.data.volumes.new(name) if obj_type == 'GREASEPENCIL': - return bpy.data.grease_pencils_v3.new(name) + return bpy.data.grease_pencils.new(name) if obj_type == 'ARMATURE': return bpy.data.armatures.new(name) if obj_type == 'LATTICE': diff --git a/scripts/modules/_bpy_types.py b/scripts/modules/_bpy_types.py index 83ccdab1ce9..b983a4231d8 100644 --- a/scripts/modules/_bpy_types.py +++ b/scripts/modules/_bpy_types.py @@ -135,7 +135,7 @@ class Library(_types.ID): # we could make this an attribute in rna. attr_links = ( "actions", "armatures", "brushes", "cameras", - "curves", "grease_pencils_v3", "collections", "images", + "curves", "grease_pencils", "collections", "images", "lights", "lattices", "materials", "metaballs", "meshes", "node_groups", "objects", "scenes", "sounds", "speakers", "textures", "texts", diff --git a/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py b/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py index a4393f87205..b028e767e9d 100644 --- a/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py +++ b/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py @@ -37,7 +37,7 @@ def update_factory_startup_scenes(): def update_factory_startup_grease_pencils(): - for grease_pencil in bpy.data.grease_pencils_v3: + for grease_pencil in bpy.data.grease_pencils: grease_pencil.onion_keyframe_type = 'ALL' diff --git a/scripts/startup/bl_app_templates_system/Storyboarding/__init__.py b/scripts/startup/bl_app_templates_system/Storyboarding/__init__.py index 09a3b19fbaf..2363fd8dae5 100644 --- a/scripts/startup/bl_app_templates_system/Storyboarding/__init__.py +++ b/scripts/startup/bl_app_templates_system/Storyboarding/__init__.py @@ -40,7 +40,7 @@ def update_factory_startup_scenes(): def update_factory_startup_grease_pencils(): - for grease_pencil in bpy.data.grease_pencils_v3: + for grease_pencil in bpy.data.grease_pencils: grease_pencil.onion_keyframe_type = 'ALL' diff --git a/scripts/startup/bl_operators/wm.py b/scripts/startup/bl_operators/wm.py index a1361b4ee71..ea273c86dec 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.GreasePencil), + 'GREASEPENCIL': ("grease_pencils", 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/space_dopesheet.py b/scripts/startup/bl_ui/space_dopesheet.py index 1a248bdca79..d852ba8e13f 100644 --- a/scripts/startup/bl_ui/space_dopesheet.py +++ b/scripts/startup/bl_ui/space_dopesheet.py @@ -106,7 +106,7 @@ class DopesheetFilterPopoverBase: flow.prop(dopesheet, "show_armatures", text="Armatures") if bpy.data.cameras: flow.prop(dopesheet, "show_cameras", text="Cameras") - if bpy.data.grease_pencils_v3: + if bpy.data.grease_pencils: flow.prop(dopesheet, "show_gpencil", text="Grease Pencil Objects") if bpy.data.lights: flow.prop(dopesheet, "show_lights", text="Lights") diff --git a/scripts/startup/bl_ui/space_outliner.py b/scripts/startup/bl_ui/space_outliner.py index 939378c304c..669860b72a3 100644 --- a/scripts/startup/bl_ui/space_outliner.py +++ b/scripts/startup/bl_ui/space_outliner.py @@ -511,7 +511,7 @@ class OUTLINER_PT_filter(Panel): row = sub.row() row.label(icon='CAMERA_DATA') row.prop(space, "use_filter_object_camera", text="Cameras") - if bpy.data.grease_pencils_v3: + if bpy.data.grease_pencils: row = sub.row() row.label(icon='STROKE') row.prop(space, "use_filter_object_grease_pencil", text="Grease Pencil") diff --git a/source/blender/makesrna/intern/rna_main.cc b/source/blender/makesrna/intern/rna_main.cc index f0da024129f..e9a7b1fa1c7 100644 --- a/source/blender/makesrna/intern/rna_main.cc +++ b/source/blender/makesrna/intern/rna_main.cc @@ -436,7 +436,7 @@ void RNA_def_main(BlenderRNA *brna) "Annotation", "Annotation data-blocks (legacy Grease Pencil)", RNA_def_main_annotations}, - {"grease_pencils_v3", + {"grease_pencils", "GreasePencil", "rna_Main_grease_pencils_begin", "Grease Pencil", diff --git a/tests/python/bl_pyapi_grease_pencil.py b/tests/python/bl_pyapi_grease_pencil.py index 75314b04b0f..0da9dc7ffa6 100644 --- a/tests/python/bl_pyapi_grease_pencil.py +++ b/tests/python/bl_pyapi_grease_pencil.py @@ -12,10 +12,10 @@ import unittest class TestGreasePencil(unittest.TestCase): def setUp(self): - self.gp = bpy.data.grease_pencils_v3.new("test_grease_pencil") + self.gp = bpy.data.grease_pencils.new("test_grease_pencil") def tearDown(self): - bpy.data.grease_pencils_v3.remove(self.gp) + bpy.data.grease_pencils.remove(self.gp) del self.gp def test_grease_pencil_new(self): @@ -27,7 +27,7 @@ class TestGreasePencilLayers(unittest.TestCase): tint_factors = [0.3, 0.6, 0.9] def setUp(self): - self.gp = bpy.data.grease_pencils_v3.new("test_grease_pencil") + self.gp = bpy.data.grease_pencils.new("test_grease_pencil") self.gp.layers.new("test_layer01") self.gp.layers.new("test_layer02") self.gp.layers.new("test_layer03") @@ -36,7 +36,7 @@ class TestGreasePencilLayers(unittest.TestCase): layer.tint_factor = self.tint_factors[i] def tearDown(self): - bpy.data.grease_pencils_v3.remove(self.gp) + bpy.data.grease_pencils.remove(self.gp) del self.gp def test_grease_pencil_layers_new(self): @@ -85,11 +85,11 @@ class TestGreasePencilLayers(unittest.TestCase): class TestGreasePencilFrame(unittest.TestCase): def setUp(self): - self.gp = bpy.data.grease_pencils_v3.new("test_grease_pencil") + self.gp = bpy.data.grease_pencils.new("test_grease_pencil") self.layer = self.gp.layers.new("test_layer01") def tearDown(self): - bpy.data.grease_pencils_v3.remove(self.gp) + bpy.data.grease_pencils.remove(self.gp) del self.gp def test_grease_pencil_frame_add(self): @@ -184,7 +184,7 @@ class TestGreasePencilFrame(unittest.TestCase): class TestGreasePencilDrawing(unittest.TestCase): def setUp(self): - self.gp = bpy.data.grease_pencils_v3.new("test_grease_pencil") + self.gp = bpy.data.grease_pencils.new("test_grease_pencil") layer = self.gp.layers.new("test_layer01") frame = layer.frames.new(0) self.drawing = frame.drawing @@ -193,7 +193,7 @@ class TestGreasePencilDrawing(unittest.TestCase): self.drawing.add_strokes(stroke_sizes) def tearDown(self): - bpy.data.grease_pencils_v3.remove(self.gp) + bpy.data.grease_pencils.remove(self.gp) del self.gp def test_grease_pencil_drawing_add_strokes(self): diff --git a/tests/python/bl_rna_defaults.py b/tests/python/bl_rna_defaults.py index 468511e4a32..b027b3d0871 100644 --- a/tests/python/bl_rna_defaults.py +++ b/tests/python/bl_rna_defaults.py @@ -108,7 +108,7 @@ test_Armature = _test_id_gen("armatures") test_Brush = _test_id_gen("brushes") test_Camera = _test_id_gen("cameras") test_Collection = _test_id_gen("collections") -test_GreasePencil = _test_id_gen("grease_pencils_v3") +test_GreasePencil = _test_id_gen("grease_pencils") test_HairCurves = _test_id_gen("hair_curves") test_Lattice = _test_id_gen("lattices") test_LineStyle = _test_id_gen("linestyles")