FMod_Python *data = (FMod_Python *)fcm->data;
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- of library blocks that implement this.*/
+ * of library blocks that implement this.*/
IDP_WriteProperty(data->prop, wd);
}
break;
*screen= (window)? window->screen: NULL;
}
+typedef struct RenderInfo {
+ int sfra;
+ int efra;
+ char scene_name[MAX_ID_NAME - 2];
+} RenderInfo;
+
static void write_renderinfo(WriteData *wd, Main *mainvar) /* for renderdeamon */
{
bScreen *curscreen;
Scene *sce;
- int data[8];
+ RenderInfo data;
/* XXX in future, handle multiple windows with multiple screnes? */
current_screen_compat(mainvar, &curscreen);
for (sce= mainvar->scene.first; sce; sce= sce->id.next) {
if (sce->id.lib==NULL && ( sce==curscreen->scene || (sce->r.scemode & R_BG_RENDER)) ) {
- data[0]= sce->r.sfra;
- data[1]= sce->r.efra;
+ data.sfra = sce->r.sfra;
+ data.efra = sce->r.efra;
+ memset(data.scene_name, 0, sizeof(data.scene_name));
- memset(data+2, 0, sizeof(int)*6);
- BLI_strncpy((char *)(data+2), sce->id.name+2, sizeof(sce->id.name)-2);
+ BLI_strncpy(data.scene_name, sce->id.name + 2, sizeof(data.scene_name));
- writedata(wd, REND, 32, data);
+ writedata(wd, REND, sizeof(data), &data);
}
}
}
writestruct(wd, DATA, "BoidState", 1, state);
for (; rule; rule=rule->next) {
- switch(rule->type) {
+ switch (rule->type) {
case eBoidRuleType_Goal:
case eBoidRuleType_Avoid:
writestruct(wd, DATA, "BoidRuleGoalAvoid", 1, rule);
writedata(wd, DATA, sizeof(void *)*sens->totlinks, sens->links);
- switch(sens->type) {
+ switch (sens->type) {
case SENS_NEAR:
writestruct(wd, DATA, "bNearSensor", 1, sens->data);
break;
writedata(wd, DATA, sizeof(void *)*cont->totlinks, cont->links);
- switch(cont->type) {
+ switch (cont->type) {
case CONT_EXPRESSION:
writestruct(wd, DATA, "bExpressionCont", 1, cont->data);
break;
while (act) {
writestruct(wd, DATA, "bActuator", 1, act);
- switch(act->type) {
+ switch (act->type) {
case ACT_ACTION:
case ACT_SHAPEACTION:
writestruct(wd, DATA, "bActionActuator", 1, act->data);
writestruct(wd, DATA, "bConstraintTarget", 1, ct);
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- of library blocks that implement this.*/
+ * of library blocks that implement this.*/
IDP_WriteProperty(data->prop, wd);
}
break;
/* Write channels */
for (chan=pose->chanbase.first; chan; chan=chan->next) {
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- of library blocks that implement this.*/
+ * of library blocks that implement this.*/
if (chan->prop)
IDP_WriteProperty(chan->prop, wd);
else if (md->type==eModifierType_Smoke) {
SmokeModifierData *smd = (SmokeModifierData*) md;
- if (smd->type & MOD_SMOKE_TYPE_DOMAIN)
- {
- if (smd->domain)
- {
+ if (smd->type & MOD_SMOKE_TYPE_DOMAIN) {
+ if (smd->domain) {
write_pointcaches(wd, &(smd->domain->ptcaches[0]));
/* create fake pointcache so that old blender versions can read it */
else if (md->type==eModifierType_DynamicPaint) {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData*) md;
- if (pmd->canvas)
- {
+ if (pmd->canvas) {
DynamicPaintSurface *surface;
writestruct(wd, DATA, "DynamicPaintCanvasSettings", 1, pmd->canvas);
writestruct(wd, DATA, "EffectorWeights", 1, surface->effector_weights);
}
}
- if (pmd->brush)
- {
+ if (pmd->brush) {
writestruct(wd, DATA, "DynamicPaintBrushSettings", 1, pmd->brush);
writestruct(wd, DATA, "ColorBand", 1, pmd->brush->paint_ramp);
writestruct(wd, DATA, "ColorBand", 1, pmd->brush->vel_ramp);
/* write LibData */
writestruct(wd, ID_OB, "Object", 1, ob);
- /*Write ID Properties -- and copy this comment EXACTLY for easy finding
- of library blocks that implement this.*/
+ /* Write ID Properties -- and copy this comment EXACTLY for easy finding
+ * of library blocks that implement this.*/
if (ob->id.properties) IDP_WriteProperty(ob->id.properties, wd);
if (ob->adt) write_animdata(wd, ob->adt);
CustomData_file_write_info(layer->type, &structname, &structnum);
if (structnum) {
/* when using partial visibility, the MEdge and MFace layers
- are smaller than the original, so their type and count is
- passed to make this work */
+ * are smaller than the original, so their type and count is
+ * passed to make this work */
if (layer->type != partial_type) datasize= structnum*count;
else datasize= structnum*partial_count;
write_customdata(wd, &mesh->id, mesh->totedge, &mesh->edata, -1, 0);
write_customdata(wd, &mesh->id, mesh->totface, &mesh->fdata, -1, 0);
/* harmless for older blender versioins but _not_ writing these keeps file size down */
- /*
+#if 0
write_customdata(wd, &mesh->id, mesh->totloop, &mesh->ldata, -1, 0);
write_customdata(wd, &mesh->id, mesh->totpoly, &mesh->pdata, -1, 0);
- */
+#endif
/* restore */
mesh->mpoly = backup_mesh.mpoly;
/* write LibData */
writestruct(wd, ID_MA, "Material", 1, ma);
- /*Write ID Properties -- and copy this comment EXACTLY for easy finding
- of library blocks that implement this.*/
- /*manually set head group property to IDP_GROUP, just in case it hadn't been
- set yet :) */
+ /* Write ID Properties -- and copy this comment EXACTLY for easy finding
+ * of library blocks that implement this.*/
+ /* manually set head group property to IDP_GROUP, just in case it hadn't been
+ * set yet :) */
if (ma->id.properties) IDP_WriteProperty(ma->id.properties, wd);
if (ma->adt) write_animdata(wd, ma->adt);
/* reset write flags too */
- SEQ_BEGIN(ed, seq) {
+ SEQ_BEGIN (ed, seq) {
if (seq->strip) seq->strip->done= 0;
writestruct(wd, DATA, "Sequence", 1, seq);
}
SEQ_END
- SEQ_BEGIN(ed, seq) {
+ SEQ_BEGIN (ed, seq) {
if (seq->strip && seq->strip->done==0) {
/* write strip with 'done' at 0 because readfile */
if (seq->plugin) writestruct(wd, DATA, "PluginSeq", 1, seq->plugin);
if (seq->effectdata) {
- switch(seq->type) {
+ switch (seq->type) {
case SEQ_COLOR:
writestruct(wd, DATA, "SolidColorVars", 1, seq->effectdata);
break;
writestruct(wd, DATA, "ARegion", 1, ar);
if (ar->regiondata) {
- switch(spacetype) {
+ switch (spacetype) {
case SPACE_VIEW3D:
if (ar->regiontype==RGN_TYPE_WINDOW) {
RegionView3D *rv3d= ar->regiondata;
writestruct(wd, DATA, "Bone", 1, bone);
/* Write ID Properties -- and copy this comment EXACTLY for easy finding
- of library blocks that implement this.*/
+ * of library blocks that implement this.*/
if (bone->prop)
IDP_WriteProperty(bone->prop, wd);