Skip to content

Instantly share code, notes, and snippets.

@sambler
sambler / duplicate_objects_along_curve.py
Created June 9, 2019 07:25
Suggested variation of script in BSE answer
# script variation for https://blender.stackexchange.com/a/142495/935
import bpy
skull = bpy.data.objects["Skull"]
curve = bpy.data.objects["xobject_name"]
if 'Skulls' not in bpy.data.collections:
newCol = bpy.data.collections.new('Skulls')
bpy.context.scene.collection.children.link(newCol)
@sambler
sambler / OSL_473e1f6e2df1_llvm9.0rc2_build.log
Created August 23, 2019 01:15
OSL build fail with LLVM 9.0RC2
===> License BSD3CLAUSE accepted by the user
===> openshadinglanguage-1.10.6 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by openshadinglanguage-1.10.6 for building
===> Extracting for openshadinglanguage-1.10.6
=> SHA256 Checksum OK for imageworks-OpenShadingLanguage-Release-1.10.6-473e1f6e2df1_GH0.tar.gz.
===> Patching for openshadinglanguage-1.10.6
===> Applying FreeBSD patches for openshadinglanguage-1.10.6
===> openshadinglanguage-1.10.6 depends on executable: llvm-config90 - found
===> openshadinglanguage-1.10.6 depends on executable: bison - found
===> openshadinglanguage-1.10.6 depends on file: /usr/local/bin/cmake - found
@sambler
sambler / OSL_1.10.7_clang_9_build.log
Last active October 18, 2019 10:52
OSL build fail with clang 9.0
===> License BSD3CLAUSE accepted by the user
===> openshadinglanguage-1.10.7 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by openshadinglanguage-1.10.7 for building
===> Extracting for openshadinglanguage-1.10.7
=> SHA256 Checksum OK for imageworks-OpenShadingLanguage-Release-1.10.7_GH0.tar.gz.
===> Patching for openshadinglanguage-1.10.7
===> Applying FreeBSD patches for openshadinglanguage-1.10.7
===> openshadinglanguage-1.10.7 depends on executable: llvm-config90 - found
===> openshadinglanguage-1.10.7 depends on file: /usr/local/bin/clang90 - found
===> openshadinglanguage-1.10.7 depends on executable: bison - found
@sambler
sambler / test-blend-bGPDstroke.c
Created November 17, 2019 02:55
check size and alignment of struct members
/*
* test alignments of struct members
* run on multiple platforms to compare output
cc test-blend-bGPDstroke.c -o testpad
./testpad
*/
#include <stdio.h>
#include <stddef.h>
@sambler
sambler / uvproject.py
Last active October 6, 2020 08:27
uvunwrap a blender object using a script
# save this as uvproject.py and use the following command
# blender -b test.blend -P uvproject.py
import bpy
# Deselect all
bpy.ops.object.select_all(action='DESELECT')
for obj in bpy.context.scene.objects:
if obj.type == 'MESH':