lib/glitch3d/bpy/canvas/dreamatorium.py in glitch3d-0.2.3.2 vs lib/glitch3d/bpy/canvas/dreamatorium.py in glitch3d-0.2.3.3

- old
+ new

@@ -5,12 +5,17 @@ m4a1.scale = (0.5, 0.5, 0.5) props.append(m4a1) # Add props rand_primitive = random.choice(PRIMITIVES) -build_composite_object(rand_primitive, 4, 1) +elements = build_composite_object(rand_primitive, 4, 1) +for l1 in elements: + for l2 in l1: + for obj in l2: + WIREFRAMES.append(obj) + # Set up virtual displays bpy.ops.mesh.primitive_grid_add(x_subdivisions=100, y_subdivisions=100, location=(0, 6, 2)) display1 = bpy.data.objects['Grid'] bpy.ops.mesh.primitive_grid_add(x_subdivisions=100, y_subdivisions=100, location=(6, 0, 2)) display2 = bpy.data.objects['Grid.001'] @@ -36,13 +41,13 @@ make_object_gradient_fabulous(m4a1, rand_color(), rand_color()) # Make floor bpy.ops.mesh.primitive_plane_add(location=(0, 0, -2)) floor = last_added_object('PLANE') -bpy.data.groups['Plane'].objects.link(floor) +bpy.data.groups['Planes'].objects.link(floor) floor.scale = (20,20,20) -subdivide(floor, int(random.uniform(0, 7))) +subdivide(floor, int(random.uniform(3, 7))) displace(floor) texture_object(floor) OCEAN = add_ocean(10, 20) @@ -60,14 +65,11 @@ props.append(new_object) text_scale = random.uniform(0.75, 3) make_object_glossy(new_object, rand_color(), 0.0) new_object.scale = (text_scale, text_scale, text_scale) new_object.location = rand_location() - # pivot text to make it readable by camera - new_object.rotation_euler.x += math.radians(90) - new_object.rotation_euler.z += math.radians(90) -for plane in bpy.data.groups['Plane'].objects: +for plane in bpy.data.groups['Planes'].objects: unwrap_model(plane) for obj in WIREFRAMES: wireframize(obj) \ No newline at end of file