System Information
Operating system: Debian Linux 11.5
Graphics card: (Embedded) AMD Ryzen 5 PRO 4650GE with Radeon Graphics
Blender Version
Broken: 3.3.0
Worked: Unknown (none found)
Short description of error
Python code produces non-deterministic (i.e. random) cubes, editing those cubes crashes Blender.
Exact steps for others to reproduce the error
Either:
a) open the attached .blend file, press play on the python script and you should get a number of blocks. Some of these blocks should have "infinite" faces (this is the random part, maybe 10% of the time it works fine).
b) Editing one of those infinite blocks crashes blender
-or-
a) Start blender, delete everything in the default scene
b)paste the below python into the scripting window (obviously between the START/END tags)
START
import bpy
import numpy
import math
import pprint
length, width, height
block_dimensions = (0.5, 0.1, 0.224) # porotherm
def lay_block_course(start_point, end_point, height):
#wall_length = math.dist(start_point, end_point)
block_length = block_dimensions[0]
pp = pprint.PrettyPrinter(indent=4)
verts = [(0,0,0), (0,1,0), (1,1,0), (1,0,0), (0,0,1), (0,1,1), (1,1,1), (1,0,1)]
pp.pprint(verts)
faces = [(0,1,2,3), (7,6,5,4), (0,4,5,1), (1,5,6,2), (2,6,7,3), (3,7,4,9)]
mesh = bpy.data.meshes.new("Block0")
object = bpy.data.objects.new("Block0", mesh)
object.location = (start_point)
bpy.context.collection.objects.link(object)
mesh.from_pydata(verts,[],faces)
bpy.data.objects["Block0"].select_set(True)
bpy.ops.transform.resize(value=block_dimensions)
brick0 = bpy.data.objects["Block0"]
current_brick = brick0.copy()
current_brick.data = brick0.data.copy()
for i in range (0,15):
new_obj = current_brick.copy()
new_obj.data = current_brick.data.copy()
new_obj.animation_data_clear()
new_obj.location.x += block_length
bpy.context.collection.objects.link(new_obj)
current_brick = new_obj.copy()
current_brick.data = new_obj.data.copy()wall0 = (10,10,10)
wall1 = (1,1,1)
height = 2.4
lay_block_course(wall0, wall1, height)
END
c) Then continue with the steps as per first options{F13602277}