Blender V2.61 - r43446
|
#include <math.h>
#include <string.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math.h"
#include "BLI_rand.h"
#include "BLI_utildefines.h"
#include "DNA_defs.h"
#include "DNA_meta_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "RNA_define.h"
#include "RNA_access.h"
#include "RNA_enum_types.h"
#include "BKE_depsgraph.h"
#include "BKE_context.h"
#include "BKE_mball.h"
#include "ED_mball.h"
#include "ED_screen.h"
#include "ED_view3d.h"
#include "ED_transform.h"
#include "ED_util.h"
#include "WM_api.h"
#include "WM_types.h"
#include "mball_intern.h"
Go to the source code of this file.
Definition in file mball_edit.c.
Definition at line 101 of file mball_edit.c.
References add_metaball_element(), copy_v3_v3(), CTX_data_edit_object(), Object::data, MetaBall::editelems, ListBase::first, MetaBall::lastelem, and SELECT.
static int delete_metaelems_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 296 of file mball_edit.c.
References BLI_remlink(), CTX_data_edit_object(), DAG_id_tag_update(), Object::data, MetaBall::editelems, ListBase::first, MetaElem::flag, MetaBall::lastelem, MEM_freeN(), NC_GEOM, ND_DATA, MetaElem::next, next, NULL, OPERATOR_FINISHED, SELECT, and WM_event_add_notifier().
Referenced by MBALL_OT_delete_metaelems().
static int duplicate_metaelems_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 237 of file mball_edit.c.
References BLI_addtail(), CTX_data_edit_object(), DAG_id_tag_update(), Object::data, MetaBall::editelems, MetaElem::flag, ListBase::last, MetaBall::lastelem, MEM_dupallocN(), NC_GEOM, ND_DATA, OPERATOR_FINISHED, MetaElem::prev, SELECT, and WM_event_add_notifier().
Referenced by duplicate_metaelems_invoke(), and MBALL_OT_duplicate_metaelems().
static int duplicate_metaelems_invoke | ( | bContext * | C, |
wmOperator * | op, | ||
wmEvent * | UNUSEDevent | ||
) | [static] |
Definition at line 261 of file mball_edit.c.
References duplicate_metaelems_exec(), OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_set(), TFM_TRANSLATION, WM_OP_INVOKE_REGION_WIN, and WM_operator_name_call().
Referenced by MBALL_OT_duplicate_metaelems().
static void* editMball_to_undoMball | ( | void * | lbe | ) | [static] |
Definition at line 537 of file mball_edit.c.
References BLI_addtail(), editelems, ListBase::first, ListBase::last, MEM_callocN(), MEM_dupallocN(), MetaElem::next, and NULL.
Referenced by undo_push_mball().
void free_editMball | ( | Object * | obedit | ) |
Definition at line 68 of file mball_edit.c.
References Object::data, MetaBall::editelems, MetaBall::lastelem, and NULL.
Referenced by ED_object_exit_editmode().
static void free_undoMball | ( | void * | lbv | ) | [static] |
Definition at line 559 of file mball_edit.c.
References freeMetaElemlist(), and MEM_freeN().
Referenced by undo_push_mball().
static void freeMetaElemlist | ( | ListBase * | lb | ) | [static] |
Definition at line 501 of file mball_edit.c.
References BLI_remlink(), ListBase::first, ListBase::last, MEM_freeN(), MetaElem::next, next, and NULL.
Referenced by free_undoMball(), and undoMball_to_editMball().
static void* get_data | ( | bContext * | C | ) | [static] |
Definition at line 577 of file mball_edit.c.
References CTX_data_edit_object(), and metaball_get_editelems().
Referenced by undo_push_mball().
static int hide_metaelems_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 338 of file mball_edit.c.
References CTX_data_edit_object(), DAG_id_tag_update(), Object::data, MetaBall::editelems, ListBase::first, invert(), MB_HIDE, NC_GEOM, ND_DATA, OPERATOR_FINISHED, wmOperator::ptr, RNA_boolean_get(), SELECT, and WM_event_add_notifier().
Referenced by MBALL_OT_hide_metaelems().
void load_editMball | ( | Object * | UNUSEDobedit | ) |
Definition at line 96 of file mball_edit.c.
void make_editMball | ( | Object * | obedit | ) |
Definition at line 78 of file mball_edit.c.
References Object::data, MetaBall::editelems, MetaBall::elems, ListBase::first, MetaBall::lastelem, MetaElem::next, and SELECT.
Referenced by ED_object_enter_editmode().
void MBALL_OT_delete_metaelems | ( | wmOperatorType * | ot | ) |
Definition at line 320 of file mball_edit.c.
References delete_metaelems_exec(), wmOperatorType::description, ED_operator_editmball(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, and wmOperatorType::poll.
Referenced by ED_operatortypes_metaball().
void MBALL_OT_duplicate_metaelems | ( | wmOperatorType * | ot | ) |
Definition at line 274 of file mball_edit.c.
References wmOperatorType::description, duplicate_metaelems_exec(), duplicate_metaelems_invoke(), ED_operator_editmball(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_enum(), wmOperatorType::srna, TFM_TRANSLATION, and transform_mode_types.
Referenced by ED_operatortypes_metaball().
void MBALL_OT_hide_metaelems | ( | wmOperatorType * | ot | ) |
Definition at line 360 of file mball_edit.c.
References wmOperatorType::description, ED_operator_editmball(), wmOperatorType::exec, wmOperatorType::flag, hide_metaelems_exec(), wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_boolean(), and wmOperatorType::srna.
Referenced by ED_operatortypes_metaball().
void MBALL_OT_reveal_metaelems | ( | wmOperatorType * | ot | ) |
Definition at line 401 of file mball_edit.c.
References wmOperatorType::description, ED_operator_editmball(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and reveal_metaelems_exec().
Referenced by ED_operatortypes_metaball().
void MBALL_OT_select_all | ( | wmOperatorType * | ot | ) |
Definition at line 167 of file mball_edit.c.
References wmOperatorType::description, ED_operator_editmball(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, mball_select_all_exec(), wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, and WM_operator_properties_select_all().
Referenced by ED_operatortypes_metaball().
void MBALL_OT_select_random_metaelems | ( | struct wmOperatorType * | ot | ) |
Definition at line 215 of file mball_edit.c.
References wmOperatorType::description, ED_operator_editmball(), wmOperatorType::exec, wmOperatorType::flag, wmOperatorType::idname, wmOperatorType::invoke, wmOperatorType::name, OPTYPE_REGISTER, OPTYPE_UNDO, wmOperatorType::poll, RNA_def_float_percentage(), select_random_metaelems_exec(), wmOperatorType::srna, and WM_operator_props_popup().
Referenced by ED_operatortypes_metaball().
static int mball_select_all_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 125 of file mball_edit.c.
References CTX_data_edit_object(), Object::data, MetaBall::editelems, ListBase::first, NC_GEOM, ND_SELECT, OPERATOR_FINISHED, wmOperator::ptr, RNA_enum_get(), SEL_DESELECT, SEL_INVERT, SEL_SELECT, SEL_TOGGLE, SELECT, and WM_event_add_notifier().
Referenced by MBALL_OT_select_all().
Definition at line 567 of file mball_edit.c.
References Object::data, MetaBall::editelems, NULL, OB_MBALL, and Object::type.
Referenced by get_data().
int mouse_mball | ( | bContext * | C, |
const int | mval[2], | ||
int | extend | ||
) |
Definition at line 418 of file mball_edit.c.
References CTX_data_edit_object(), Object::data, MetaBall::editelems, ListBase::first, MetaElem::flag, MetaBall::lastelem, MAXPICKBUF, MB_SCALE_RAD, NC_GEOM, ND_SELECT, MetaElem::next, NULL, MetaElem::selcol1, MetaElem::selcol2, SELECT, view3d_opengl_select(), view3d_set_viewcontext(), and WM_event_add_notifier().
Referenced by view3d_select_invoke().
static int reveal_metaelems_exec | ( | bContext * | C, |
wmOperator * | UNUSEDop | ||
) | [static] |
Definition at line 381 of file mball_edit.c.
References CTX_data_edit_object(), DAG_id_tag_update(), Object::data, MetaBall::editelems, ListBase::first, MB_HIDE, NC_GEOM, ND_DATA, OPERATOR_FINISHED, and WM_event_add_notifier().
Referenced by MBALL_OT_reveal_metaelems().
static int select_random_metaelems_exec | ( | bContext * | C, |
wmOperator * | op | ||
) | [static] |
Definition at line 187 of file mball_edit.c.
References BLI_frand(), BLI_rand(), BLI_srand(), CTX_data_edit_object(), Object::data, MetaBall::editelems, ListBase::first, NC_GEOM, ND_SELECT, OPERATOR_CANCELLED, OPERATOR_FINISHED, wmOperator::ptr, RNA_float_get(), SELECT, and WM_event_add_notifier().
Referenced by MBALL_OT_select_random_metaelems().
void undo_push_mball | ( | bContext * | C, |
const char * | name | ||
) |
Definition at line 584 of file mball_edit.c.
References editMball_to_undoMball(), free_undoMball(), get_data(), NULL, undo_editmode_push(), and undoMball_to_editMball().
Referenced by ED_undo_push().
static void undoMball_to_editMball | ( | void * | lbu, |
void * | lbe | ||
) | [static] |
Definition at line 519 of file mball_edit.c.
References BLI_addtail(), editelems, ListBase::first, freeMetaElemlist(), MEM_dupallocN(), and MetaElem::next.
Referenced by undo_push_mball().