Python: Rename bpy.data.grease_pencils_v3 to bpy.data.grease_pencils
This renames `bpy.data.grease_pencils_v3` to `bpy.data.grease_pencils`. Part of #125058. Pull Request: https://projects.blender.org/blender/blender/pulls/146904
This commit is contained in:
committed by
Falk David
parent
1067112c11
commit
d2269441bb
@@ -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':
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user