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:
authorDalai Felinto <dfelinto@gmail.com>2018-10-13 01:52:21 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-10-13 01:53:07 +0300
commit605fbad872d635c36154ca0a58155c7b8fd09eb9 (patch)
treeea63ab0bb15dd5849866f6a9833bc6311f5a2534 /source/blender/blenkernel/BKE_context.h
parentc462c43c1a050650a4328ea9291630964dd3c1ae (diff)
ED_pose_recalculate_paths: Run only for active object
New iterator CTX_DATA_BEGIN_FOR_ID, to restrict the loop to the specified object only. This is not super efficient, but it should be fine for now. I will talk to other developers. A more elegant solution would be to have something like "active_object_selected_pose_bones" in the context.
Diffstat (limited to 'source/blender/blenkernel/BKE_context.h')
-rw-r--r--source/blender/blenkernel/BKE_context.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_context.h b/source/blender/blenkernel/BKE_context.h
index 28dcf9cb127..1c73434cde5 100644
--- a/source/blender/blenkernel/BKE_context.h
+++ b/source/blender/blenkernel/BKE_context.h
@@ -249,6 +249,12 @@ void CTX_data_list_add(bContextDataResult *result, void *data);
CTX_DATA_BEGIN(C, Type, instance, member) \
Type_id instance_id = ctx_link->ptr.id.data; \
+#define CTX_DATA_BEGIN_FOR_ID(C, Type, instance, member, instance_id) \
+ CTX_DATA_BEGIN(C, Type, instance, member) \
+ if (ctx_link->ptr.id.data != (instance_id)) { \
+ continue; \
+ }
+
int ctx_data_list_count(const bContext *C, int (*func)(const bContext *, ListBase *));
#define CTX_DATA_COUNT(C, member) \