Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include <unistd.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_scene_types.h"
#include "DNA_object_types.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_key.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_curve.h"
#include "BLO_sys_types.h"
#include "ED_object.h"
#include "ED_mesh.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
#include "object_intern.h"
Go to the source code of this file.
Functions | |
static void | ED_object_shape_key_add (bContext *C, Scene *scene, Object *ob, int from_mix) |
static int | ED_object_shape_key_remove (bContext *C, Object *ob) |
static int | object_shape_key_mirror (bContext *C, Object *ob) |
static int | shape_key_mode_poll (bContext *C) |
static int | shape_key_poll (bContext *C) |
static int | shape_key_add_exec (bContext *C, wmOperator *op) |
void | OBJECT_OT_shape_key_add (wmOperatorType *ot) |
static int | shape_key_remove_exec (bContext *C, wmOperator *UNUSED(op)) |
void | OBJECT_OT_shape_key_remove (wmOperatorType *ot) |
static int | shape_key_clear_exec (bContext *C, wmOperator *UNUSED(op)) |
void | OBJECT_OT_shape_key_clear (wmOperatorType *ot) |
static int | shape_key_mirror_exec (bContext *C, wmOperator *UNUSED(op)) |
void | OBJECT_OT_shape_key_mirror (wmOperatorType *ot) |
static int | shape_key_move_exec (bContext *C, wmOperator *op) |
void | OBJECT_OT_shape_key_move (wmOperatorType *ot) |
Definition in file object_shapekey.c.
static void ED_object_shape_key_add | ( | bContext * | C, |
Scene * | scene, | ||
Object * | ob, | ||
int | from_mix | ||
) | [static] |
Definition at line 77 of file object_shapekey.c.
References BLI_countlist(), Key::block, NC_OBJECT, ND_DRAW, NULL, ob_get_key(), object_insert_shape_key(), Object::shapenr, and WM_event_add_notifier().
Referenced by shape_key_add_exec().
Definition at line 89 of file object_shapekey.c.
References KeyBlock::adrcode, BKE_curve_nurbs(), BLI_findlink(), BLI_remlink(), Key::block, CTX_data_main(), DAG_id_tag_update(), KeyBlock::data, Object::data, ListBase::first, free_libblock_us(), Key::from, GS, Object::id, ID_CU, ID_LT, ID_ME, Main::key, key_to_curve(), key_to_latt(), key_to_mesh(), MEM_freeN(), ID::name, NC_OBJECT, ND_DRAW, KeyBlock::next, NULL, OB_CURVE, ob_get_key(), OB_LATTICE, OB_MESH, OB_RECALC_DATA, OB_SURF, Key::refkey, KeyBlock::relative, Object::shapenr, Key::totkey, Object::type, and WM_event_add_notifier().
Referenced by shape_key_remove_exec().
void OBJECT_OT_shape_key_add | ( | wmOperatorType * | ot | ) |
Definition at line 296 of file object_shapekey.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), shape_key_add_exec(), shape_key_mode_poll(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_shape_key_clear | ( | wmOperatorType * | ot | ) |
Definition at line 357 of file object_shapekey.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, shape_key_clear_exec(), and shape_key_poll().
Referenced by ED_operatortypes_object().
void OBJECT_OT_shape_key_mirror | ( | wmOperatorType * | ot | ) |
Definition at line 382 of file object_shapekey.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, shape_key_mirror_exec(), and shape_key_mode_poll().
Referenced by ED_operatortypes_object().
void OBJECT_OT_shape_key_move | ( | wmOperatorType * | ot | ) |
Definition at line 445 of file object_shapekey.c.
References wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, NULL, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), shape_key_mode_poll(), shape_key_move_exec(), and wmOperatorType::srna.
Referenced by ED_operatortypes_object().
void OBJECT_OT_shape_key_remove | ( | wmOperatorType * | ot | ) |
Definition at line 324 of file object_shapekey.c.
References wmOperatorType::description, wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, shape_key_mode_poll(), and shape_key_remove_exec().
Referenced by ED_operatortypes_object().
Definition at line 169 of file object_shapekey.c.
References BLI_findlink(), Key::block, copy_v3_v3(), DAG_id_tag_update(), KeyBlock::data, Object::data, Object::id, LT_INDEX, MEM_callocN(), MEM_freeN(), mesh_get_x_mirror_vert(), mesh_octree_table(), Mesh::mvert, NC_OBJECT, ND_DRAW, NULL, ob_get_key(), OB_LATTICE, OB_MESH, OB_RECALC_DATA, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, Object::shapenr, KeyBlock::totelem, Object::type, simple_enum_gen::w, and WM_event_add_notifier().
Referenced by shape_key_mirror_exec().
static int shape_key_add_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 285 of file object_shapekey.c.
References CTX_data_scene(), ED_object_context(), ED_object_shape_key_add(), OPERATOR_FINISHED, wmOperator::ptr, and RNA_boolean_get().
Referenced by OBJECT_OT_shape_key_add().
static int shape_key_clear_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 339 of file object_shapekey.c.
References Key::block, KeyBlock::curval, DAG_id_tag_update(), ED_object_context(), ListBase::first, Object::id, NC_OBJECT, ND_DRAW, KeyBlock::next, ob_get_key(), ob_get_keyblock(), OB_RECALC_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by OBJECT_OT_shape_key_clear().
static int shape_key_mirror_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 372 of file object_shapekey.c.
References ED_object_context(), object_shape_key_mirror(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by OBJECT_OT_shape_key_mirror().
static int shape_key_mode_poll | ( | bContext * | C | ) | [static] |
Definition at line 271 of file object_shapekey.c.
References Object::data, data, ED_object_context(), Object::id, ID::lib, Object::mode, NULL, and OB_MODE_EDIT.
Referenced by OBJECT_OT_shape_key_add(), OBJECT_OT_shape_key_mirror(), OBJECT_OT_shape_key_move(), and OBJECT_OT_shape_key_remove().
static int shape_key_move_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 397 of file object_shapekey.c.
References BLI_findlink(), BLI_insertlinkafter(), BLI_insertlinkbefore(), BLI_remlink(), Key::block, DAG_id_tag_update(), ED_object_context(), ListBase::first, Object::id, NC_OBJECT, ND_DRAW, KeyBlock::next, NULL, ob_get_key(), OB_RECALC_DATA, OPERATOR_CANCELLED, OPERATOR_FINISHED, KeyBlock::prev, wmOperator::ptr, KeyBlock::relative, RNA_enum_get(), Object::shapenr, and WM_event_add_notifier().
Referenced by OBJECT_OT_shape_key_move().
static int shape_key_poll | ( | bContext * | C | ) | [static] |
Definition at line 278 of file object_shapekey.c.
References Object::data, data, ED_object_context(), Object::id, ID::lib, and NULL.
Referenced by OBJECT_OT_shape_key_clear().
static int shape_key_remove_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 314 of file object_shapekey.c.
References ED_object_context(), ED_object_shape_key_remove(), OPERATOR_CANCELLED, and OPERATOR_FINISHED.
Referenced by OBJECT_OT_shape_key_remove().