Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Add functionality to bake from the command line #329

Closed
bholzer opened this issue Jun 7, 2018 · 3 comments
Closed

[Feature Request] Add functionality to bake from the command line #329

bholzer opened this issue Jun 7, 2018 · 3 comments

Comments

@bholzer
Copy link

bholzer commented Jun 7, 2018

My rendering/baking pipeline is in the cloud, so much of my baking and rendering happens from the command line on a server, generally with some startup python script.

There is info here on how to bake blender's built-in fluids via Python: https://blender.stackexchange.com/a/728/53213

Could you write documentation on how to do this in Flip?

@rlguy
Copy link
Owner

rlguy commented Jun 8, 2018

Hey bholzer,

I didn't have functionality for baking from the command line in mind when writing the baking process so this is not possible within the addon at the moment, but it is a great idea to have this! I have added this functionality and it will be available in the next version (1.0.4).

If you want to try it out now, here's how (assuming you are currently using version 1.0.3):


You will need to replace the addon operators\bake_operators.py file with this modified version of the file: bake_operators.py

For example, my bake_operators.py file is located here:

C:\Users\ryanl\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\flip_fluids_addon\operators\bake_operators.py

Once the file is replaced, a fluid simulation scene can be baked from the command line using the following script:

import bpy
bpy.ops.flip_fluid_operators.bake_fluid_simulation_cmd()

using the same command as you would baking with the built-in fluid simulator:

blender --background file.blend --python script.py

Notes: This script will resume the fluid simulation from the last computed frame in the cache. If you want to reset the simulation cache, you may do so through the Blender scene as usual or by running the following script:

import bpy
bpy.ops.flip_fluid_operators.reset_bake()

I will add this to the documentation after some further testing and closer to the release of the next version.

@rlguy rlguy changed the title No documentation on how to bake via Python [Feature Request] Add functionality to bake from the command line Jun 8, 2018
@rlguy rlguy added the feature label Jun 8, 2018
@bholzer
Copy link
Author

bholzer commented Jun 8, 2018

Awesome, thanks so much, this should make my life easy!

@rlguy
Copy link
Owner

rlguy commented Aug 6, 2018

Documentation for this feature has been added here: https://github.com/rlguy/Blender-FLIP-Fluids/wiki/Baking-from-the-Command-Line

This feature will be available in the next version update (1.0.4 available August 11th).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants