Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2008-12-31 20:11:42 +0300
committerTon Roosendaal <ton@blender.org>2008-12-31 20:11:42 +0300
commitc9b60a7b64c75bf999cb8390b328aa42e7a5f53f (patch)
treeebd8dc28b62913d6fa7d675c6d21ac31c5c3119e /source/blender/blenkernel/intern/constraint.c
parentb65a3e9337ac1d9c3870e0e04ee96090bc7e9b23 (diff)
2.5
So, editmode mesh is back! :) At the moment only TABkey works and mouse select, 1 vertex at a time. More will follow of course. Note for the devs: - G.editMesh has been removed, be careful with old code. - EditMesh now is property of Mesh itself Although it means unlimited editmodes, for migration purposes we better stick to 1 "obedit" per scene, which is in Context too - G.obedit will get removed soon, so use CTX_data_edit_object(C) Or if you can't, just scene->obedit for now - Also removed the CTX_data_edit_mesh(), this has no meaning anymore. EditMesh is not context senstitive anymore, only the edit-object for time being is. - Martin: I've already tucked some EditMesh pointer in T and removed all G.editMesh there.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r--source/blender/blenkernel/intern/constraint.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c
index 97a22f9d002..82b1c71e56a 100644
--- a/source/blender/blenkernel/intern/constraint.c
+++ b/source/blender/blenkernel/intern/constraint.c
@@ -44,6 +44,7 @@
#include "DNA_object_types.h"
#include "DNA_action_types.h"
#include "DNA_curve_types.h"
+#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_lattice_types.h"
#include "DNA_scene_types.h"
@@ -536,6 +537,7 @@ void constraint_mat_convertspace (Object *ob, bPoseChannel *pchan, float mat[][4
static void contarget_get_mesh_mat (Object *ob, char *substring, float mat[][4])
{
DerivedMesh *dm;
+ Mesh *me= ob->data;
float vec[3] = {0.0f, 0.0f, 0.0f}, tvec[3];
float normal[3] = {0.0f, 0.0f, 0.0f}, plane[3];
float imat[3][3], tmat[3][3];
@@ -549,9 +551,9 @@ static void contarget_get_mesh_mat (Object *ob, char *substring, float mat[][4])
if (dgroup < 0) return;
/* get DerivedMesh */
- if ((G.obedit == ob) && (G.editMesh)) {
+ if (me->edit_mesh) {
/* target is in editmode, so get a special derived mesh */
- dm = CDDM_from_editmesh(G.editMesh, ob->data);
+ dm = CDDM_from_editmesh(me->edit_mesh, ob->data);
}
else {
/* when not in EditMode, this should exist */
@@ -621,7 +623,7 @@ static void contarget_get_mesh_mat (Object *ob, char *substring, float mat[][4])
}
/* free temporary DerivedMesh created (in EditMode case) */
- if (G.editMesh) {
+ if (me->edit_mesh) {
if (dm) dm->release(dm);
}
}