Hi Ton, well drawing node (uses RNA) and Python API also crashes and these happen before the compositor system is executed. During loading seems to be the best option. These versioning hacks are for new features (that are not available in older blender versions. They only crash when node didn't had storage assigned. There are only a few nodes left without storage.
Jeroen - At Mind - On 02/07/2013 01:55 PM, Ton Roosendaal wrote: > Hi Jeroen, > > The amount of versioning hacks in Blender nodes is growing really out of > control. > > If you decide to change the specification of nodes, it could be designed in a > way that the code (node execs) handle it, without changing the file spec. > > Now it seems like trunk-saved translation nodes won't work in 2.65a? > > -Ton- > > ------------------------------------------------------------------------ > Ton Roosendaal Blender Foundation t...@blender.org www.blender.org > Blender Institute Entrepotdok 57A 1018AD Amsterdam The Netherlands > > On 3 Feb, 2013, at 16:38, Jeroen Bakker wrote: > >> Revision: 54279 >> >> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54279 >> Author: jbakker >> Date: 2013-02-03 15:38:06 +0000 (Sun, 03 Feb 2013) >> Log Message: >> ----------- >> Fix for [#34089] Crash opening file containing translation node saved before >> rev54235 >> >> Revision Links: >> -------------- >> >> http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54235 >> >> Modified Paths: >> -------------- >> trunk/blender/source/blender/blenloader/intern/readfile.c >> >> Modified: trunk/blender/source/blender/blenloader/intern/readfile.c >> =================================================================== >> --- trunk/blender/source/blender/blenloader/intern/readfile.c >> 2013-02-03 15:06:16 UTC (rev 54278) >> +++ trunk/blender/source/blender/blenloader/intern/readfile.c >> 2013-02-03 15:38:06 UTC (rev 54279) >> @@ -7342,6 +7342,17 @@ >> } >> } >> >> +static void do_version_node_fix_translate_wrapping(void *UNUSED(data), ID >> *UNUSED(id), bNodeTree *ntree) >> +{ >> + bNode *node; >> + >> + for (node = ntree->nodes.first; node; node = node->next) { >> + if (node->type == CMP_NODE_TRANSLATE && node->storage == NULL) { >> + node->storage = MEM_callocN(sizeof(NodeTranslateData), "node >> translate data"); >> + } >> + } >> +} >> + >> static void do_version_node_fix_internal_links_264(void *UNUSED(data), ID >> *UNUSED(id), bNodeTree *ntree) >> { >> bNode *node; >> @@ -8716,6 +8727,17 @@ >> } >> } >> >> + // add storage for compositor translate nodes when not existing >> + if (!MAIN_VERSION_ATLEAST(main, 265, 9)) { >> + bNodeTreeType *ntreetype; >> + >> + ntreetype = ntreeGetType(NTREE_COMPOSIT); >> + if (ntreetype && ntreetype->foreach_nodetree) >> + ntreetype->foreach_nodetree(main, NULL, >> do_version_node_fix_translate_wrapping); >> + } >> + >> + >> + >> // if (main->versionfile < 265 || (main->versionfile == 265 && >> main->subversionfile < 7)) { >> >> /* WATCH IT!!!: pointers from libdata have not been converted yet here! >> */ >> >> _______________________________________________ >> Bf-blender-cvs mailing list >> bf-blender-...@blender.org >> http://lists.blender.org/mailman/listinfo/bf-blender-cvs > _______________________________________________ > Bf-committers mailing list > Bf-committers@blender.org > http://lists.blender.org/mailman/listinfo/bf-committers > _______________________________________________ Bf-committers mailing list Bf-committers@blender.org http://lists.blender.org/mailman/listinfo/bf-committers