Blender V2.61 - r43446
|
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "BLI_blenlib.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "DNA_dynamicpaint_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_depsgraph.h"
#include "BKE_dynamicpaint.h"
#include "BKE_global.h"
#include "BKE_modifier.h"
#include "BKE_report.h"
#include "ED_mesh.h"
#include "ED_screen.h"
#include "ED_object.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "PIL_time.h"
#include "WM_types.h"
#include "WM_api.h"
#include "physics_intern.h"
Go to the source code of this file.
Functions | |
static int | surface_slot_add_exec (bContext *C, wmOperator *UNUSED(op)) |
void | DPAINT_OT_surface_slot_add (wmOperatorType *ot) |
static int | surface_slot_remove_exec (bContext *C, wmOperator *UNUSED(op)) |
void | DPAINT_OT_surface_slot_remove (wmOperatorType *ot) |
static int | type_toggle_exec (bContext *C, wmOperator *op) |
void | DPAINT_OT_type_toggle (wmOperatorType *ot) |
static int | output_toggle_exec (bContext *C, wmOperator *op) |
void | DPAINT_OT_output_toggle (wmOperatorType *ot) |
static int | dynamicPaint_bakeImageSequence (bContext *C, DynamicPaintSurface *surface, Object *cObject) |
static int | dynamicPaint_initBake (struct bContext *C, struct wmOperator *op) |
static int | dynamicpaint_bake_exec (bContext *C, wmOperator *op) |
void | DPAINT_OT_bake (wmOperatorType *ot) |
void DPAINT_OT_bake | ( | wmOperatorType * | ot | ) |
Definition at line 418 of file dynamicpaint_ops.c.
References wmOperatorType::description, dynamicpaint_bake_exec(), ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, and wmOperatorType::poll.
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_output_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 244 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, output_toggle_exec(), wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_surface_slot_add | ( | wmOperatorType * | ot | ) |
Definition at line 86 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and surface_slot_add_exec().
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_surface_slot_remove | ( | wmOperatorType * | ot | ) |
Definition at line 134 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and surface_slot_remove_exec().
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_type_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 180 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, MOD_DYNAMICPAINT_TYPE_CANVAS, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, wmOperatorType::prop, prop_dynamicpaint_type_items, RNA_def_enum(), wmOperatorType::srna, and type_toggle_exec().
Referenced by operatortypes_dynamicpaint().
static int dynamicpaint_bake_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 409 of file dynamicpaint_ops.c.
References dynamicPaint_initBake(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by DPAINT_OT_bake().
static int dynamicPaint_bakeImageSequence | ( | bContext * | C, |
DynamicPaintSurface * | surface, | ||
Object * | cObject | ||
) | [static] |
Definition at line 275 of file dynamicpaint_ops.c.
References blender_test_break(), BLI_join_dirfile(), BLI_path_frame(), BLI_strncpy(), DynamicPaintSurface::canvas, RenderData::cfra, CTX_data_main(), CTX_data_scene(), CTX_wm_window(), DynamicPaintSurface::current_frame, dynamicPaint_calculateFrame(), dynamicPaint_createUVSurface(), dynamicPaint_outputSurfaceImage(), ED_update_for_newframe(), DynamicPaintSurface::end_frame, DynamicPaintCanvasSettings::error, FILE_MAX, DynamicPaintSurface::flags, DynamicPaintSurface::image_output_path, MOD_DPAINT_OUT1, MOD_DPAINT_OUT2, MOD_DPAINT_SURFACE_T_PAINT, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, Scene::r, wmWindow::screen, DynamicPaintSurface::start_frame, DynamicPaintSurface::type, and WM_timecursor().
Referenced by dynamicPaint_initBake().
static int dynamicPaint_initBake | ( | struct bContext * | C, |
struct wmOperator * | op | ||
) | [static] |
Definition at line 344 of file dynamicpaint_ops.c.
References BKE_report(), BLI_snprintf(), BLI_strncpy(), BLI_timestr(), DynamicPaintModifierData::canvas, CTX_wm_window(), dynamicPaint_bakeImageSequence(), dynamicPaint_freeSurfaceData(), ED_object_context(), eModifierType_DynamicPaint, DynamicPaintCanvasSettings::error, DynamicPaintCanvasSettings::flags, G, get_activeSurface(), MOD_DPAINT_BAKING, modifiers_findByType(), NULL, PIL_check_seconds_timer(), wmOperator::reports, RPT_ERROR, RPT_INFO, RPT_WARNING, strlen(), and WM_cursor_restore().
Referenced by dynamicpaint_bake_exec().
static int output_toggle_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 201 of file dynamicpaint_ops.c.
References DynamicPaintModifierData::canvas, CTX_data_scene(), Object::data, defgroup_find_name(), dynamicPaint_outputLayerExists(), ED_mesh_color_add(), ED_mesh_color_remove_named(), ED_object_context(), ED_vgroup_add_name(), ED_vgroup_delete(), eModifierType_DynamicPaint, DynamicPaintSurface::format, get_activeSurface(), MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, modifiers_findByType(), OPERATOR_CANCELLED, OPERATOR_FINISHED, DynamicPaintSurface::output_name, DynamicPaintSurface::output_name2, wmOperator::ptr, RNA_enum_get(), and DynamicPaintSurface::type.
Referenced by DPAINT_OT_output_toggle().
static int surface_slot_add_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 59 of file dynamicpaint_ops.c.
References DynamicPaintCanvasSettings::active_sur, DynamicPaintModifierData::canvas, CTX_data_scene(), dynamicPaint_createNewSurface(), ED_object_context(), eModifierType_DynamicPaint, DynamicPaintSurface::flags, MOD_DPAINT_PREVIEW, modifiers_findByType(), NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, and DynamicPaintSurface::prev.
Referenced by DPAINT_OT_surface_slot_add().
static int surface_slot_remove_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 101 of file dynamicpaint_ops.c.
References DynamicPaintCanvasSettings::active_sur, DynamicPaintModifierData::canvas, DAG_id_tag_update(), dynamicPaint_freeSurface(), dynamicPaint_resetPreview(), ED_object_context(), eModifierType_DynamicPaint, ListBase::first, Object::id, modifiers_findByType(), NC_OBJECT, ND_MODIFIER, DynamicPaintSurface::next, NULL, OB_RECALC_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, DynamicPaintCanvasSettings::surfaces, and WM_event_add_notifier().
Referenced by DPAINT_OT_surface_slot_remove().
static int type_toggle_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 149 of file dynamicpaint_ops.c.
References DynamicPaintModifierData::brush, DynamicPaintModifierData::canvas, CTX_data_main(), CTX_data_scene(), DAG_id_tag_update(), DAG_scene_sort(), dynamicPaint_createType(), dynamicPaint_freeBrush(), dynamicPaint_freeCanvas(), ED_object_context(), eModifierType_DynamicPaint, Object::id, MOD_DYNAMICPAINT_TYPE_BRUSH, MOD_DYNAMICPAINT_TYPE_CANVAS, modifiers_findByType(), NC_OBJECT, ND_MODIFIER, OB_RECALC_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), and WM_event_add_notifier().
Referenced by DPAINT_OT_type_toggle().