ac3d editor can read and write floating point material shi field even though it is an int in the standard so make accc read float but output int
git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@7138 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 7785d217b31cfd68250e6cb551eaf5bdff14c538 Former-commit-id: bae8ac5483f249e1f58d0fc069eebaf8e4524941
This commit is contained in:
parent
701614b816
commit
7434f6079f
2 changed files with 4 additions and 4 deletions
|
@ -630,7 +630,7 @@ int doMaterial(char *Line, ob_t *object, mat_t *material)
|
|||
return (-1);
|
||||
}
|
||||
sscanf(p,
|
||||
"%s rgb %lf %lf %lf amb %lf %lf %lf emis %lf %lf %lf spec %lf %lf %lf shi %d trans %lf",
|
||||
"%s rgb %lf %lf %lf amb %lf %lf %lf emis %lf %lf %lf spec %lf %lf %lf shi %lf trans %lf",
|
||||
name, &(materialt->rgb.r), &(materialt->rgb.g), &(materialt->rgb.b),
|
||||
&(materialt->amb.r), &(materialt->amb.g), &(materialt->amb.b),
|
||||
&(materialt->emis.r), &(materialt->emis.g), &(materialt->emis.b),
|
||||
|
@ -3085,7 +3085,7 @@ void computeSaveOBJ(char * OutputFilename, ob_t * object)
|
|||
tmat->emis.g, tmat->emis.b);
|
||||
fprintf(tfile, "Ks %lf %lf %lf\n", tmat->spec.r,
|
||||
tmat->spec.g, tmat->spec.b);
|
||||
fprintf(tfile, "Ns %d\n", tmat->shi);
|
||||
fprintf(tfile, "Ns %d\n", (int)tmat->shi);
|
||||
fprintf(tfile, "map_kd %s\n", tmpob->texture);
|
||||
break;
|
||||
}
|
||||
|
@ -3638,7 +3638,7 @@ void stripifyOb(ob_t * object, int writeit)
|
|||
object->textarray[v0 * 2 + 1]);
|
||||
if (object->texture1)
|
||||
{
|
||||
fprintf(ofile, " %.5f %.5f ", object->textarray1[v0 * 2],
|
||||
fprintf(ofile, " %.5f %.5f", object->textarray1[v0 * 2],
|
||||
object->textarray1[v0 * 2 + 1]);
|
||||
}
|
||||
if (object->texture2)
|
||||
|
|
|
@ -218,7 +218,7 @@ typedef struct mat
|
|||
color_t amb;
|
||||
color_t emis;
|
||||
color_t spec;
|
||||
int shi;
|
||||
double shi;
|
||||
double trans;
|
||||
struct mat * next;
|
||||
} mat_t;
|
||||
|
|
Loading…
Reference in a new issue