What steps will reproduce the problem?
Create a color material an add a shader to it, shader parameter are not placed
into the output AWD file.
(code excerpt follows, compilable source [dumps to stdout] attached)
AWDMaterial *material = new AWDMaterial(AWD_MATTYPE_COLOR, name, len);
material->color = SILVER;
material->add_method(shader);
awd.add_material(material);
printf("AWDColorTransformMethod->calc_method_length(true) = %d\n",
shader->calc_method_length(true));
What is the expected output? What do you see instead?
The values for the shader multipliers and the color offset
are expected in the output AWD file, so in this case,
AWDColorTransformMethod->calc_method_length(true) should return something like
30.
But AWDColorTransformMethod->calc_method_length(true) returns 10.
two bytes for type [0192, 00000000, 00000000], four bytes for properties
length, four for user attributes length.
A hex dump of the output file is as follows (NOTE: no shader properties):
00000000 41 57 44 02 00 00 00 00 31 00 00 00 01 00 00 00 |AWD.....1.......|
00000010 00 51 00 26 00 00 00 06 00 73 69 6c 76 65 72 01 |.Q.&.....silver.|
00000020 01 0a 00 00 00 01 00 04 00 00 00 4d 41 52 53 92 |...........MARS.|
00000030 01 00 00 00 00 00 00 00 00 00 00 00 00 |.............|
What version of the product are you using? On what operating system?
$ hg identify -bint
f2c379aa1520 490 default tip
Please provide any additional information below.
It appears that the AWDColorTransformMethod::prepare_write() method is never
called. So properties are never copied into the list. It seems all the shader
types have this issue.
Original issue reported on code.google.com by elkq...@gmail.com on 23 Nov 2012 at 9:22
Original issue reported on code.google.com by
elkq...@gmail.com
on 23 Nov 2012 at 9:22Attachments: