Toolbar icons do not honour BLENDER_SYSTEM_DATAFILES #63775
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#63775
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: FreeBSD-12.0-STABLE-amd64-64bit-ELF 64 Bits
Graphics card: GeForce GT 730/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 390.87
Blender Version
Broken: version: 2.80 (sub 58), branch: master, commit date: 2019-04-20 17:01, hash:
d11d5403f0
Short description of error
The environment variable BLENDER_SYSTEM_DATAFILES can be set to allow placing datafiles in different locations. The toolbar icons fail to follow this path and can only be found using the
2.80/datafiles
path construct.Exact steps for others to reproduce the error
Move the
2.80/datafiles
folder to a different location than blender and set BLENDER_SYSTEM_DATAFILES to match. Only the toolbar icons fail to be found.Also setting BLENDER_USER_DATAFILES does not help. Could/should this also be included in the icon search path?
Added subscriber: @sambler
Added subscribers: @brecht, @ZedDB
@brecht who to assign this to?
Added subscriber: @lichtwerk
I think @lichtwerk did a fix in this area recently?
first note(s):
space_toolsystem_common.py
looks for icon folder in datafiles viabpy.utils.resource_path('LOCAL')
, thenbpy.utils.resource_path('SYSTEM')
resource_path
usesBKE_appdir_folder_id_version
(not good -- doesnt check environment variables at all)user_resource
usesBKE_appdir_folder_id_user_notest
(this checks environment variables but could fail -- because it doesnt check for subfolder existance -- seefe7c7d2820
)to reliably go over all possible directories [including checking if environment variables are set] it would be good to have the equivalent of what
init_iconfile_list()
does:icondir = BKE_appdir_folder_id(BLENDER_DATAFILES, "icons")
[In a way, this was done prior to
fe7c7d2820
]Needs a bit more thinking to get it right from bpy, stay tuned...
Added subscriber: @AbidMaqbool
Any ideas that could fix this for the 2.80 release?
Looking at this again today
Added subscriber: @ideasman42
To recap: from the bpy side we have:
bpy.utils.resource_path
('LOCAL'/'SYSTEM'/'USER')bpy.utils.user_resource
('CONFIG'/'DATAFILES'/'SCRIPTS')_USER_
environment variables (BLENDER_USER_DATAFILES, BLENDER_USER_CONFIG, ...)space_toolsystem_common.py
because we need a general path, not just the user pathSo as it seems we have no way to query a resource path from python that takes environment variables into account other than the
_USER_
ones.We would need such functionality in bpy for
space_toolsystem_common.py
to be able to reliably check where to get icons from.How about adding:
bpy.utils.resource
('CONFIG'/'DATAFILES'/'SCRIPTS')?BKE_appdir_folder_id
(which covers the environment variables)BLENDER_DATAFILES
folder_id
inBKE_appdir_folder_id
[this goes through the whole hierarchy of user first (envvar precedence), then local, then system (envvar precedence)]BLENDER_CONFIG
andBLENDER_SCRIPTS
[to go through the whole hierarchy of user first (envvar precedence), then local, then system (envvar precedence)]bpy.utils.resource_datafiles()
- takes no argumentsBKE_appdir_folder_id
withBLENDER_DATAFILES
folder_id
(so we are fully covered already)Sorry for the long blathering (I hope I am not overcomlicating things), but before implementing this, would like to get feedback from @brecht and @ideasman42 here...
Note though that I'll be away next week, so from my side, this wont be ready for 2.80 (unless someone else jumps in)...
See the following for implementing (and using)
bpy.utils.resource_datafiles()
P1045: T63775_resource_datafiles
note we are also in API freeze, so above solution would be for 2.81 I guess...
When setting BLENDER_SYSTEM_DATAFILES to relocate datafiles, P1045 works for me.
This issue was referenced by
07f3ad06fc
Changed status from 'Open' to: 'Resolved'
Looked into this,
BLENDER_DATAFILES
isn't correct since it may useBLENDER_USER_DATAFILES
which we never want in this case.Committed alternate fix.