Page MenuHome

Fix: Node Wrangler - Principled Texture Setup error (with Relative Path option and blendfile and textures are on different drives)
ClosedPublic

Authored by Iyad Ahmed (iyadahmed2001) on Aug 16 2021, 12:10 AM.

Diff Detail

Event Timeline

the patch needs to be edited
it is not meaningful to set path to absolute here, pushing new changes asap

This is basically now the code from @Scott Ramsay (smramsay)

tested and working as expected

I can't test this at home, and don't know enough about filepaths to be sure this will fix it in every case.

I can't test this at home, and don't know enough about filepaths to be sure this will fix it in every case.

No problem

Jacques Lucke (JacquesLucke) requested changes to this revision.Aug 23 2021, 12:54 PM

That seems reasonable, I don't have a better solution. The only other solution I can think of is to cancel the operator in this case and force the user to uncheck relative_path.
Either way, it might be good to update the tooltip of relative_path to mention that it falls back to absolute path when it is not possible to create a relative path.

This revision now requires changes to proceed.Aug 23 2021, 12:54 PM

This should silently keep the path absolute (also for the unsaved scene case). That's how the builtin operators like image loading work.

Relative paths are not something that users are specifically asking for, it's the default behavior everywhere in Blender. If you have a files on another drive relative paths of course are not possible, but that's not something we should repeatedly bother users with, it's not a mistake to use such files.

Updated realtive_path property description

This should silently keep the path absolute (also for the unsaved scene case). That's how the builtin operators like image loading work.

Relative paths are not something that users are specifically asking for, it's the default behavior everywhere in Blender. If you have a files on another drive relative paths of course are not possible, but that's not something we should repeatedly bother users with, it's not a mistake to use such files.

yep agree, the patch does so, also updated property description

oh I see I need to disable the warning report?

The patch shows a warning in the status bar and prints to the console, it shouldn't do either.

The patch shows a warning in the status bar and prints to the console, it shouldn't do either.

Ah ok will change now

Remove warnings and console output when defaulting to absolute path

Adding Brecht as a reviewer because he knows better how Blender usually handles this situation.

Brecht Van Lommel (brecht) added inline comments.
node_wrangler.py
3179

Descriptions should not have line breaks like this, will fix as part of the commit.

This revision is now accepted and ready to land.Aug 24 2021, 7:21 PM