diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2009-01-03 21:43:11 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2009-01-03 21:43:11 +0300 |
commit | 666f82a0a9e0006c4360bec229a32f7cf53c2023 (patch) | |
tree | 2445e6157d35fe2a50c69730f10ccf6539cd263e /source | |
parent | 3c1a5883967c3769659ac1ea625cabf31c76bd03 (diff) |
2.5
- Make sure shader, composit and texture ntrees have an id.name. This is to ensure
that node trees in Material, Scene and Texture are properly identified through RNA
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 82923be09cf..843c769b92e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -8436,9 +8436,30 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (main->versionfile < 250) { bScreen *screen; + Material *ma; + Scene *sce; + Tex *tx; for(screen= main->screen.first; screen; screen= screen->id.next) do_versions_windowmanager_2_50(screen); + + /* shader, composit and texture node trees have id.name empty, put something in + * to have them show in RNA viewer and accessible otherwise. + */ + for(ma= main->mat.first; ma; ma= ma->id.next) { + if(ma->nodetree && strlen(ma->nodetree->id.name)==0) + strcpy(ma->nodetree->id.name, "NTShader Nodetree"); + } + /* and composit trees */ + for(sce= main->scene.first; sce; sce= sce->id.next) { + if(sce->nodetree && strlen(sce->nodetree->id.name)==0) + strcpy(sce->nodetree->id.name, "NTComposit Nodetree"); + } + /* and texture trees */ + for(tx= main->tex.first; tx; tx= tx->id.next) { + if(tx->nodetree && strlen(tx->nodetree->id.name)==0) + strcpy(tx->nodetree->id.name, "NTTexture Nodetree"); + } } |