Coder Social home page Coder Social logo

Comments (5)

KaiKostack avatar KaiKostack commented on September 26, 2024

Hi Colin, thanks for the report. This is a bug that I had already fixed internally, but it was not committed to the public repository. I have now done this, please update the BCB and try again.

from bullet-constraints-builder.

ColinMoldenhauer avatar ColinMoldenhauer commented on September 26, 2024

Thanks a lot!

from bullet-constraints-builder.

ColinMoldenhauer avatar ColinMoldenhauer commented on September 26, 2024

Slightly off-topic, but do you by any chance know how to get the Build FM operation to work when running Blender in the background? I am running bpy.ops.bcb.export_ascii_fm() in my custom Python script, but when saving the file, the changes applied to the model through the simulation are not saved. Does it have to do with the animation not being played in background mode?

from bullet-constraints-builder.

ColinMoldenhauer avatar ColinMoldenhauer commented on September 26, 2024

NVM, after hours of googling I found a way :)

from bullet-constraints-builder.

KaiKostack avatar KaiKostack commented on September 26, 2024

Try this:

import bpy

# Get config
bpy.ops.bcb.get_config()

# Build
bpy.ops.bcb.export_ascii_fm()

# Simulate frame by frame through the timeline
scene = bpy.context.scene
for frame in range(scene.frame_start, scene.frame_end +1):
    scene.frame_current = frame
    bpy.context.screen.scene = scene  # Scene update invokes BCB monitor event handler

Indeed, Blender doesn't seem to support animation playback in background mode, but this workaround should do the trick. I also updated the BCB to suppress some irrelevant warnings that only appear in background mode for some reason.

from bullet-constraints-builder.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.