Revision: 40212
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40212
Author: kjym3
Date: 2011-09-15 00:06:49 +0000 (Thu, 15 Sep 2011)
Log Message:
-----------
Fix for the Link/Append commands not working when scenes had line styles.
The problem was reported by mato.sus304, thank you!
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/idcode.c
branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
branches/soc-2008-mxcurioni/source/blender/blenloader/intern/writefile.c
branches/soc-2008-mxcurioni/source/blender/editors/space_file/filelist.c
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
Modified: branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/idcode.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/idcode.c
2011-09-14 23:58:42 UTC (rev 40211)
+++ branches/soc-2008-mxcurioni/source/blender/blenkernel/intern/idcode.c
2011-09-15 00:06:49 UTC (rev 40212)
@@ -63,7 +63,7 @@
{ ID_KE, "Key", "keys", 0},
{ ID_LA, "Lamp", "lamps",
IDTYPE_FLAGS_ISLINKABLE},
{ ID_LI, "Library", "libraries", 0},
- { ID_LS, "FreestyleLineStyle", "linestyles", 0},
+ { ID_LS, "FreestyleLineStyle", "linestyles",
IDTYPE_FLAGS_ISLINKABLE},
{ ID_LT, "Lattice", "lattices",
IDTYPE_FLAGS_ISLINKABLE},
{ ID_MA, "Material", "materials",
IDTYPE_FLAGS_ISLINKABLE},
{ ID_MB, "Metaball", "metaballs",
IDTYPE_FLAGS_ISLINKABLE},
Modified:
branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
2011-09-14 23:58:42 UTC (rev 40211)
+++ branches/soc-2008-mxcurioni/source/blender/blenloader/intern/readfile.c
2011-09-15 00:06:49 UTC (rev 40212)
@@ -13188,6 +13188,7 @@
{
Base *base;
SceneRenderLayer *srl;
+ FreestyleLineSet *lineset;
for(base= sce->base.first; base; base= base->next) {
expand_doit(fd, mainvar, base->object);
@@ -13208,6 +13209,12 @@
for(srl= sce->r.layers.first; srl; srl= srl->next) {
expand_doit(fd, mainvar, srl->mat_override);
expand_doit(fd, mainvar, srl->light_override);
+
+ for (lineset= srl->freestyleConfig.linesets.first; lineset;
lineset= lineset->next) {
+ if (lineset->group)
+ expand_doit(fd, mainvar, lineset->group);
+ expand_doit(fd, mainvar, lineset->linestyle);
+ }
}
if(sce->r.dometext)
Modified:
branches/soc-2008-mxcurioni/source/blender/blenloader/intern/writefile.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/blenloader/intern/writefile.c
2011-09-14 23:58:42 UTC (rev 40211)
+++ branches/soc-2008-mxcurioni/source/blender/blenloader/intern/writefile.c
2011-09-15 00:06:49 UTC (rev 40212)
@@ -2040,8 +2040,6 @@
for(fls= srl->freestyleConfig.linesets.first; fls; fls
= fls->next) {
writestruct(wd, DATA, "FreestyleLineSet", 1,
fls);
- writestruct(wd, DATA, "FreestyleLineStyle", 1,
fls->linestyle);
- writestruct(wd, DATA, "Group", 1, fls->group);
}
}
Modified:
branches/soc-2008-mxcurioni/source/blender/editors/space_file/filelist.c
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/editors/space_file/filelist.c
2011-09-14 23:58:42 UTC (rev 40211)
+++ branches/soc-2008-mxcurioni/source/blender/editors/space_file/filelist.c
2011-09-15 00:06:49 UTC (rev 40212)
@@ -1105,7 +1105,7 @@
if( filelist->dir[0]==0) {
/* make directories */
- filelist->numfiles= 24;
+ filelist->numfiles= 25;
filelist->filelist= (struct direntry
*)malloc(filelist->numfiles * sizeof(struct direntry));
for(a=0; a<filelist->numfiles; a++) {
@@ -1136,6 +1136,7 @@
filelist->filelist[21].relname= BLI_strdup("Action");
filelist->filelist[22].relname= BLI_strdup("NodeTree");
filelist->filelist[23].relname= BLI_strdup("Speaker");
+ filelist->filelist[24].relname=
BLI_strdup("FreestyleLineStyle");
filelist_sort(filelist, FILE_SORT_ALPHA);
}
else {
Modified:
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
===================================================================
---
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
2011-09-14 23:58:42 UTC (rev 40211)
+++
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp
2011-09-15 00:06:49 UTC (rev 40212)
@@ -16,6 +16,7 @@
#include "DNA_camera_types.h"
#include "DNA_text_types.h"
+#include "DNA_group_types.h"
#include "DNA_freestyle_types.h"
#include "BKE_global.h"
@@ -418,6 +419,10 @@
FreestyleLineSet *lineset;
for(lineset=(FreestyleLineSet
*)srl->freestyleConfig.linesets.first; lineset; lineset=lineset->next) {
+ if (lineset->group) {
+ lineset->group->id.us--;
+ lineset->group = NULL;
+ }
lineset->linestyle->id.us--;
lineset->linestyle = NULL;
}
@@ -479,6 +484,10 @@
FreestyleLineSet *lineset = FRS_get_active_lineset(config);
if (lineset) {
+ if (lineset->group) {
+ lineset->group->id.us--;
+ lineset->group = NULL;
+ }
lineset->linestyle->id.us--;
lineset->linestyle = NULL;
BLI_remlink(&config->linesets, lineset);
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs