Blender
V3.3
|
#include <math.h>
#include <stdio.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "DNA_dynamicpaint_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BKE_context.h"
#include "BKE_deform.h"
#include "BKE_dynamicpaint.h"
#include "BKE_global.h"
#include "BKE_main.h"
#include "BKE_modifier.h"
#include "BKE_object_deform.h"
#include "BKE_report.h"
#include "BKE_screen.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_query.h"
#include "ED_mesh.h"
#include "ED_object.h"
#include "ED_screen.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_enum_types.h"
#include "PIL_time.h"
#include "WM_api.h"
#include "WM_types.h"
#include "physics_intern.h"
Go to the source code of this file.
Classes | |
struct | DynamicPaintBakeJob |
Typedefs | |
typedef struct DynamicPaintBakeJob | DynamicPaintBakeJob |
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 void | dpaint_bake_free (void *customdata) |
static void | dpaint_bake_endjob (void *customdata) |
static void | dynamicPaint_bakeImageSequence (DynamicPaintBakeJob *job) |
static void | dpaint_bake_startjob (void *customdata, short *stop, short *do_update, float *progress) |
static int | dynamicpaint_bake_exec (struct bContext *C, struct wmOperator *op) |
void | DPAINT_OT_bake (wmOperatorType *ot) |
typedef struct DynamicPaintBakeJob DynamicPaintBakeJob |
Definition at line 308 of file dynamicpaint_ops.c.
References BKE_spacedata_draw_locks(), DynamicPaintBakeJob::canvas, dynamicPaint_freeSurfaceData(), DynamicPaintCanvasSettings::error, DynamicPaintCanvasSettings::flags, G, G_MAIN, MOD_DPAINT_BAKING, PIL_check_seconds_timer(), RPT_ERROR, RPT_INFO, RPT_WARNING, DynamicPaintBakeJob::start, DynamicPaintBakeJob::success, DynamicPaintBakeJob::surface, WM_report(), WM_reportf(), and WM_set_locked_interface().
Referenced by dynamicpaint_bake_exec().
Definition at line 302 of file dynamicpaint_ops.c.
References MEM_freeN.
Referenced by dynamicpaint_bake_exec().
|
static |
Definition at line 431 of file dynamicpaint_ops.c.
References BKE_spacedata_draw_locks(), DynamicPaintBakeJob::do_update, dynamicPaint_bakeImageSequence(), G, PIL_check_seconds_timer(), DynamicPaintBakeJob::progress, DynamicPaintBakeJob::start, DynamicPaintBakeJob::stop, and DynamicPaintBakeJob::success.
Referenced by dynamicpaint_bake_exec().
void DPAINT_OT_bake | ( | wmOperatorType * | ot | ) |
Definition at line 516 of file dynamicpaint_ops.c.
References wmOperatorType::description, dynamicpaint_bake_exec(), ED_operator_object_active_local_editable(), wmOperatorType::exec, wmOperatorType::idname, wmOperatorType::name, ot, and wmOperatorType::poll.
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_output_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 258 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_local_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, ot, output_toggle_exec(), wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), and wmOperatorType::srna.
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_surface_slot_add | ( | struct wmOperatorType * | ot | ) |
Add surface slot.
Definition at line 81 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_local_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and surface_slot_add_exec().
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_surface_slot_remove | ( | struct wmOperatorType * | ot | ) |
Remove surface slot.
Definition at line 129 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_local_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, and surface_slot_remove_exec().
Referenced by operatortypes_dynamicpaint().
void DPAINT_OT_type_toggle | ( | wmOperatorType * | ot | ) |
Definition at line 179 of file dynamicpaint_ops.c.
References wmOperatorType::description, ED_operator_object_active_local_editable(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, MOD_DYNAMICPAINT_TYPE_CANVAS, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, wmOperatorType::prop, RNA_def_enum(), rna_enum_prop_dynamicpaint_type_items, wmOperatorType::srna, and type_toggle_exec().
Referenced by operatortypes_dynamicpaint().
|
static |
Definition at line 458 of file dynamicpaint_ops.c.
References BKE_modifiers_findby_type(), BKE_report(), DynamicPaintBakeJob::bmain, C, DynamicPaintBakeJob::canvas, DynamicPaintModifierData::canvas, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_manager(), CTX_wm_window(), DEG_get_evaluated_object(), DEG_get_evaluated_scene(), depsgraph, DynamicPaintBakeJob::depsgraph, dpaint_bake_endjob(), dpaint_bake_free(), dpaint_bake_startjob(), ED_object_context(), eModifierType_DynamicPaint, DynamicPaintCanvasSettings::error, DynamicPaintCanvasSettings::flags, get_activeSurface(), MEM_mallocN, MOD_DPAINT_BAKING, NC_OBJECT, ND_MODIFIER, NULL, DynamicPaintBakeJob::ob, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::reports, RPT_ERROR, DynamicPaintBakeJob::scene, surface, DynamicPaintBakeJob::surface, WM_JOB_PROGRESS, WM_JOB_TYPE_DPAINT_BAKE, WM_jobs_callbacks(), WM_jobs_customdata_set(), WM_jobs_get(), WM_jobs_start(), WM_jobs_timer(), and WM_set_locked_interface().
Referenced by DPAINT_OT_bake().
|
static |
Definition at line 343 of file dynamicpaint_ops.c.
References BLI_join_dirfile(), BLI_path_frame(), BLI_strncpy(), DynamicPaintBakeJob::bmain, RenderData::cfra, DEG_get_input_scene(), DynamicPaintBakeJob::depsgraph, DynamicPaintBakeJob::do_update, dynamicPaint_calculateFrame(), dynamicPaint_createUVSurface(), dynamicPaint_outputSurfaceImage(), ED_update_for_newframe(), DynamicPaintCanvasSettings::error, FILE_MAX, Main::filepath, G, MOD_DPAINT_OUT1, MOD_DPAINT_OUT2, MOD_DPAINT_SURFACE_T_PAINT, N_, DynamicPaintBakeJob::ob, DynamicPaintBakeJob::progress, Scene::r, scene, DynamicPaintBakeJob::scene, DynamicPaintBakeJob::success, surface, and DynamicPaintBakeJob::surface.
Referenced by dpaint_bake_startjob().
|
static |
Definition at line 205 of file dynamicpaint_ops.c.
References BKE_modifiers_findby_type(), BKE_object_defgroup_add_name(), BKE_object_defgroup_find_name(), BKE_object_defgroup_remove(), C, DynamicPaintModifierData::canvas, CTX_data_main(), Object::data, DEG_relations_tag_update(), dynamicPaint_outputLayerExists(), ED_mesh_color_add(), ED_mesh_color_remove_named(), ED_object_context(), eModifierType_DynamicPaint, get_activeSurface(), MOD_DPAINT_SURFACE_F_VERTEX, MOD_DPAINT_SURFACE_T_PAINT, MOD_DPAINT_SURFACE_T_WEIGHT, OPERATOR_CANCELLED, OPERATOR_FINISHED, output, wmOperator::ptr, wmOperator::reports, RNA_enum_get(), and surface.
Referenced by DPAINT_OT_output_toggle().
|
static |
Definition at line 53 of file dynamicpaint_ops.c.
References DynamicPaintCanvasSettings::active_sur, BKE_modifiers_findby_type(), C, DynamicPaintModifierData::canvas, CTX_data_scene(), dynamicPaint_createNewSurface(), ED_object_context(), eModifierType_DynamicPaint, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, and surface.
Referenced by DPAINT_OT_surface_slot_add().
|
static |
Definition at line 96 of file dynamicpaint_ops.c.
References DynamicPaintCanvasSettings::active_sur, BKE_modifiers_findby_type(), C, DynamicPaintModifierData::canvas, DEG_id_tag_update(), dynamicPaint_freeSurface(), ED_object_context(), eModifierType_DynamicPaint, ListBase::first, Object::id, ID_RECALC_GEOMETRY, NC_OBJECT, ND_MODIFIER, NULL, OPERATOR_CANCELLED, OPERATOR_FINISHED, surface, DynamicPaintCanvasSettings::surfaces, and WM_event_add_notifier().
Referenced by DPAINT_OT_surface_slot_remove().
|
static |
Definition at line 144 of file dynamicpaint_ops.c.
References BKE_modifiers_findby_type(), DynamicPaintModifierData::brush, C, DynamicPaintModifierData::canvas, CTX_data_main(), CTX_data_scene(), DEG_id_tag_update(), DEG_relations_tag_update(), dynamicPaint_createType(), dynamicPaint_freeBrush(), dynamicPaint_freeCanvas(), ED_object_context(), eModifierType_DynamicPaint, Object::id, ID_RECALC_GEOMETRY, MOD_DYNAMICPAINT_TYPE_BRUSH, MOD_DYNAMICPAINT_TYPE_CANVAS, NC_OBJECT, ND_MODIFIER, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), scene, type, and WM_event_add_notifier().
Referenced by DPAINT_OT_type_toggle().