enzyme69 / blendersushi

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

LIVENODING 785 / Sketchfab Timeframe Stop Motion Generator #172

Open enzyme69 opened 6 years ago

enzyme69 commented 6 years ago

voxel_sm_003_2017_10_20_11_57.zip

screen shot 2017-10-20 at 22 58 38

enzyme69 commented 6 years ago

Animation Nodes Script Node to generate sketchfab.timeframe file:

import glob
import os

# for sketchfab.timeframe

path = '/Users/jimmygunawan/Desktop/OBJ/*.obj'
dur = duration

TextList = []

for item in sorted(glob.glob((path))):
    #print( str(duration), os.path.basename(item) )
    TextList.append(str(dur) + " " + os.path.basename(item))
enzyme69 commented 6 years ago

screen shot 2017-10-20 at 22 58 55

enzyme69 commented 6 years ago

So the BLEND file example above contains:

Basically if you want to export out Sketchfab animation following this method, you just need to export OBJ sequences first, then change the path in the Script Node to match the folder with OBJ sequence and generate the 'sketchfab.timeframe'.

Documentation: https://forum.sketchfab.com/t/how-to-export-an-animation-from-magicavoxel/15460/8 https://help.sketchfab.com/hc/en-us/articles/203058018-Animations#timeframe

enzyme69 commented 6 years ago

Sketchfab: https://skfb.ly/69FnS

enzyme69 commented 6 years ago

YouTube: https://youtu.be/UABf2YuMPyQ

enzyme69 commented 5 years ago

If you want to just print out the list using Python...

Save the printed text as "sketchfab.timeframe"....

import glob
import os

# for sketchfab.timeframe

path = '/Users/jimmygunawan/Desktop/HANDFIE/*.ply'
dur = 0.2

TextList = []

for item in sorted(glob.glob((path))):
    #print( str(duration), os.path.basename(item) )
    TextList.append(str(dur) + " " + os.path.basename(item))

for item in TextList:
    print(item)