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:
authorCampbell Barton <ideasman42@gmail.com>2014-03-31 01:23:40 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-31 02:58:17 +0400
commitf1962f187f432fadc03b92b64b0bd743a267bf95 (patch)
tree6bab6bdc7a698e85aa9315bec58175e0555bf41a /source/blender/editors/util/ed_transverts.c
parentf5b79dff412f61a2aa453a6ce50804e3425463a1 (diff)
Refactor: Add generic poll ED_transverts_poll
Diffstat (limited to 'source/blender/editors/util/ed_transverts.c')
-rw-r--r--source/blender/editors/util/ed_transverts.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c
index 4123132ad03..9f41642280b 100644
--- a/source/blender/editors/util/ed_transverts.c
+++ b/source/blender/editors/util/ed_transverts.c
@@ -43,6 +43,7 @@
#include "BKE_lattice.h"
#include "BKE_editmesh.h"
#include "BKE_DerivedMesh.h"
+#include "BKE_context.h"
#include "ED_armature.h"
@@ -460,3 +461,14 @@ void ED_transverts_free(TransVertStore *tvs)
MEM_SAFE_FREE(tvs->transverts);
tvs->transverts_tot = 0;
}
+
+int ED_transverts_poll(bContext *C)
+{
+ Object *obedit = CTX_data_edit_object(C);
+ if (obedit) {
+ if (ED_transverts_check_obedit(obedit)) {
+ return true;
+ }
+ }
+ return false;
+}