Skip to content

Latest commit

 

History

History
103 lines (74 loc) · 3.54 KB

README.md

File metadata and controls

103 lines (74 loc) · 3.54 KB

chuck-blender npm version license Travis Build

Chuck plugin to convert STEP files with Blender.

👉 @mitm/chuck, a fully-featured webservice that builds Unity3D asset bundles.

✅ Requirements

This plug-in requires you to install Blender and have it available in command line (you may have to add it in the $PATH). To get STEP imports, you need these Blender add-ons:

The Blender GUI is not required so may use a little script to install these. Name a file setup-addons.py, and put the code below with the correct paths.

import bpy
# The folder with the plugins
folder = 'C:\Chuck\Applications\Blender\Plugins\'

# Install the STEP importer
bpy.ops.preferences.addon_install(filepath=folder + 'STEP_OCC_import_1.0.0.zip')
bpy.ops.preferences.addon_enable(module='STEPper')

# Install the color fix
bpy.ops.preferences.addon_install(filepath=folder + 'WI CAD Tools.py')
bpy.ops.preferences.addon_enable(module='WI CAD Tools')

bpy.ops.wm.save_userpref()

The run this:

blender -b -P ./setup-addons.py

Formats

The checked boxes are the wired/tested formats.

Blender is able to import the following formats:

  • Collada (.dae)
  • Alembic (.abc)
  • Motion Capture (.bvh)
  • Scalable Vector Graphics (.svg)
  • Stanford (.ply)
  • Stl (.stl)
  • FBX (.fbx)
  • gLTF 2.0 (.gltf/.glb)
  • Wavefront (.obj)
  • X3D Extensible 3D (.x3d/.wrl)
  • STEP (.step) with a plugin

Blender is able to export the following formats:

  • Collada (.dae)
  • Alembic (.abc)
  • Universal Scene Description (.usd, .usdc, .usda)
  • Stanford (.ply)
  • Stl (.stl)
  • FBX (.fbx)
  • gLTF 2.0 (.gltf/.glb)
  • Wavefront (.obj)
  • X3D Extensible 3D (.x3d/.wrl)

📦 Installation & Usage

Like any other chuck plugin, install it alongside of @mitm/chuck:

yarn add @mitm/chuck-blender

Then load it with chuck (see chuck's documentation about configuration and plugins if necessary):

CHUCK_STEPMODULEPLUGINS=@mitm/chuck-blender yarn chuck

For developpment

Since the plugin is a different project entirely, there is an extra step to get a development environment.

# Register the plugin in yarn/npm to access it from Chuck
cd chuck-blender
yarn link

# Finish the link
cd ../chuck
yarn link @mitm/chuck-blender

Note: don't forget to add @mitm/chuck-blender in the env var CHUCK_STEPMODULEPLUGINS.

🔧 Configuration

Like with chuck, configuration is done via environment variables.

Variable Default Description
`CHUCK_BLENDER_BLENDERPATH blender (= in the PATH) Path to the Blender executable