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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-06-06 07:44:48 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-06-06 07:48:53 +0400
commit00f722042c07e847bebb2d19ae4d6a486b6fb1ab (patch)
treebc9bf2f8cc78bef2c1b7ab0b3cb835969b612a53 /source/blender/blenkernel/intern/library_query.c
parent81afc124420f4bdef6508698e18fd4319b1fa76d (diff)
Fix for missing visits of Freestyle-related ID data blocks in BKE_library_foreach_ID_link().
Diffstat (limited to 'source/blender/blenkernel/intern/library_query.c')
-rw-r--r--source/blender/blenkernel/intern/library_query.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index e9bdc3679c1..178209f52f4 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -47,6 +47,7 @@
#include "DNA_mask_types.h"
#include "DNA_node_types.h"
#include "DNA_object_force.h"
+#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "DNA_screen_types.h"
#include "DNA_speaker_types.h"
@@ -168,6 +169,7 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u
case ID_SCE:
{
Scene *scene = (Scene *) id;
+ SceneRenderLayer *srl;
Base *base;
CALLBACK_INVOKE(scene->camera, IDWALK_NOP);
@@ -178,6 +180,25 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u
}
CALLBACK_INVOKE(scene->obedit, IDWALK_NOP);
+ for (srl = scene->r.layers.first; srl; srl = srl->next) {
+ FreestyleModuleConfig *fmc;
+ FreestyleLineSet *fls;
+
+ for (fmc = srl->freestyleConfig.modules.first; fmc; fmc = fmc->next) {
+ if (fmc->script) {
+ CALLBACK_INVOKE(fmc->script, IDWALK_NOP);
+ }
+ }
+ for (fls = srl->freestyleConfig.linesets.first; fls; fls = fls->next) {
+ if (fls->group) {
+ CALLBACK_INVOKE(fls->group, IDWALK_NOP);
+ }
+ if (fls->linestyle) {
+ CALLBACK_INVOKE(fls->linestyle, IDWALK_NOP);
+ }
+ }
+ }
+
if (scene->ed) {
Sequence *seq;
SEQP_BEGIN(scene->ed, seq)
@@ -455,12 +476,38 @@ void BKE_library_foreach_ID_link(ID *id, LibraryIDLinkCallback callback, void *u
case ID_LS:
{
FreestyleLineStyle *linestyle = (FreestyleLineStyle *) id;
+ LineStyleModifier *m;
for (i = 0; i < MAX_MTEX; i++) {
if (linestyle->mtex[i]) {
library_foreach_mtex(&data, linestyle->mtex[i]);
}
}
CALLBACK_INVOKE(linestyle->nodetree, IDWALK_NOP);
+
+ for (m = (LineStyleModifier *)linestyle->color_modifiers.first; m; m = m->next) {
+ if (m->type == LS_MODIFIER_DISTANCE_FROM_OBJECT) {
+ LineStyleColorModifier_DistanceFromObject *p = (LineStyleColorModifier_DistanceFromObject *)m;
+ if (p->target) {
+ CALLBACK_INVOKE(p->target, IDWALK_NOP);
+ }
+ }
+ }
+ for (m = (LineStyleModifier *)linestyle->alpha_modifiers.first; m; m = m->next) {
+ if (m->type == LS_MODIFIER_DISTANCE_FROM_OBJECT) {
+ LineStyleAlphaModifier_DistanceFromObject *p = (LineStyleAlphaModifier_DistanceFromObject *)m;
+ if (p->target) {
+ CALLBACK_INVOKE(p->target, IDWALK_NOP);
+ }
+ }
+ }
+ for (m = (LineStyleModifier *)linestyle->thickness_modifiers.first; m; m = m->next) {
+ if (m->type == LS_MODIFIER_DISTANCE_FROM_OBJECT) {
+ LineStyleThicknessModifier_DistanceFromObject *p = (LineStyleThicknessModifier_DistanceFromObject *)m;
+ if (p->target) {
+ CALLBACK_INVOKE(p->target, IDWALK_NOP);
+ }
+ }
+ }
break;
}