I am trying to use Rhinocommon to get an png pictureFrame, but when it is done the png is shown with alpha channel unused(background not transparent).
And I have also tried to modify the alpha transparency of the material associated with the pictureFrame object. However it seems that that trick does not work.
Here is how my code organizes:
Guid picId = myDoc.Objects.AddPictureFrame(plane, filepath, false, _width, _height,false, false);
RhinoObject picobj = myDoc.Objects.FindId(picId);
int picMtrl = picobj.Attributes.MaterialIndex;
myDoc.Materials[picMtrl].AlphaTransparency = true;
picobj.GetMaterial(true).AlphaTransparency = true;
myDoc.Views.Redraw();
RhinoApp.WriteLine("alpha set done{0}, {1}", picMtrl, picobj.GetMaterial(false).AlphaTransparency);
The problem is that even I have set the alpha transparency value to “true”, the following output of this value is still “false”. So I am quite cofused and looking for some help. Thanks a lot.