after-effects icon indicating copy to clipboard operation
after-effects copied to clipboard

UtilCallback::begin_sampling is reporting a false positive error.

Open BeezBeez opened this issue 1 year ago • 0 comments

When you try to use UtilCallback::begin_sampling. Even if you pass the correct enums type you get the following error :

error[E0308]: arguments to this method are incorrect
   --> src\lib.rs:272:11
    |
272 | ...                   .begin_sampling(
    |                        ^^^^^^^^^^^^^^
273 | ...                       after_effects::Quality::Hi,
    |                           -------------------------- expected `Quality`, found `after_effects::Quality`
274 | ...                       after_effects::pf::ModeFlags::AlphaPremul,
    |                           ----------------------------------------- expected `ModeFlags`, found `after_effects::ModeFlags`
    |
note: method defined here
   --> C:\Users\Marvin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\after-effects-0.2.1\src\pf\util_callbacks.rs:278:12
    |
278 |     pub fn begin_sampling(&self, quality: Quality, mode_flags: ModeFlags) -> Result<Sampling, Error> {
    |            ^^^^^^^^^^^^^^

Here is a sample of my code.

let src_pixel = in_data
	.utils()
	.begin_sampling(
		after_effects::Quality::Hi,
		after_effects::pf::ModeFlags::AlphaPremul,
	)?
	.subpixel_sample(src_x as f32, src_y as f32)?;

When trying to specify the full crate path to the enum, rustc report I can't use an enum inside a private module.

BeezBeez avatar Oct 08 '24 02:10 BeezBeez