diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-05-12 02:48:41 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-05-12 02:48:41 +0400 |
commit | 8925ed1420ea2557abc7867cf12f89730ef77718 (patch) | |
tree | 67a95fd12253de438e1bdb30bf6c90af2ff12d7f /source/blender/blenloader/intern/writefile.c | |
parent | bf2fac79d407a1d8c0e5727cc644d98eef60a965 (diff) | |
parent | 1c0c2f4d0bd6556a3dd7293ddbd419a066e745f4 (diff) |
Merged changes in the trunk up to revision 46557.
Conflicts resolved:
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/anim_channels_defines.c
source/blender/makesrna/intern/rna_scene.c
Additional changes:
* Fix for recent changes of BKE_* function renaming.
* Fix for an "attempt to free NULL pointer" in BlenderStrokeRenderer::RenderStrokeRepBasic().
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index c7bd33f5fad..35347ae40a3 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -153,6 +153,7 @@ Any case: direct data is ALWAYS after the lib block #include "BKE_node.h" #include "BKE_report.h" #include "BKE_sequencer.h" +#include "BKE_subsurf.h" #include "BKE_utildefines.h" #include "BKE_modifier.h" #include "BKE_fcurve.h" @@ -734,6 +735,11 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree) for (sock=node->inputs.first; sock; sock=sock->next) writestruct(wd, DATA, "NodeImageMultiFileSocket", 1, sock->storage); } + if (node->type==CMP_NODE_IMAGE) { + /* write extra socket info */ + for (sock=node->outputs.first; sock; sock=sock->next) + writestruct(wd, DATA, "NodeImageLayer", 1, sock->storage); + } } for (link= ntree->links.first; link; link= link->next) @@ -1272,7 +1278,7 @@ static void write_pose(WriteData *wd, bPose *pose) /* write IK param */ if (pose->ikparam) { - char *structname = (char *)get_ikparam_name(pose); + char *structname = (char *)BKE_pose_ikparam_get_name(pose); if (structname) writestruct(wd, DATA, structname, 1, pose->ikparam); } @@ -1655,6 +1661,24 @@ static void write_mdisps(WriteData *wd, int count, MDisps *mdlist, int external) } } +static void write_grid_paint_mask(WriteData *wd, int count, GridPaintMask *grid_paint_mask) +{ + if(grid_paint_mask) { + int i; + + writestruct(wd, DATA, "GridPaintMask", count, grid_paint_mask); + for(i = 0; i < count; ++i) { + GridPaintMask *gpm = &grid_paint_mask[i]; + if(gpm->data) { + const int gridsize = ccg_gridsize(gpm->level); + writedata(wd, DATA, + sizeof(*gpm->data) * gridsize * gridsize, + gpm->data); + } + } + } +} + static void write_customdata(WriteData *wd, ID *id, int count, CustomData *data, int partial_type, int partial_count) { int i; @@ -1677,6 +1701,13 @@ static void write_customdata(WriteData *wd, ID *id, int count, CustomData *data, else if (layer->type == CD_MDISPS) { write_mdisps(wd, count, layer->data, layer->flag & CD_FLAG_EXTERNAL); } + else if (layer->type == CD_PAINT_MASK) { + float *layer_data = layer->data; + writedata(wd, DATA, sizeof(*layer_data) * count, layer_data); + } + else if (layer->type == CD_GRID_PAINT_MASK) { + write_grid_paint_mask(wd, count, layer->data); + } else { CustomData_file_write_info(layer->type, &structname, &structnum); if (structnum) { @@ -1785,8 +1816,8 @@ static void write_meshs(WriteData *wd, ListBase *idbase) /* now fill in polys to mfaces*/ - mesh->totface= mesh_mpoly_to_mface(&mesh->fdata, &backup_mesh.ldata, &backup_mesh.pdata, - mesh->totface, backup_mesh.totloop, backup_mesh.totpoly); + mesh->totface = BKE_mesh_mpoly_to_mface(&mesh->fdata, &backup_mesh.ldata, &backup_mesh.pdata, + mesh->totface, backup_mesh.totloop, backup_mesh.totpoly); mesh_update_customdata_pointers(mesh, FALSE); @@ -2709,6 +2740,9 @@ static void write_movieclips(WriteData *wd, ListBase *idbase) MovieTrackingObject *object; writestruct(wd, ID_MC, "MovieClip", 1, clip); + if (clip->id.properties) + IDP_WriteProperty(clip->id.properties, wd); + if (clip->adt) write_animdata(wd, clip->adt); |