diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-02-13 10:44:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-02-13 10:45:35 +0300 |
commit | d8992192e5512380f57433df113f3e3f8b22f7cb (patch) | |
tree | 0e35aca3d4dd40061dbb971457f3ab0357131830 /source/blender/makesdna | |
parent | 2c6d079a903ff16e2ae7e50082ef08c081cd29bf (diff) |
Object Mode: pass edit-object to outliner drawing
Also add 'OBEDIT_FROM_EVAL_CTX' macro.
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 671ad1bc954..4ed23f2dbe1 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -1944,6 +1944,9 @@ extern const char *RE_engine_id_CYCLES; #define BASACT(_view_layer) ((_view_layer)->basact) #define OBACT(_view_layer) (BASACT(_view_layer) ? BASACT(_view_layer)->object: NULL) +#define OBEDIT_FROM_EVAL_CTX(eval_ctx) \ + (((eval_ctx)->object_mode & OB_MODE_EDIT) ? OBACT((eval_ctx)->view_layer) : NULL) + #define V3D_CAMERA_LOCAL(v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : NULL) #define V3D_CAMERA_SCENE(scene, v3d) ((!(v3d)->scenelock && (v3d)->camera) ? (v3d)->camera : (scene)->camera) |