Skip to content

Use add-on within a script #282

Answered by soupday
nwhite89 asked this question in Q&A
Discussion options

You must be logged in to vote
# import character fbx
bpy.ops.cc3.importer(param="IMPORT", filepath=fbx_file)

# select character rig
props = bpy.context.scene.CC3ImportProps
avatar = props.get_first_avatar()
avatar.select()

# Rigify
bpy.ops.cc3.rigifier(param="ALL")

# Delete character and clean up
bpy.ops.cc3.importer(param="DELETE_CHARACTER")
while bpy.data.objects:
    bpy.data.objects.remove(bpy.data.objects[0])
while bpy.data.meshes:
    bpy.data.meshes.remove(bpy.data.meshes[0])
for c in bpy.data.collections:
    if c.name.startswith("WGTS_"):
        bpy.data.collections.remove(c)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@nwhite89
Comment options

Answer selected by nwhite89
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants