Blender V2.61 - r43446
|
#include "MEM_guardedalloc.h"
#include "BLI_math.h"
#include "BLI_utildefines.h"
#include "BLI_string.h"
#include "BLI_listbase.h"
#include "BLI_ghash.h"
#include "BLI_threads.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_mesh_types.h"
#include "BKE_cdderivedmesh.h"
#include "BKE_context.h"
#include "BKE_depsgraph.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_paint.h"
#include "BKE_key.h"
#include "BKE_mesh.h"
#include "WM_api.h"
#include "WM_types.h"
#include "GPU_buffers.h"
#include "ED_sculpt.h"
#include "paint_intern.h"
#include "sculpt_intern.h"
Go to the source code of this file.
Functions | |
static void | update_cb (PBVHNode *node, void *unused) |
static void | sculpt_restore_deformed (SculptSession *ss, SculptUndoNode *unode, int uindex, int oindex, float coord[3]) |
static void | sculpt_undo_restore (bContext *C, ListBase *lb) |
static void | sculpt_undo_free (ListBase *lb) |
SculptUndoNode * | sculpt_undo_get_node (PBVHNode *node) |
SculptUndoNode * | sculpt_undo_push_node (Object *ob, PBVHNode *node) |
void | sculpt_undo_push_begin (const char *name) |
void | sculpt_undo_push_end (void) |
Definition in file sculpt_undo.c.
static void sculpt_restore_deformed | ( | SculptSession * | ss, |
SculptUndoNode * | unode, | ||
int | uindex, | ||
int | oindex, | ||
float | coord[3] | ||
) | [static] |
Definition at line 76 of file sculpt_undo.c.
References SculptUndoNode::co, copy_v3_v3(), SculptSession::deform_cos, SculptUndoNode::orig_co, and swap_v3_v3().
Referenced by sculpt_undo_restore().
static void sculpt_undo_free | ( | ListBase * | lb | ) | [static] |
Definition at line 214 of file sculpt_undo.c.
References SculptUndoNode::co, ListBase::first, SculptUndoNode::grids, SculptUndoNode::index, SculptUndoNode::layer_disp, MEM_freeN(), SculptUndoNode::next, SculptUndoNode::no, and SculptUndoNode::orig_co.
Referenced by sculpt_undo_push_begin().
SculptUndoNode* sculpt_undo_get_node | ( | PBVHNode * | node | ) |
Definition at line 234 of file sculpt_undo.c.
References ListBase::first, SculptUndoNode::next, SculptUndoNode::node, NULL, UNDO_PAINT_MESH, and undo_paint_push_get_list().
Referenced by sculpt_raycast_cb(), sculpt_restore_mesh(), and sculpt_undo_push_node().
void sculpt_undo_push_begin | ( | const char * | name | ) |
Definition at line 323 of file sculpt_undo.c.
References sculpt_undo_free(), sculpt_undo_restore(), UNDO_PAINT_MESH, and undo_paint_push_begin().
Referenced by sculpt_stroke_test_start().
void sculpt_undo_push_end | ( | void | ) |
Definition at line 329 of file sculpt_undo.c.
References ListBase::first, SculptUndoNode::layer_disp, MEM_freeN(), SculptUndoNode::next, SculptUndoNode::no, NULL, UNDO_PAINT_MESH, undo_paint_push_end(), and undo_paint_push_get_list().
Referenced by sculpt_stroke_done().
SculptUndoNode* sculpt_undo_push_node | ( | Object * | ob, |
PBVHNode * | node | ||
) |
Definition at line 249 of file sculpt_undo.c.
References BLI_addtail(), BLI_lock_thread(), BLI_pbvh_node_get_grids(), BLI_pbvh_node_num_verts(), BLI_pbvh_vertex_iter_begin, BLI_pbvh_vertex_iter_end, BLI_strncpy(), BLI_unlock_thread(), PBVHVertexIter::co, SculptUndoNode::co, copy_v3_v3(), copy_v3_v3_short(), PBVHVertexIter::fno, SculptUndoNode::grids, SculptUndoNode::gridsize, PBVHVertexIter::i, Object::id, SculptUndoNode::idname, SculptUndoNode::index, SculptSession::kb, LOCK_CUSTOM1, SculptUndoNode::maxgrid, SculptUndoNode::maxvert, MEM_callocN(), MEM_mapallocN(), SculptSession::modifiers_active, KeyBlock::name, ID::name, PBVHVertexIter::no, SculptUndoNode::no, SculptUndoNode::node, normal_float_to_short_v3(), NULL, SculptUndoNode::orig_co, SculptSession::orig_cos, SculptSession::pbvh, PBVH_ITER_ALL, Object::sculpt, sculpt_undo_get_node(), SculptUndoNode::shapeName, SculptUndoNode::totgrid, SculptSession::totvert, SculptUndoNode::totvert, UNDO_PAINT_MESH, undo_paint_push_count_alloc(), undo_paint_push_get_list(), and PBVHVertexIter::vert_indices.
Referenced by calc_area_normal(), calc_area_normal_and_flatten_center(), calc_flatten_center(), do_brush_action(), do_grab_brush(), do_layer_brush(), do_rotate_brush(), do_thumb_brush(), and sculpt_combine_proxies().
Definition at line 84 of file sculpt_undo.c.
References BLI_findindex(), BLI_pbvh_apply_vertCos(), BLI_pbvh_search_callback(), BLI_pbvh_update(), Key::block, co, SculptUndoNode::co, CTX_data_active_object(), CTX_data_scene(), CTX_data_tool_settings(), DAG_id_tag_update(), Object::data, Object::derivedFinal, ListBase::first, MVert::flag, free_sculptsession_deformMats(), DerivedMesh::getGridData, DerivedMesh::getGridSize, DerivedMesh::getNumGrids, GPU_drawobject_free(), SculptUndoNode::grids, SculptUndoNode::gridsize, i, Object::id, SculptUndoNode::idname, SculptUndoNode::index, SculptSession::kb, key_get_named_keyblock(), key_to_vertcos(), SculptUndoNode::maxgrid, SculptUndoNode::maxvert, ME_VERT_PBVH_UPDATE, MEM_freeN(), mesh_calc_normals(), mesh_get_derived_final(), Mesh::mface, SculptSession::modifiers_active, multires_mark_as_modified(), Mesh::mvert, SculptSession::mvert, KeyBlock::name, ID::name, NC_OBJECT, ND_DATA, SculptUndoNode::next, NULL, ob_get_key(), OB_RECALC_DATA, SculptUndoNode::orig_co, SculptSession::pbvh, PBVH_UpdateBB, PBVH_UpdateOriginalBB, PBVH_UpdateRedraw, Object::sculpt, ToolSettings::sculpt, sculpt_multires_active(), sculpt_restore_deformed(), sculpt_update_mesh_elements(), sculpt_vertcos_to_key(), SculptUndoNode::shapeName, Object::shapenr, swap_v3_v3(), Mesh::totface, SculptUndoNode::totgrid, Mesh::totvert, SculptUndoNode::totvert, SculptSession::totvert, update(), update_cb(), and WM_event_add_notifier().
Referenced by sculpt_undo_push_begin().
static void update_cb | ( | PBVHNode * | node, |
void * | unused | ||
) | [static] |
Definition at line 70 of file sculpt_undo.c.
References BLI_pbvh_node_mark_update().
Referenced by BKE_bake_ocean(), BLI_dlrbTree_add(), BPy_BoolProperty(), BPy_BoolVectorProperty(), BPy_EnumProperty(), BPy_FloatProperty(), BPy_FloatVectorProperty(), BPy_IntProperty(), BPy_IntVectorProperty(), BPy_PointerProperty(), bpy_prop_callback_assign(), BPy_StringProperty(), and sculpt_undo_restore().