forked from bartvdbraak/blender
Bugfix #5626
HSV node in composite got a new variable (V) in july, but this was not initialized to '1' for older files. This commit adds the initialize, for when the V==0. It might therefore break cases saved with CVS versions with V set to 0 purposedly (not likely but possible).
This commit is contained in:
parent
95a202322d
commit
1d4a9ee6ca
@ -4183,6 +4183,23 @@ static void ntree_version_241(bNodeTree *ntree)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ntree_version_242(bNodeTree *ntree)
|
||||||
|
{
|
||||||
|
bNode *node;
|
||||||
|
|
||||||
|
if(ntree->type==NTREE_COMPOSIT) {
|
||||||
|
for(node= ntree->nodes.first; node; node= node->next) {
|
||||||
|
if(node->type==CMP_NODE_HUE_SAT) {
|
||||||
|
if(node->storage) {
|
||||||
|
NodeHueSat *nhs= node->storage;
|
||||||
|
if(nhs->val==0.0f) nhs->val= 1.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* somehow, probably importing via python, keyblock adrcodes are not in order */
|
/* somehow, probably importing via python, keyblock adrcodes are not in order */
|
||||||
static void sort_shape_fix(Main *main)
|
static void sort_shape_fix(Main *main)
|
||||||
{
|
{
|
||||||
@ -6124,6 +6141,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||||||
Nurb *nu;
|
Nurb *nu;
|
||||||
BezTriple *bezt;
|
BezTriple *bezt;
|
||||||
BPoint *bp;
|
BPoint *bp;
|
||||||
|
bNodeTree *ntree;
|
||||||
int a;
|
int a;
|
||||||
|
|
||||||
for(sc= main->screen.first; sc; sc= sc->id.next) {
|
for(sc= main->screen.first; sc; sc= sc->id.next) {
|
||||||
@ -6152,8 +6170,13 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||||||
else
|
else
|
||||||
sce->r.threads= 1;
|
sce->r.threads= 1;
|
||||||
}
|
}
|
||||||
|
if(sce->nodetree)
|
||||||
|
ntree_version_242(sce->nodetree);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for(ntree= main->nodetree.first; ntree; ntree= ntree->id.next)
|
||||||
|
ntree_version_242(ntree);
|
||||||
|
|
||||||
/* add default radius values to old curve points */
|
/* add default radius values to old curve points */
|
||||||
for(cu= main->curve.first; cu; cu= cu->id.next) {
|
for(cu= main->curve.first; cu; cu= cu->id.next) {
|
||||||
for(nu= cu->nurb.first; nu; nu= nu->next) {
|
for(nu= cu->nurb.first; nu; nu= nu->next) {
|
||||||
@ -6277,8 +6300,6 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
|||||||
bScreen *sc;
|
bScreen *sc;
|
||||||
Image *ima;
|
Image *ima;
|
||||||
Tex *tex;
|
Tex *tex;
|
||||||
Scene *sce;
|
|
||||||
bNodeTree *ntree;
|
|
||||||
|
|
||||||
/* Image refactor initialize */
|
/* Image refactor initialize */
|
||||||
for(ima= main->image.first; ima; ima= ima->id.next) {
|
for(ima= main->image.first; ima; ima= ima->id.next) {
|
||||||
|
Loading…
Reference in New Issue
Block a user