Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--animation_add_corrective_shape_key.py4
-rw-r--r--io_export_directx_x.py6
-rw-r--r--io_export_pc2.py4
-rw-r--r--io_mesh_ply/export_ply.py2
-rw-r--r--io_mesh_raw/export_raw.py2
-rw-r--r--io_mesh_stl/blender_utils.py3
-rw-r--r--io_scene_3ds/export_3ds.py2
-rw-r--r--io_scene_fbx/export_fbx.py8
-rw-r--r--io_scene_obj/export_obj.py6
-rw-r--r--io_scene_x3d/export_x3d.py2
-rw-r--r--io_shape_mdd/export_mdd.py4
-rw-r--r--light_field_tools/light_field_tools.py2
-rw-r--r--object_fracture/fracture_ops.py2
-rw-r--r--render_povray/render.py2
14 files changed, 24 insertions, 25 deletions
diff --git a/animation_add_corrective_shape_key.py b/animation_add_corrective_shape_key.py
index 41d34aae..4dda54bd 100644
--- a/animation_add_corrective_shape_key.py
+++ b/animation_add_corrective_shape_key.py
@@ -101,7 +101,7 @@ def extractX_2(ob, mesh):
def extractMappedX(ob, mesh):
totvert = len(mesh)
- mesh = ob.create_mesh( bpy.context.scene, True, 'PREVIEW' )
+ mesh = ob.to_mesh( bpy.context.scene, True, 'PREVIEW' )
x = []
@@ -246,7 +246,7 @@ class add_corrective_pose_shape(bpy.types.Operator):
return {'FINISHED'}
def func_object_duplicate_flatten_modifiers(ob, scene):
- mesh = ob.create_mesh( bpy.context.scene, True, 'PREVIEW' )
+ mesh = ob.to_mesh( bpy.context.scene, True, 'PREVIEW' )
name = ob.name + "_clean"
new_object = bpy.data.objects.new( name, mesh)
new_object.data = mesh
diff --git a/io_export_directx_x.py b/io_export_directx_x.py
index b204b4ea..e51ec37d 100644
--- a/io_export_directx_x.py
+++ b/io_export_directx_x.py
@@ -274,11 +274,11 @@ def WriteObjects(Config, ObjectList):
Object2 = Object.copy()
for Modifier in [Modifier for Modifier in Object2.modifiers if Modifier.type == "ARMATURE"]:
Object2.modifiers.remove(Modifier)
- Mesh = Object2.create_mesh(bpy.context.scene, True, "PREVIEW")
+ Mesh = Object2.to_mesh(bpy.context.scene, True, "PREVIEW")
else:
- Mesh = Object.create_mesh(bpy.context.scene, True, "PREVIEW")
+ Mesh = Object.to_mesh(bpy.context.scene, True, "PREVIEW")
else:
- Mesh = Object.create_mesh(bpy.context.scene, False, "PREVIEW")
+ Mesh = Object.to_mesh(bpy.context.scene, False, "PREVIEW")
if Config.Verbose:
print(" Done")
print(" Writing Mesh...")
diff --git a/io_export_pc2.py b/io_export_pc2.py
index a739def8..cb9cb4ae 100644
--- a/io_export_pc2.py
+++ b/io_export_pc2.py
@@ -60,7 +60,7 @@ def do_export(context, props, filepath):
end = props.range_end
sampling = float(props.sampling)
apply_modifiers = props.apply_modifiers
- me = ob.create_mesh(sc, apply_modifiers, 'PREVIEW')
+ me = ob.to_mesh(sc, apply_modifiers, 'PREVIEW')
vertCount = len(me.vertices)
sampletimes = getSampling(start, end, sampling)
sampleCount = len(sampletimes)
@@ -75,7 +75,7 @@ def do_export(context, props, filepath):
for frame in sampletimes:
sc.frame_set(frame)
- me = ob.create_mesh(sc, apply_modifiers, 'PREVIEW')
+ me = ob.to_mesh(sc, apply_modifiers, 'PREVIEW')
if len(me.vertices) != vertCount:
file.close()
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 11a16438..6e2f43db 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -51,7 +51,7 @@ def save(operator, context, filepath="", use_modifiers=True, use_normals=True, u
bpy.ops.object.mode_set(mode='OBJECT')
if use_modifiers:
- mesh = obj.create_mesh(scene, True, 'PREVIEW')
+ mesh = obj.to_mesh(scene, True, 'PREVIEW')
else:
mesh = obj.data
diff --git a/io_mesh_raw/export_raw.py b/io_mesh_raw/export_raw.py
index 67b6a892..3bc79461 100644
--- a/io_mesh_raw/export_raw.py
+++ b/io_mesh_raw/export_raw.py
@@ -68,7 +68,7 @@ def export_raw(filepath, applyMods, triangulate):
matrix = obj.matrix_world
if (applyMods):
- me = obj.create_mesh(bpy.context.scene, True, "PREVIEW")
+ me = obj.to_mesh(bpy.context.scene, True, "PREVIEW")
else:
me = obj.data
diff --git a/io_mesh_stl/blender_utils.py b/io_mesh_stl/blender_utils.py
index eb31e86a..1058064b 100644
--- a/io_mesh_stl/blender_utils.py
+++ b/io_mesh_stl/blender_utils.py
@@ -54,8 +54,7 @@ def faces_from_mesh(ob, apply_modifier=False, triangulate=True):
# get the modifiers
try:
- mesh = ob.create_mesh(bpy.context.scene,
- apply_modifier, "PREVIEW")
+ mesh = ob.to_mesh(bpy.context.scene, apply_modifier, "PREVIEW")
except RuntimeError:
return ()
diff --git a/io_scene_3ds/export_3ds.py b/io_scene_3ds/export_3ds.py
index 1a85c5e2..5926506d 100644
--- a/io_scene_3ds/export_3ds.py
+++ b/io_scene_3ds/export_3ds.py
@@ -926,7 +926,7 @@ def save(operator, context, filepath="",
continue
try:
- data = ob_derived.create_mesh(scene, True, 'PREVIEW')
+ data = ob_derived.to_mesh(scene, True, 'PREVIEW')
except:
data = None
diff --git a/io_scene_fbx/export_fbx.py b/io_scene_fbx/export_fbx.py
index 4dc76a93..c6c91869 100644
--- a/io_scene_fbx/export_fbx.py
+++ b/io_scene_fbx/export_fbx.py
@@ -1856,7 +1856,7 @@ def save_single(operator, scene, filepath="",
obs = [(ob_base, ob_base.matrix_world)]
if ob_base.dupli_type != 'NONE':
- ob_base.create_dupli_list(scene)
+ ob_base.dupli_list_create(scene)
obs = [(dob.object, dob.matrix) for dob in ob_base.dupli_list]
for ob, mtx in obs:
@@ -1881,7 +1881,7 @@ def save_single(operator, scene, filepath="",
origData = True
if tmp_ob_type != 'MESH':
try:
- me = ob.create_mesh(scene, True, 'PREVIEW')
+ me = ob.to_mesh(scene, True, 'PREVIEW')
except:
me = None
@@ -1892,7 +1892,7 @@ def save_single(operator, scene, filepath="",
else:
# Mesh Type!
if EXP_MESH_APPLY_MOD:
- me = ob.create_mesh(scene, True, 'PREVIEW')
+ me = ob.to_mesh(scene, True, 'PREVIEW')
# print ob, me, me.getVertGroupNames()
meshes_to_clear.append(me)
@@ -1983,7 +1983,7 @@ def save_single(operator, scene, filepath="",
# not forgetting to free dupli_list
if ob_base.dupli_list:
- ob_base.free_dupli_list()
+ ob_base.dupli_list_clear()
if EXP_ARMATURE:
# now we have the meshes, restore the rest arm position
diff --git a/io_scene_obj/export_obj.py b/io_scene_obj/export_obj.py
index d3fd917e..73e426e7 100644
--- a/io_scene_obj/export_obj.py
+++ b/io_scene_obj/export_obj.py
@@ -358,7 +358,7 @@ def write_file(filepath, objects, scene,
if ob_main.dupli_type != 'NONE':
# XXX
print('creating dupli_list on', ob_main.name)
- ob_main.create_dupli_list(scene)
+ ob_main.dupli_list_create(scene)
obs = [(dob.object, dob.matrix) for dob in ob_main.dupli_list]
@@ -380,7 +380,7 @@ def write_file(filepath, objects, scene,
if ob.type != 'MESH':
continue
- me = ob.create_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW')
+ me = ob.to_mesh(scene, EXPORT_APPLY_MODIFIERS, 'PREVIEW')
if EXPORT_ROTX90:
me.transform(mat_xrot90 * ob_mat)
@@ -674,7 +674,7 @@ def write_file(filepath, objects, scene,
bpy.data.meshes.remove(me)
if ob_main.dupli_type != 'NONE':
- ob_main.free_dupli_list()
+ ob_main.dupli_list_clear()
file.close()
diff --git a/io_scene_x3d/export_x3d.py b/io_scene_x3d/export_x3d.py
index f7bba662..10347658 100644
--- a/io_scene_x3d/export_x3d.py
+++ b/io_scene_x3d/export_x3d.py
@@ -725,7 +725,7 @@ class x3d_class:
elif objType in ('MESH', 'CURVE', 'SURF', 'FONT'):
if use_apply_modifiers or objType != 'MESH':
try:
- me = ob.create_mesh(scene, use_apply_modifiers, 'PREVIEW')
+ me = ob.to_mesh(scene, use_apply_modifiers, 'PREVIEW')
except:
me = None
else:
diff --git a/io_shape_mdd/export_mdd.py b/io_shape_mdd/export_mdd.py
index 42795d45..85163280 100644
--- a/io_shape_mdd/export_mdd.py
+++ b/io_shape_mdd/export_mdd.py
@@ -70,7 +70,7 @@ def save(operator, context, filepath="", frame_start=1, frame_end=300, fps=25):
orig_frame = scene.frame_current
scene.frame_set(frame_start)
- me = obj.create_mesh(scene, True, 'PREVIEW')
+ me = obj.to_mesh(scene, True, 'PREVIEW')
#Flip y and z
mat_flip = mathutils.Matrix(((1.0, 0.0, 0.0, 0.0), \
@@ -108,7 +108,7 @@ def save(operator, context, filepath="", frame_start=1, frame_end=300, fps=25):
"""
scene.frame_set(frame)
- me = obj.create_mesh(scene, True, 'PREVIEW')
+ me = obj.to_mesh(scene, True, 'PREVIEW')
check_vertcount(me, numverts)
me.transform(mat_flip * obj.matrix_world)
diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py
index 2f3957db..e6bd0083 100644
--- a/light_field_tools/light_field_tools.py
+++ b/light_field_tools/light_field_tools.py
@@ -104,7 +104,7 @@ class OBJECT_OT_create_lightfield_rig(bpy.types.Operator):
"""Sorts the vertices as described in the usage part of the doc."""
# get mesh with applied modifer stack
scene = bpy.context.scene
- mesh = self.baseObject.create_mesh(scene, True, "PREVIEW")
+ mesh = self.baseObject.to_mesh(scene, True, "PREVIEW")
verts = []
row_length = scene.lightfield.row_length
diff --git a/object_fracture/fracture_ops.py b/object_fracture/fracture_ops.py
index 820b7d65..83978a95 100644
--- a/object_fracture/fracture_ops.py
+++ b/object_fracture/fracture_ops.py
@@ -210,7 +210,7 @@ def boolop(ob, cutter, op):
a.modifiers['Boolean'].object = cutter
a.modifiers['Boolean'].operation = op
- nmesh = a.create_mesh(sce, apply_modifiers=True, settings='PREVIEW')
+ nmesh = a.to_mesh(sce, apply_modifiers=True, settings='PREVIEW')
if len(nmesh.vertices) > 0:
a.modifiers.remove(a.modifiers['Boolean'])
diff --git a/render_povray/render.py b/render_povray/render.py
index d17d019f..9ff96ad1 100644
--- a/render_povray/render.py
+++ b/render_povray/render.py
@@ -734,7 +734,7 @@ def write_pov(filename, scene=None, info_callback=None):
continue
try:
- me = ob.create_mesh(scene, True, 'RENDER')
+ me = ob.to_mesh(scene, True, 'RENDER')
except:
# happens when curves cant be made into meshes because of no-data
continue