Skip to content
/ sanwei Public

三维 - Render chinese text in CLI with Blender Python API

License

Notifications You must be signed in to change notification settings

fetsorn/sanwei

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sanwei

PyPI - Version PyPI - Python Version


Table of Contents

Installation

nix shell git+https://github.com/fetsorn/sanwei
pip install sanwei

Usage

# render a random chinese character with WenQuanYi Zen Hei font
nix build git+https://github.com/fetsorn/sanwei#image
sanwei --binary /path/to/blender \
       --font-path "/path/to/font" \
       --font-name "Font Name Regular"

Docs

  • "--binary", required, path to Blender binary executable, e.g. "/Applications/Blender.app/Contents/MacOS/Blender"

  • "--font-path", required, path to chinese font, e.g. "./path/to/chinese.ttc"

  • "--font-name", required, name of the font in bpy.data.fonts, e.g. "Chinese Font Regular"

  • "--output", optional, name for output file without the .png extension, defaults to "/tmp/sanwei" and creates a "/tmp/sanwei.png" file

  • "--input", optional, arbitrary text to render, defaults to a random chinese character

  • "--resolution", optional, percentage scale for render resolution, int in [1, 32767], default 100

  • "--samples", optional, number of samples for the Cycles render engine, default 128

License

sanwei is distributed under the terms of the MIT license.

About

三维 - Render chinese text in CLI with Blender Python API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published