Blender  V2.93
ED_transverts.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2008 Blender Foundation.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct Object;
31 
32 typedef struct TransVert {
33  float *loc;
34  float oldloc[3], maploc[3];
35  float normal[3];
36  int flag;
38 
39 typedef struct TransVertStore {
42  int mode;
44 
45 void ED_transverts_create_from_obedit(TransVertStore *tvs, struct Object *obedit, const int mode);
46 void ED_transverts_update_obedit(TransVertStore *tvs, struct Object *obedit);
49 bool ED_transverts_poll(struct bContext *C);
50 
51 /* currently only used for bmesh index values */
52 enum {
59 };
60 
61 /* mode flags: */
62 enum {
64  TM_ALL_JOINTS = (1 << 0),
66  TM_SKIP_HANDLES = (1 << 1),
68  TM_CALC_NORMALS = (1 << 2),
69 };
70 
71 enum {
72  /* SELECT == (1 << 0) */
73  TX_VERT_USE_MAPLOC = (1 << 1),
74  TX_VERT_USE_NORMAL = (1 << 2), /* avoid nonzero check */
75 };
76 
77 #ifdef __cplusplus
78 }
79 #endif
@ TX_VERT_USE_MAPLOC
Definition: ED_transverts.h:73
@ TX_VERT_USE_NORMAL
Definition: ED_transverts.h:74
struct TransVert TransVert
bool ED_transverts_check_obedit(Object *obedit)
@ TM_INDEX_OFF
Definition: ED_transverts.h:56
@ TM_INDEX_ON
Definition: ED_transverts.h:54
@ TM_INDEX_SKIP
Definition: ED_transverts.h:58
void ED_transverts_update_obedit(TransVertStore *tvs, struct Object *obedit)
Definition: ed_transverts.c:52
bool ED_transverts_poll(struct bContext *C)
void ED_transverts_free(TransVertStore *tvs)
struct TransVertStore TransVertStore
@ TM_SKIP_HANDLES
Definition: ED_transverts.h:66
@ TM_CALC_NORMALS
Definition: ED_transverts.h:68
@ TM_ALL_JOINTS
Definition: ED_transverts.h:64
void ED_transverts_create_from_obedit(TransVertStore *tvs, struct Object *obedit, const int mode)
#define C
Definition: RandGen.cpp:39
struct TransVert * transverts
Definition: ED_transverts.h:40
float * loc
Definition: ED_transverts.h:33
float maploc[3]
Definition: ED_transverts.h:34
float oldloc[3]
Definition: ED_transverts.h:34
float normal[3]
Definition: ED_transverts.h:35