Skip to content

Using --pattern with negation on glb's doesn't seem to be possible #1492

Open
@Kethatril

Description

Describe the bug
I'm attempting to only process textures in a glb that don't match *comp2 however since there is no texture URI (as its a glb and the textures are embedded) I have to also make it always fail vs an empty string and I can't seem to figure out if that's possible with micromatch.

To Reproduce
Steps to reproduce the behavior:
1 Use --pattern with negation (e.g. !*comp2 or any other negative pattern) on a glb with no URI's for textures
2 Notice that every texture is processed including ones where the name ends in comp2

Expected behavior
--patterns that contain negation should work as expected on glb's that don't have URI's for textures

Additional context
Possibly empty URI's should not be matched against here:

} else if (patternRe && !(texture.getURI().match(patternRe) || texture.getName().match(patternRe))) {

Or at least not when every texture URI is an empty string.

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions