How soupday/ccic-blender-pipeline-plugin works
1. What this repository is
- A Python plugin for Character Creator 4 / iClone 8 that acts as a bridge to Blender.
- It is designed around a round-trip pipeline: export characters/props/motions from Reallusion, edit in Blender with a matching Blender add-on, then re-import or live-sync back.
2. Primary runtime boundary
- The code runs inside the Reallusion Python plugin environment when installed under Bin64/OpenPlugin.
- main.py is the top-level entry point, and the README also says it can be launched directly from Script > Load Python without full installation.
- The repo also includes install/uninstall PowerShell and BAT wrappers, indicating deployment is part of the project boundary.
3. UI and user interaction layer
- btp/qt.py, btp/prefs.py, and btp/options.py define the plugin’s user-facing controls, settings, and persistent configuration.
- The main user workflows surfaced in the README are grouped as Go-B, Export, Import, DataLink, and Settings.
- btp/error.py likely centralizes user-visible error handling and warnings.
4. Host-application integration
- btp/cc.py is the Reallusion-side integration layer, likely wrapping Character Creator / iClone APIs for scene access, selection, export/import actions, and object metadata.
- btp/blender.py is the Blender-side orchestration layer, responsible for launching Blender, exchanging files/commands, and coordinating round-trip behavior.
- These two files form the main boundary between the host app and the external Blender environment.
5. Transfer and connection subsystem
- btp/link.py is the core “bridge” layer, and the changelog references DataLink, remote transfer, live sequence sync, and connection management.
- This subsystem appears to handle both local and remote communication paths, including maintaining or replacing a Blender connection and pushing scene updates over a working directory.
- The README’s “Send Scene”, “Select Scene”, and live sequence features suggest this is the long-lived synchronization channel.
6. Export pipeline
- btp/exporter.py handles extraction from CC/iClone into Blender-facing artifacts.
- Based on the README, export includes characters, props, motions, lights, cameras, and scene data, with special handling for material names, textures, FBX compliance, and JSON metadata.
- The export path is tightly coupled to the Blender add-on contract: object/material naming, texture-path rewriting, and metadata updates must line up for re-import to succeed.
7. Import / reconstruction pipeline
- btp/importer.py handles reconstruction on the CC/iClone side from Blender output.
- The README emphasizes exact material reconstruction from exported JSON and compatibility constraints around object names, material names, and texture references.
- This is the key “restore state” boundary: geometry, materials, and some character metadata come back from Blender into the Reallusion scene.
8. Morph and mesh-edit workflows
- btp/morph.py and the changelog entries around “Go-B Morph”, mesh replace, and facial profile editing indicate a specialized path for morph-target or mesh-only updates.
- The plugin supports exact mesh replacement and slider-based morph workflows, which are distinct from full-character export/import.
- This path is important because it can omit the armature or send mesh-only updates for facial editing and similar use cases.
9. Utility and data model layer
- btp/utils.py, btp/vars.py, and btp/gob.py are support modules for shared helpers, constants/state, and the Go-B workflow.
- btp/gob.py is especially likely to coordinate the “one-click send to Blender and return” flow described in the README.
- btp/gob.py plus the main export/import modules suggests a workflow-oriented layer sitting above lower-level file transfer and API calls.
10. Packaging, scripts, and test support
- scripts/go_b.py and scripts/transformer_fix.py are auxiliary scripts, likely used for Blender-side automation and compatibility fixes.
- btp/tests.py indicates some internal test coverage or validation helpers, though the repo is primarily an integration plugin rather than a standalone test-driven library.
- Installation - README.txt, InstallScript.ps1, and uninstall counterparts show the plugin is meant to be installed as a folder-based package or junction link.
11. External dependencies and file formats
- The architecture revolves around FBX plus companion JSON metadata exported by the Blender tools add-on.
- It also relies on Reallusion-specific concepts like HIK profiles, facial profiles, physics data, motions, and accessories/props.
- Textures and material parameters are significant data flows; the README warns that embedded textures break the re-import path because the plugin expects filesystem-accessible asset paths.
12. End-to-end data flow
- Typical flow: CC/iClone scene state → plugin export logic → FBX/JSON/filesystem → Blender edit/automation → updated FBX/JSON or live DataLink updates → plugin import/reconstruction back into CC/iClone.
- A second flow bypasses file round-tripping and uses DataLink for live scene, pose, motion, camera, and light synchronization.
- The architecture is therefore split into a batch pipeline and a live sync pipeline, both anchored by shared naming/metadata conventions.
Main entry points: exporter.py Export Pipeline · importer.py Import Pipeline · gob.py Go-B Flow · qt.py Qt UI
Components 18
Runtime
Plugin entrypoint and host integration boundary.
- Plugin Entry · Top-level launcher for the Reallusion Python plugin and direct script loading.
main.py - CC Bridge · Reallusion-side integration layer for scene access and host operations.
btp/cc.py - Blender Bridge · Coordinates Blender launch, handoff, and round-trip orchestration.
btp/blender.py
Pipelines
Batch export/import, round-trip workflows, and live sync.
- DataLink · Long-lived connection and remote transfer channel for live scene synchronization.
btp/link.py - Export Pipeline · Builds FBX, JSON, and asset metadata for Blender-side editing.
btp/exporter.py - Import Pipeline · Reconstructs CC/iClone scene state from Blender output and metadata.
btp/importer.py - Go-B Flow · One-click round-trip workflow that ties export, Blender handoff, and return import together.
btp/gob.py - Morph Tools · Specialized path for morph targets, mesh replacement, and facial editing updates.
btp/morph.py
UI & Settings
User-facing controls and persistent configuration.
- Preferences · Stores plugin preferences and user configuration state.
btp/prefs.py - Options · Defines workflow options and user-selectable parameters.
btp/options.py - Qt UI · Plugin dialogs, controls, and interactive UI widgets.
btp/qt.py - Errors · Centralized user-visible warnings and error handling.
btp/error.py
Support
Shared utilities, data model, packaging, and scripts.
- Utilities · Common helper functions used across the plugin.
btp/utils.py - Vars · Shared constants and module-level state used by workflows.
btp/vars.py - Package Init · Package marker and public import surface.
btp/__init__.py - Tests · Internal test and validation helpers.
btp/tests.py - Go-B Script · Auxiliary script for Blender-side Go-B automation.
scripts/go_b.py - Fix Script · Auxiliary script for transformer or compatibility fixes.
scripts/transformer_fix.py
Connections 23
- Plugin Entry → Qt UI: opens UI · Loads the interactive plugin interface.
- Plugin Entry → CC Bridge: uses host API · Connects the entrypoint to Reallusion scene operations.
- Plugin Entry → Go-B Flow: starts workflow · Routes one-click round-trip actions into the Go-B coordinator.
- Qt UI → Preferences: reads/writes · Persists user choices and plugin preferences.
- Qt UI → Options: configures · Collects workflow parameters and mode settings.
- Qt UI → Errors: reports · Surfaces warnings and failures to the user.
- Go-B Flow → Export Pipeline: exports · Triggers the batch export stage.
- Go-B Flow → Blender Bridge: hands off to · Launches or coordinates Blender-side processing.
- Go-B Flow → Import Pipeline: returns via · Restores scene state after Blender edits.
- Export Pipeline → CC Bridge: pulls scene data · Extracts characters, props, motion, and scene metadata from the host.
- Export Pipeline → Utilities: shares helpers · Uses common file, naming, and path utilities.
- Export Pipeline → Vars: uses state · Relies on shared constants and workflow flags.
- Import Pipeline → CC Bridge: rebuilds scene · Applies imported geometry and material state back into the host app.
- Import Pipeline → Utilities: shares helpers · Uses common reconstruction and path utilities.
- DataLink → Blender Bridge: syncs with · Maintains live communication with Blender for DataLink workflows.
- DataLink → CC Bridge: syncs scene · Transfers live scene, pose, motion, camera, and light updates.
- Morph Tools → Export Pipeline: specializes export · Uses the export pipeline for morph and mesh-edit variants.
- Morph Tools → Import Pipeline: specializes import · Feeds updated meshes or morph data back through reconstruction.
- Go-B Script → Blender Bridge: supports · Provides Blender-side automation for Go-B flows.
- Fix Script → Blender Bridge: supports · Applies compatibility fixes on the Blender side.
- Tests → Export Pipeline: validates · Checks export behavior and output conventions.
- Tests → Import Pipeline: validates · Checks import behavior and reconstruction constraints.
- Package Init → Utilities: exposes · Connects package imports to shared helpers.