Resource link path lost in the .blender file #1

Open
opened 2024-10-25 09:44:16 +02:00 by Sun19 · 6 comments

I lost all resource link paths in my .blender files when adding them to the menu using your addon. When I open my .blender file manually, the resource link paths work fine, but when I open the .blender file using your addon, all the paths no longer function. To describe the error, I can say it's like moving a file from drive C to drive D, which causes the paths to be incorrect.

I lost all resource link paths in my .blender files when adding them to the menu using your addon. When I open my .blender file manually, the resource link paths work fine, but when I open the .blender file using your addon, all the paths no longer function. To describe the error, I can say it's like moving a file from drive C to drive D, which causes the paths to be incorrect.

Hi @Sun19!

Thanks for using the add-on, and for your report!


I think this is due to the fact that, by default, blender use relative paths (// paths, relative to the .blend file location).

So, when you open it as a template, initially there isn't a path at all, and if you save it in a different location than the template, those paths will not match the resources.


As a solution (and i will take care of update my README and wiki to advise about this asap), you can edit your template project, so that all paths became absolute (don't worry; you can do this with one click only, for all resources).

With absolute paths, your resources will work even when the project it not saved yet.

To do so, you can:

  • open your .blend template
  • use the operator File > External Data > Make Paths Absolute
  • Save the project

Once this is done, the template should work without any problems.

Let me know if you are able to solve the problem this way.


P.s. As soon as i have some time, i will check if i can give an option, while adding templates in the list, in order to automate this process (optionally). So users don't have to take care of doing this on their templates.

In case, i will add this feature in the next release!

Hi @Sun19! Thanks for using the add-on, and for your report! --- I think this is due to the fact that, by default, blender use relative paths (`//` paths, relative to the .blend file location). So, when you open it as a template, initially there isn't a path at all, and if you save it in a different location than the template, those paths will not match the resources. --- As a solution (and i will take care of update my README and wiki to advise about this asap), **you can edit your template project, so that all paths became absolute** (don't worry; you can do this with one click only, for all resources). With absolute paths, your resources will work even when the project it not saved yet. To do so, you can: - open your .blend template - use the operator `File > External Data > Make Paths Absolute` - Save the project Once this is done, the template should work without any problems. Let me know if you are able to solve the problem this way. --- P.s. As soon as i have some time, i will check if i can give an option, while adding templates in the list, in order to automate this process (optionally). So users don't have to take care of doing this on their templates. In case, i will add this feature in the next release!
Author

Thank you for your prompt support, I have applied

  • Use the operator File > External Data > Make Paths Absolute and it worked. Thank you very much.
    I hope that in the next update, you will make this process more automatic and easier.
Thank you for your prompt support, I have applied - Use the operator File > External Data > Make Paths Absolute and it worked. Thank you very much. I hope that in the next update, you will make this process more automatic and easier.

I hope that in the next update, you will make this process more automatic and easier.

After some testing and tries, seems like i found a solution to automate this, @Sun19.

It's currently WIP, but should be released very soon in 1.6.0. I just need to test it a bit more, and i want to try it also on Linux and Mac OS to ensure it's working just fine, on all platforms.

You can read something more in the 1.6.0 milestone, since the implementation is almost done.

> I hope that in the next update, you will make this process more automatic and easier. After some testing and tries, seems like i found a solution to automate this, @Sun19. It's currently WIP, but should be released very soon in `1.6.0`. I just need to test it a bit more, and i want to try it also on Linux and Mac OS to ensure it's working just fine, on all platforms. You can read something more in the [1.6.0 milestone](https://projects.blender.org/Francesco-Bellini/custom_templates_addon/milestone/28), since the implementation is almost done.
Author

I hope that in the next update, you will make this process more automatic and easier.

After some testing and tries, seems like i found a solution to automate this, @Sun19.

It's currently WIP, but should be released very soon in 1.6.0. I just need to test it a bit more, and i want to try it also on Linux and Mac OS to ensure it's working just fine, on all platforms.

You can read something more in the 1.6.0 milestone, since the implementation is almost done.

> > I hope that in the next update, you will make this process more automatic and easier. > > After some testing and tries, seems like i found a solution to automate this, @Sun19. > > It's currently WIP, but should be released very soon in `1.6.0`. I just need to test it a bit more, and i want to try it also on Linux and Mac OS to ensure it's working just fine, on all platforms. > > You can read something more in the [1.6.0 milestone](https://projects.blender.org/Francesco-Bellini/custom_templates_addon/milestone/28), since the implementation is almost done.
Sun19 closed this issue 2024-11-06 13:28:31 +01:00
Sun19 reopened this issue 2024-11-06 13:28:53 +01:00
Author

Tôi hy vọng rằng trong bản cập nhật tiếp theo, bạn sẽ làm cho quá trình này trở nên tự động và dễ dàng hơn. > > Sau một số lần thử nghiệm, có vẻ như tôi đã tìm ra giải pháp để tự động hóa việc này, @Sun19. > > Hiện tại nó là WIP, nhưng sẽ sớm được phát hành trong 1.6.0. Tôi chỉ cần kiểm tra nó thêm một chút và tôi cũng muốn thử nó trên Linux và Mac OS để đảm bảo nó hoạt động tốt trên tất cả các nền tảng. > > Bạn có thể đọc thêm nội dung nào đó trong cột mốc 1.6.0, vì quá trình triển khai gần như đã hoàn tất.

I am very happy to receive your message. I am currently using Blender 3.6. I really hope you continue updating to make it compatible with various Blender versions.

> > > Tôi hy vọng rằng trong bản cập nhật tiếp theo, bạn sẽ làm cho quá trình này trở nên tự động và dễ dàng hơn. > > Sau một số lần thử nghiệm, có vẻ như tôi đã tìm ra giải pháp để tự động hóa việc này, @Sun19. > > Hiện tại nó là WIP, nhưng sẽ sớm được phát hành trong `1.6.0`. Tôi chỉ cần kiểm tra nó thêm một chút và tôi cũng muốn thử nó trên Linux và Mac OS để đảm bảo nó hoạt động tốt trên tất cả các nền tảng. > > Bạn có thể đọc thêm nội dung nào đó trong [cột mốc 1.6.0](https://projects.blender.org/Francesco-Bellini/custom_templates_addon/milestone/28), vì quá trình triển khai gần như đã hoàn tất. > > I am very happy to receive your message. I am currently using Blender 3.6. I really hope you continue updating to make it compatible with various Blender versions.

This is based on the operator File > External Data > Make Paths Absolute, and i see the operator is there also on 2.83 (which is my lower supported target), so there shouldn't be any problems.

As usual i will release the legacy edition alongside, and your Blender version will be covered 👍


On a parallel track, i also opened a new proposal on Right Click Select.

Basically, instead of updating the original .blend file, it would be nice to transform the paths on the run, only when opening the template.
This way we wouldn't need to actually update the files.

I hope it will be implemented in some future, so this will be way more fast and less intrusive than my implementation. We'll see...

This is based on the operator `File > External Data > Make Paths Absolute`, and i see the operator is there also on 2.83 (which is my lower supported target), so there shouldn't be any problems. As usual i will release the legacy edition alongside, and your Blender version will be covered 👍 --- On a parallel track, i also opened a new [proposal on Right Click Select](https://blender.community/c/rightclickselect/xVZP/). Basically, instead of updating the original .blend file, it would be nice to transform the paths on the run, only when opening the template. This way we wouldn't need to actually update the files. I hope it will be implemented in some future, so this will be way more fast and less intrusive than my implementation. We'll see...
Francesco Bellini added this to the Version 1.6.0 milestone 2024-11-06 18:02:21 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Francesco-Bellini/custom_templates_addon#1
No description provided.