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:
authorJeroen Bakker <j.bakker@atmind.nl>2018-05-11 09:16:41 +0300
committerJeroen Bakker <j.bakker@atmind.nl>2018-05-11 09:17:05 +0300
commit6d155dc46206f69aa704c184d40f74274a4ec0cd (patch)
tree964f499416c7eb952db74210a7518ead7e42d4be /source/blender/blenkernel/intern/modifier.c
parent266638d7832b7794a315fff0c6cec347fc917602 (diff)
T54983: Bone selection overlay
Bone selection overlay is only available in pose mode. and when active overrules the selection buffer. This is currently `tricked` by switching the draw engines, but this is an exception. Not sure how to solve this in a better way. After this is solved we can look at how to localize the dim effect to only the objects connected to the active armatures. Currently it dims the whole screen (including background). @campbellbarton I added you as reviewer as it you have done a lot in the DRW_draw_select_loop Reviewers: campbellbarton, fclem Reviewed By: fclem Subscribers: campbellbarton Tags: #bf_blender_2.8, #code_quest Maniphest Tasks: T54983 Differential Revision: https://developer.blender.org/D3241
Diffstat (limited to 'source/blender/blenkernel/intern/modifier.c')
-rw-r--r--source/blender/blenkernel/intern/modifier.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index 7aa3aef40ca..cb97cee4547 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -627,6 +627,27 @@ Object *modifiers_isDeformedByArmature(Object *ob)
return NULL;
}
+Object *modifiers_isDeformedByMeshDeform(Object *ob)
+{
+ VirtualModifierData virtualModifierData;
+ ModifierData *md = modifiers_getVirtualModifierList(ob, &virtualModifierData);
+ MeshDeformModifierData *mdmd = NULL;
+
+ /* return the first selected armature, this lets us use multiple armatures */
+ for (; md; md = md->next) {
+ if (md->type == eModifierType_MeshDeform) {
+ mdmd = (MeshDeformModifierData *) md;
+ if (mdmd->object && (mdmd->object->flag & SELECT))
+ return mdmd->object;
+ }
+ }
+
+ if (mdmd) /* if were still here then return the last armature */
+ return mdmd->object;
+
+ return NULL;
+}
+
/* Takes an object and returns its first selected lattice, else just its lattice
* This should work for multiple lattices per object
*/