It looks like the Blender plug-in doesn't like it when I run scripts with errors.
I tried the script with the plug-in installed:
import bpy
import random
# Remove all objects
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete()
# Set the cube dimensions
cube_dimensions = (0.5, 0.5, 0.5)
# Create 10 cubes
for i in range(10):
# Generate random x, y, and z coordinates between -5 and 5
x = random.uniform(-5, 5)
y = random.uniform(-5, 5)
z = random.uniform(-5, 5)
# Create the cube at the specified coordinates
bpy.ops.mesh.primitive_cube_add(location=(x, y, z), size=cube_dimensions)
And I get this useless error:
Python: --- Logging error ---
Traceback (most recent call last):
File "/Applications/Blender.app/Contents/Resources/3.4/python/lib/python3.10/logging/handlers.py", line 74, in emit
self.doRollover()
File "/Applications/Blender.app/Contents/Resources/3.4/python/lib/python3.10/logging/handlers.py", line 431, in doRollover
dfn = self.rotation_filename(self.baseFilename + "." +
File "/Applications/Blender.app/Contents/Resources/3.4/python/lib/python3.10/logging/handlers.py", line 95, in rotation_filename
result = self.namer(default_name)
File "/Users/iangilman/Library/Application Support/Blender/3.4/scripts/addons/AliceLG/__init__.py", line 91, in logfile_namer
base_filename, ext, date = default_name.split(".")
ValueError: too many values to unpack (expected 3)
Call stack:
File "/Users/iangilman/Library/Application Support/Blender/3.4/scripts/addons/AliceLG/__init__.py", line 81, in log_exhook
LookingGlassAddonLogger.critical("An unhandled error occured. Here is the traceback:\n", exc_info=(exc_type, exc_value, exc_traceback))
Message: 'An unhandled error occured. Here is the traceback:\n'
Arguments: ()