Exemplo n.º 1
0
static int fluid_bake_exec(bContext *C, wmOperator *op)
{
	if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), false))
		return OPERATOR_CANCELLED;

	return OPERATOR_FINISHED;
}
Exemplo n.º 2
0
static int fluid_bake_exec(bContext *C, wmOperator *op)
{
	Object *ob= CTX_data_active_object(C);

	// XXX TODO redraw, escape, non-blocking, ..
	if(!fluidsimBake(C, op->reports, ob))
		return OPERATOR_CANCELLED;

	return OPERATOR_FINISHED;
}
Exemplo n.º 3
0
static int fluid_bake_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
	/* only one bake job at a time */
	if (WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C), WM_JOB_TYPE_OBJECT_SIM_FLUID))
		return OPERATOR_CANCELLED;

	if (!fluidsimBake(C, op->reports, CTX_data_active_object(C), true))
		return OPERATOR_CANCELLED;

	return OPERATOR_FINISHED;
}