Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_math.h"
#include "DNA_anim_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_material_types.h"
#include "DNA_scene_types.h"
#include "DNA_screen_types.h"
#include "BKE_anim_data.h"
#include "BKE_context.h"
#include "BKE_duplilist.h"
#include "BKE_gpencil.h"
#include "BKE_gpencil_geom.h"
#include "BKE_gpencil_modifier.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "WM_api.h"
#include "WM_types.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "ED_gpencil.h"
#include "ED_transform_snap_object_context.h"
#include "gpencil_intern.h"
Go to the source code of this file.
Classes | |
struct | GpBakeOb |
Functions | |
static void | gpencil_bake_set_frame_end (struct Main *UNUSED(main), struct Scene *UNUSED(scene), struct PointerRNA *ptr) |
static bool | gpencil_bake_grease_pencil_animation_poll (bContext *C) |
static void | animdata_keyframe_list_get (ListBase *ob_list, const bool only_selected, GHash *r_keyframes) |
static void | gpencil_bake_duplilist (Depsgraph *depsgraph, Scene *scene, Object *ob, ListBase *list) |
static void | gpencil_bake_ob_list (bContext *C, Depsgraph *depsgraph, Scene *scene, ListBase *list) |
static void | gpencil_bake_free_ob_list (ListBase *list) |
static int | gpencil_bake_grease_pencil_animation_exec (bContext *C, wmOperator *op) |
static int | gpencil_bake_grease_pencil_animation_invoke (bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) |
void | GPENCIL_OT_bake_grease_pencil_animation (wmOperatorType *ot) |
Variables | |
const EnumPropertyItem | rna_gpencil_reproject_type_items [] |
|
static |
Definition at line 104 of file gpencil_bake_animation.cc.
References AnimData::action, BKE_animdata_from_id(), BLI_ghash_haskey(), BLI_ghash_insert(), bAction::curves, BezTriple::f2, Object::id, if(), LISTBASE_FOREACH, GpBakeOb::ob, POINTER_FROM_INT, SELECT, and BezTriple::vec.
Referenced by gpencil_bake_grease_pencil_animation_exec().
|
static |
Definition at line 132 of file gpencil_bake_animation.cc.
References BLI_addtail(), depsgraph, free_object_duplilist(), LISTBASE_FOREACH, GpBakeOb::ob, OB_GPENCIL, object_duplilist(), and scene.
Referenced by gpencil_bake_ob_list().
Definition at line 187 of file gpencil_bake_animation.cc.
References LISTBASE_FOREACH_MUTABLE, and MEM_SAFE_FREE.
Referenced by gpencil_bake_grease_pencil_animation_exec().
|
static |
Definition at line 194 of file gpencil_bake_animation.cc.
References animdata_keyframe_list_get(), BKE_gpencil_frame_duplicate(), BKE_gpencil_layer_addnew(), BKE_gpencil_layer_frame_get(), BKE_gpencil_layer_named_get(), BKE_gpencil_object_material_index_get(), BKE_gpencil_stroke_geometry_update(), BKE_gpencil_time_modifier_cfra(), BKE_MAT_ASSIGN_USERPREF, BKE_object_material_assign(), BKE_object_material_get(), BKE_object_material_slot_add(), BKE_scene_graph_update_for_newframe(), BLI_addtail(), BLI_ghash_free(), BLI_ghash_haskey(), BLI_ghash_int_new(), BLI_sprintfN(), C, RenderData::cfra, CTX_data_ensure_evaluated_depsgraph(), CTX_data_main(), CTX_data_scene(), CTX_wm_view3d(), Scene::cursor, Object::data, DEG_get_ctime(), DEG_get_evaluated_object(), DEG_id_tag_update(), DEG_relations_tag_update(), depsgraph, bGPdata::draw_mode, ED_gpencil_add_object(), ED_gpencil_stroke_reproject(), ED_transform_snap_object_context_create(), ED_transform_snap_object_context_destroy(), RenderData::efra, bGPDframe::flag, bGPDframe::framenum, bGPDlayer::frames, GP_DRAWMODE_2D, GP_FRAME_SELECT, GP_GETFRAME_USE_PREV, GP_REPROJECT_KEEP, gpencil_bake_free_ob_list(), gpencil_bake_ob_list(), gpencil_point_conversion_init(), bGPdata::id, Scene::id, ID_RECALC_COPY_ON_WRITE, ID_RECALC_SELECT, bGPDspoint_Runtime::idx_orig, invert_m4_m4(), bGPdata::layers, LISTBASE_FOREACH, View3D::local_view_uuid, View3D::localvd, View3DCursor::location, MEM_freeN, mul_m4_v3(), NA_ADDED, NC_OBJECT, NC_SCENE, ND_OB_ACTIVE, NULL, GP_SpaceConversion::ob, Object::obmat, OPERATOR_FINISHED, POINTER_FROM_INT, bGPDspoint_Runtime::pt_orig, wmOperator::ptr, Scene::r, RNA_boolean_get(), RNA_enum_get(), RNA_int_get(), bGPDspoint::runtime, scene, RenderData::sfra, bGPDframe::strokes, Object::totcol, WM_cursor_wait(), WM_event_add_notifier(), and bGPDspoint::x.
Referenced by GPENCIL_OT_bake_grease_pencil_animation().
|
static |
Definition at line 370 of file gpencil_bake_animation.cc.
References C, CTX_data_scene(), RenderData::efra, wmOperator::ptr, r, Scene::r, RNA_property_int_get(), RNA_property_int_set(), RNA_property_is_set(), RNA_struct_find_property(), scene, RenderData::sfra, and WM_operator_props_dialog_popup().
Referenced by GPENCIL_OT_bake_grease_pencil_animation().
Definition at line 81 of file gpencil_bake_animation.cc.
References blender::compositor::area(), C, CTX_data_active_object(), CTX_data_mode_enum(), CTX_MODE_OBJECT, CTX_wm_area(), ELEM, OB_EMPTY, OB_GPENCIL, and Object::type.
Referenced by GPENCIL_OT_bake_grease_pencil_animation().
|
static |
Definition at line 150 of file gpencil_bake_animation.cc.
References BLI_addtail(), C, CTX_data_active_object(), CTX_DATA_BEGIN, CTX_DATA_END, depsgraph, gpencil_bake_duplilist(), GpBakeOb::ob, OB_EMPTY, OB_GPENCIL, scene, and Object::type.
Referenced by gpencil_bake_grease_pencil_animation_exec().
|
static |
Definition at line 68 of file gpencil_bake_animation.cc.
References ptr, RNA_int_get(), and RNA_int_set().
Referenced by GPENCIL_OT_bake_grease_pencil_animation().
void GPENCIL_OT_bake_grease_pencil_animation | ( | wmOperatorType * | ot | ) |
Definition at line 397 of file gpencil_bake_animation.cc.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, GP_REPROJECT_KEEP, gpencil_bake_grease_pencil_animation_exec(), gpencil_bake_grease_pencil_animation_invoke(), gpencil_bake_grease_pencil_animation_poll(), gpencil_bake_set_frame_end(), wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, ot, wmOperatorType::poll, RNA_def_boolean(), RNA_def_enum(), RNA_def_int(), RNA_def_property_update_runtime(), rna_gpencil_reproject_type_items, and wmOperatorType::srna.
Referenced by ED_operatortypes_gpencil().
const EnumPropertyItem rna_gpencil_reproject_type_items[] |
Definition at line 47 of file gpencil_bake_animation.cc.
Referenced by GPENCIL_OT_bake_grease_pencil_animation(), and GPENCIL_OT_bake_mesh_animation().