Commit c8a0b8d4 authored by Aynur19's avatar Aynur19
Browse files

updated scene; triangles to quads

parent 714d37df
# Blender MTL File: 'Project_2022-03-27_002v.blend'
# Material Count: 30
newmtl Dark_wood.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.800000 0.800000 0.800000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd Textures\\Dark_wood_2\\Dark_wood_2.jpg
newmtl Fiber_gunny_purple.004
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.874510 0.705882 0.113725
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
map_Kd Textures\\Fabric_gunny_purple\\Fabric_gunny_purple.jpg
newmtl GDLM28_pictmat_T
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM38_builtInMa
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.356863 0.364706 0.372549
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM39_builtInMa
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.721569 0.721569 0.721569
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM40_builtInMa
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.000000 0.000000 0.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 0.750000
illum 9
newmtl GDLM41_builtInMa.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.000000 0.000000 0.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM42_builtInMa.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.937255 0.937255 0.937255
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM53_builtInMa
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.047059 0.047059 0.043137
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM57_CONVERT_D
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.486275 0.486275 0.486275
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM59_builtInMa.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.898039 0.898039 0.898039
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl GDLM62_macDeskto
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.678431 0.678431 0.678431
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl Gold_metal.003
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.494118 0.411765 0.196078
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl None
Ns 500
Ka 0.8 0.8 0.8
Kd 0.8 0.8 0.8
Ks 0.8 0.8 0.8
d 1
illum 2
newmtl PEN_MATERIAL8
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.607843 0.192157 0.156863
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl �����_-_01
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.760784 0.729412 0.701961
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl �����_-_02
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.498039 0.498039 0.498039
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl �����_-_�������.005
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.243137 0.482353 0.129412
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl �����_-_��������
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.329412 0.400000 0.156863
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_���_���
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.494118 0.458824 0.415686
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_����
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.415686 0.419608 0.423529
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_����_01
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.223529 0.223529 0.223529
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_�����
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.207843 0.137255 0.137255
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_�����-�.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.145098 0.145098 0.145098
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_�����_�.001
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.298039 0.235294 0.180392
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_������-
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.266667 0.266667 0.266667
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_������.005
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.050980 0.239216 0.047059
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ������_-_�������.018
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.490196 0.368627 0.329412
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl �������_����
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.474510 0.235294 0.000000
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
newmtl ����������_-_���.007
Ns 225.000000
Ka 1.000000 1.000000 1.000000
Kd 0.949020 0.776471 0.462745
Ks 0.500000 0.500000 0.500000
Ke 0.000000 0.000000 0.000000
Ni 1.450000
d 1.000000
illum 2
This diff is collapsed.
import bpy
C = bpy.context
O = bpy.ops
def locAllObjects():
objects = C.scene.objects
print(f'{len(objects)}')
for obj in objects:
obj.lock_location = (True, True, True)
obj.lock_rotation = (True, True, True)
obj.lock_scale = (True, True, True)
def meshToQuads(meshes):
O.object.select_all(action='SELECT')
for obj in C.selected_objects:
if obj.type == 'MESH':
# for obj in meshes:
print(obj)
print(f'selected objects count: {len(bpy.context.scene.objects)}')
print(f'selected objects active: {bpy.context.active_object}')
bpy.context.active_object = obj #set active object
for vert in obj.data.vertices:
vert.select = True #ensure all vertices are selected
O.object.mode_set(mode='EDIT') #switch to edit mode
O.mesh.remove_doubles() #remove doubles
O.mesh.tris_convert_to_quads() #tris to quads
O.object.mode_set(mode='OBJECT') #switch to object mode
O.object.select_all(action='DESELECT')
objects = C.scene.objects
meshes = [obj for obj in objects if obj.type == 'MESH']
print(f'Scene All Objects Count: {len(objects)}')
print(f'Scene Mesh Objects Count: {len(meshes)}')
meshToQuads(meshes)
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment