Zipping an addon with a .blend file causes the string to curves node to loose the fonts folder #119277

Closed
opened 2024-03-10 11:46:41 +01:00 by Edward-Savage · 11 comments

System Information
Edition Windows 10 Home
Version 22H2
Installed on ‎29/‎09/‎2023
OS build 19045.4046
Experience Windows Feature Experience Pack 1000.19053.1000.0

Processor AMD Ryzen 5 3600 6-Core Processor 3.60 GHz
Installed RAM 16.0 GB
System type 64-bit operating system, x64-based processor

Blender Version
Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b7

Short description of error
i have a .blend file in my addon, so that i can append the objects within it. one of my objects has a string to curves node. when i zip the folder containing all the files for the addon, the string to curves node looses the font folder.

Exact steps for others to reproduce the error
the video shows the steps to recreate the error, and i have attached both the zipped version of the addon. since folders cant be uploaded here, you can unzip the folder to see the unzipped version, (as mentioned in the video, unzipping it does make it find the fonts folder again)

System Information Edition Windows 10 Home Version 22H2 Installed on ‎29/‎09/‎2023 OS build 19045.4046 Experience Windows Feature Experience Pack 1000.19053.1000.0 Processor AMD Ryzen 5 3600 6-Core Processor 3.60 GHz Installed RAM 16.0 GB System type 64-bit operating system, x64-based processor Blender Version Broken: version: 4.0.2, branch: blender-v4.0-release, commit date: 2023-12-05 07:41, hash: 9be62e85b7 **Short description of error** i have a .blend file in my addon, so that i can append the objects within it. one of my objects has a string to curves node. when i zip the folder containing all the files for the addon, the string to curves node looses the font folder. <video src="/attachments/e25b8477-fccc-4ffa-bae3-cdc8e6d1ce77" title="Bug_report_2_font_v3.mov" controls></video> **Exact steps for others to reproduce the error** the video shows the steps to recreate the error, and i have attached both the zipped version of the addon. since folders cant be uploaded here, you can unzip the folder to see the unzipped version, (as mentioned in the video, unzipping it does make it find the fonts folder again)
Edward-Savage added the
Status
Needs Triage
Priority
Normal
Type
Report
labels 2024-03-10 11:46:42 +01:00
Iliya Katushenock removed the
Status
Needs Triage
label 2024-03-10 12:04:37 +01:00
No description provided.

Hm, stop, not sure if i can confirm bug, if i just have no such font..

Hm, stop, not sure if i can confirm bug, if i just have no such font..
Iliya Katushenock added
Status
Needs Triage
Interest
Core
and removed
Module
Core
Status
Confirmed
labels 2024-03-10 12:10:57 +01:00
Author

it should work with any font that isnt the default one

it should work with any font that isnt the default one
Author

i think i found my font in the windows font folder C:\WINDOWS\Fonts\

i think i found my font in the windows font folder C:\WINDOWS\Fonts\

Vector font datablock does not seem to support relative paths, however you should be able to pack it into .blend file. Can you try packing fonts instead?

Vector font datablock does not seem to support relative paths, however you should be able to pack it into .blend file. Can you try packing fonts instead?
Richard Antalik added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-03-14 20:36:29 +01:00
Author

if you mean having the font file in the zip file/ folder, then that does work. it doesn't loose it.

if you mean having the font file in the zip file/ folder, then that does work. it doesn't loose it.

I meant something like clicking on File > External Data > Pack Resources. Or just packing fonts individually.

But I may be confused a bit - does this loose path to font even if these are placed in C:\WINDOWS\Fonts\? That should not happen.
Can you also check if this happens, when you do things manually (that are automated by addon)? If that is the case, it would be better to provide such steps.

I meant something like clicking on File > External Data > Pack Resources. Or just packing fonts individually. But I may be confused a bit - does this loose path to font even if these are placed in `C:\WINDOWS\Fonts\`? That should not happen. Can you also check if this happens, when you do things manually (that are automated by addon)? If that is the case, it would be better to provide such steps.
Author

I may not have explained it very well. Sorry.

  • When I pack the .blend file, it does not loose the font.
  • Having the font file in the folder does not result in it loosing it.
  • If using a font in C:\WINDOWS\Fonts\ then it does loose it.
  • The addon appends objects with geometry nodes, one of the node groups has a 'string to curve' node. This node looses the the fonts folder (C:\WINDOWS\Fonts\) when the addon is zipped. The steps to reproduce are shown in the video.

Hope that helps.

I may not have explained it very well. Sorry. - When I pack the .blend file, it does not loose the font. - Having the font file in the folder does not result in it loosing it. - If using a font in `C:\WINDOWS\Fonts\` then it does loose it. - The addon appends objects with geometry nodes, one of the node groups has a 'string to curve' node. This node looses the the fonts folder (`C:\WINDOWS\Fonts\`) when the addon is zipped. The steps to reproduce are shown in the video. Hope that helps.

Ok, will try to reproduce. I am on Linux, but it shouldn't matter.

Ok, will try to reproduce. I am on Linux, but it shouldn't matter.
Richard Antalik added
Status
Needs Triage
and removed
Status
Needs Information from User
labels 2024-03-15 21:46:39 +01:00

Ok checked the video and the file. So I did misunderstood this issue a bit. But mainly, I was incorrect, in that vector fonts do not support relative filepaths - printing value of D.fonts['Berlin Sans FB Regular'].filepath in py console returns '//../../../../../../WINDOWS/Fonts/BRLNSR.TTF', which is relative path. This is why the font does not show up when .blend file is moved to different folder.

And the path is relative, because this is the default option in filebrowser (shown in side panel):
Screenshot_2024-03-16_19-06-17.png

It is a question, whether font paths should be relative by default, but this is not a bug. Not sure if @Harley has any knowledge why it is relative by default or whether this may be subject to discussion.

But will close the report for now as this is working as expected.

Ok checked the video and the file. So I did misunderstood this issue a bit. But mainly, I was incorrect, in that vector fonts do not support relative filepaths - printing value of `D.fonts['Berlin Sans FB Regular'].filepath` in py console returns `'//../../../../../../WINDOWS/Fonts/BRLNSR.TTF'`, which is relative path. This is why the font does not show up when .blend file is moved to different folder. And the path is relative, because this is the default option in filebrowser (shown in side panel): ![Screenshot_2024-03-16_19-06-17.png](/attachments/28af1b49-c426-4c58-81e4-3f59070bcda1) It is a question, whether font paths should be relative by default, but this is not a bug. Not sure if @Harley has any knowledge why it is relative by default or whether this may be subject to discussion. But will close the report for now as this is working as expected.
Blender Bot added
Status
Archived
and removed
Status
Needs Triage
labels 2024-03-16 19:11:06 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser Project (Legacy)
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 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: blender/blender#119277
No description provided.