Your go-to source for all things weird and wonderful

Month: May 2021

Blender Refresher

I started working on Blender scripting two years ago with a view to creating model submarine parts.

But I’d forgotten how to get started, so I just watched a simple tutorial to help refresh my memory.

Here’s the code to produce the monkeys.

import bpy

from random import randint

# Clear the workspace
bpy.ops.object.select_all(action='SELECT')
bpy.ops.object.delete(use_global=False)


# Generate some randomly spaced monkeys
for _ in range( 0, 400 ):
    
    # Pick a random location within a given space
    x = randint( -20, +20 )
    y = randint( -20, +20 )
    z = randint( -10, +10 )

    # Add a monkey
    bpy.ops.mesh.primitive_monkey_add( location = ( x, y, z ) )
    
    # Change the resolution of the current monkey.
    # Shade smoothing reduces the number of vertices and thus the
    # load on the processor.
    bpy.ops.object.modifier_add( type='SUBSURF' )
    bpy.context.object.modifiers[ "Subdivision" ].levels = 2
    bpy.context.object.modifiers[ "Subdivision" ].render_levels = 1
    bpy.ops.object.shade_smooth()

Big Sur Update

Updated the MacBook to Big Sur 13.1 today.

I had left the machine on overnight as it claimed that it would update ‘later tonight’ and then restart, but for whatever reason, it didn’t happen.

At the last update, the Time Machine backup system went wonky. Let’s hope there are no ‘surprises’ this time!

Blender Installation

Having come up with a preliminary design for a deck using software I found on-line, I concluded that the information it made available was not adequate for filing a building permit, so I took a look at Sketchup, which I had heard was simple and free.

Well, apparently the free version is a browser-only version. That’s not an issue, except that the useful tools for deck design are extensions and those don’t seem to be available for the browser-only version.1)Note that I said ‘seem’; I could be wrong, but I couldn’t find any useful information on the subject. As is so often the case, on-line help I found was outdated. And given what I saw in the interface, I decided I’d be better served investing my time in reacquainting myself with a much more useful tool I’ve used in the past.

So I installed Blender. Now, I have to relearn how to use it!

Notes

Notes
1 Note that I said ‘seem’; I could be wrong, but I couldn’t find any useful information on the subject. As is so often the case, on-line help I found was outdated.

Page 2 of 2

Powered by WordPress & Theme by Anders Norén