bodymovin / bodymovin-extension

Bodymovin UI extension panel
MIT License
289 stars 962 forks source link

Last component of shape fill keyframe sometimes shows odd value #73

Open keithnbrown opened 3 years ago

keithnbrown commented 3 years ago

I'm dealing with a shape layer where the fill component of a shape group (containing a fill and a path, no stroke) tweens between colours.

The fill colour starts off life as #888888, then tweens to #000000 and finally to #122A32. Upon conversion however, the first keyframe's value of #888888 doesn't come out as I was expecting.

I've been assuming the colour keyframe value is expressed as float-RGBA as the first three elements in the value appear to be 0-1 representations of RGB, and as the alpha can't be edited in this component, the last element came out as 1. The issue I'm hitting is that under some circumstances the last (assumed alpha) element of the keyframe value comes out as non-1. I'm expecting "s": [0.533333361149,0.533333361149,0.533333361149,1] but getting "s": [0.533333361149,0.533333361149,0.533333361149,0.800000071526]

Is my assumption that this is RGBA correct? and if so why am i getting this odd value?

I do have a suspicion this may be an After Effects issue and the plugin is suffering from Garbage-In-Garbage-Out. As while I was checking this didn't affect other shape colour components, like strokes, the exported value fixed itself, and I've not been able to replicate since. I do have the version of the AE file that showed this issue saved off just in case.

bodymovin commented 3 years ago

hi, can you share a project to reproduce it?