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>2018-02-06 07:47:51 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-02-06 10:03:28 +0300
commit1c600cc643306c12f2bc652b2ea921ecbb3cfadf (patch)
tree93b2a082a93e03eac49b00ba82678ccaeb87973c /source/blender/makesrna/intern/rna_object_api.c
parent7b0cb7e00db3747633d205146475c9fa7c3d6f3b (diff)
Object Mode: use obdata when loading from editmode
Avoids having to check the objects mode in 'update_from_editmode'.
Diffstat (limited to 'source/blender/makesrna/intern/rna_object_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_object_api.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c
index 74528a2c0e8..17f19bfc38c 100644
--- a/source/blender/makesrna/intern/rna_object_api.c
+++ b/source/blender/makesrna/intern/rna_object_api.c
@@ -526,10 +526,8 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result)
static int rna_Object_update_from_editmode(Object *ob)
{
- if (ob->mode & OB_MODE_EDIT) {
- return ED_object_editmode_load(ob);
- }
- return false;
+ /* fail gracefully if we aren't in edit-mode. */
+ return ED_object_editmode_load(ob);
}
#else /* RNA_RUNTIME */