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:
authorBastien Montagne <bastien@blender.org>2020-05-15 19:45:54 +0300
committerBastien Montagne <bastien@blender.org>2020-05-15 20:03:53 +0300
commita8fc3c88efda66bcd8bada24ec0c8eb1e76cc852 (patch)
tree98c8ee6245a7327a44b69ea7bf2b4e96ed84cfe0 /source/blender/blenkernel/intern/lib_query.c
parent7ff933089adc1a40343210e4ea20b8339c7ad15a (diff)
Refactor: Move linestyle foreach_id to new IDTypeInfo structure.
Diffstat (limited to 'source/blender/blenkernel/intern/lib_query.c')
-rw-r--r--source/blender/blenkernel/intern/lib_query.c40
1 files changed, 1 insertions, 39 deletions
diff --git a/source/blender/blenkernel/intern/lib_query.c b/source/blender/blenkernel/intern/lib_query.c
index 6fa546804e2..228620d5d34 100644
--- a/source/blender/blenkernel/intern/lib_query.c
+++ b/source/blender/blenkernel/intern/lib_query.c
@@ -977,45 +977,7 @@ static void library_foreach_ID_link(Main *bmain,
}
case ID_LS: {
- FreestyleLineStyle *linestyle = (FreestyleLineStyle *)id;
-
- for (i = 0; i < MAX_MTEX; i++) {
- if (linestyle->mtex[i]) {
- BKE_texture_mtex_foreach_id(&data, linestyle->mtex[i]);
- }
- }
- if (linestyle->nodetree) {
- /* nodetree **are owned by IDs**, treat them as mere sub-data and not real ID! */
- BKE_library_foreach_ID_embedded(&data, (ID **)&linestyle->nodetree);
- }
-
- LISTBASE_FOREACH (LineStyleModifier *, lsm, &linestyle->color_modifiers) {
- if (lsm->type == LS_MODIFIER_DISTANCE_FROM_OBJECT) {
- LineStyleColorModifier_DistanceFromObject *p =
- (LineStyleColorModifier_DistanceFromObject *)lsm;
- if (p->target) {
- CALLBACK_INVOKE(p->target, IDWALK_CB_NOP);
- }
- }
- }
- LISTBASE_FOREACH (LineStyleModifier *, lsm, &linestyle->alpha_modifiers) {
- if (lsm->type == LS_MODIFIER_DISTANCE_FROM_OBJECT) {
- LineStyleAlphaModifier_DistanceFromObject *p =
- (LineStyleAlphaModifier_DistanceFromObject *)lsm;
- if (p->target) {
- CALLBACK_INVOKE(p->target, IDWALK_CB_NOP);
- }
- }
- }
- LISTBASE_FOREACH (LineStyleModifier *, lsm, &linestyle->thickness_modifiers) {
- if (lsm->type == LS_MODIFIER_DISTANCE_FROM_OBJECT) {
- LineStyleThicknessModifier_DistanceFromObject *p =
- (LineStyleThicknessModifier_DistanceFromObject *)lsm;
- if (p->target) {
- CALLBACK_INVOKE(p->target, IDWALK_CB_NOP);
- }
- }
- }
+ BLI_assert(0);
break;
}