enzyme69 / blendersushi

Blender Sushi related scripts. Mostly about Sverchok, Geometry Nodes, Animation Nodes, and related Python scripts.
243 stars 33 forks source link

LIVENODING 1113 / Procedural Multi Growth Curves #514

Open enzyme69 opened 5 years ago

enzyme69 commented 5 years ago
screen shot 2018-11-28 at 9 34 36 am screen shot 2018-11-28 at 9 34 17 am

And our awesome Modifier Curve:

screen shot 2018-11-28 at 9 35 29 am
enzyme69 commented 5 years ago

Simple setup of 10 cylinder and modifier: growing_cylinder_004.blend.zip

More complex setup: growing_cylinder_008.blend.zip

enzyme69 commented 5 years ago

Our awesome SNL Sorter script (can be made simpler):

READ: https://github.com/nortikin/sverchok/issues/1987

"""
in obnames s
out obsorted s
"""

# natural sorting for name without zero padding

import re
import bpy

#mylist = ['apple_10', 'apple_1', 'apple_12', 'apple_123', 'apple_2']

def natural_sort(l): 
    convert = lambda text: int(text) if text.isdigit() else text.lower() 
    alphanum_key = lambda key: [ convert(c) for c in re.split('([0-9]+)', key) ] 
    return sorted(l, key = alphanum_key)

obnamesorted = natural_sort(obnames)

obsorted = []

for ob in obnamesorted:
    obsorted.append(bpy.data.objects[ob])