Userprefs not saved when setting StringProperty of subtype='DIR_PATH' with directory browser #77171

Closed
opened 2020-05-29 17:53:13 +02:00 by Adrian Björkerud · 6 comments

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.59

Blender Version
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: f1aa4d18d4
Worked: (optional)

Short description of error
We have an Addon where you can set up your project path in the Addon preferences that uses a StringProperty with the subtype='DIR_PATH'.
When editing the text field by hand by for example pasting in a path, the userprefs are written at blender closure.
But if you select a path with the directory browser the userprefs are not written on closure.

Exact steps for others to reproduce the error

  • Have an Addon with AddonPreferences class.
  • Have a StringProperty of subtype 'DIR_PATH' stored in the AddonPreferences
  • Open a empty blender scene and open addon preferences.
  • Set the StringProperty using the the directory browser button next to the text field.
  • Close Blender
  • Open Blender again, now the StringProperty is empty.

Thanks!

**System Information** Operating system: Windows-10-10.0.18362 64 Bits Graphics card: GeForce RTX 2080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 442.59 **Blender Version** Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-12-04 11:32, hash: `f1aa4d18d4` Worked: (optional) **Short description of error** We have an Addon where you can set up your project path in the Addon preferences that uses a StringProperty with the subtype='DIR_PATH'. When editing the text field by hand by for example pasting in a path, the userprefs are written at blender closure. But if you select a path with the directory browser the userprefs are not written on closure. **Exact steps for others to reproduce the error** - Have an Addon with AddonPreferences class. - Have a StringProperty of subtype 'DIR_PATH' stored in the AddonPreferences - Open a empty blender scene and open addon preferences. - Set the StringProperty using the the directory browser button next to the text field. - Close Blender - Open Blender again, now the StringProperty is empty. Thanks!

Added subscriber: @legendari

Added subscriber: @legendari
Member

Added subscriber: @ankitm

Added subscriber: @ankitm
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Could you test on later versions ?
I tried on 2.90, bdda53fdb2 & I can see the dir path after reopening Blender. Archipack, if you want to test. (let me know if I picked the wrong addon)
Are your "save preferences" settings wrong?

Could you test on later versions ? I tried on 2.90, bdda53fdb2 & I can see the dir path after reopening Blender. Archipack, if you want to test. (let me know if I picked the wrong addon) Are your "save preferences" settings wrong?

This issue was referenced by 3f648f5b42

This issue was referenced by 3f648f5b423347fa31e60cf52701a10862a157f1

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'
Campbell Barton self-assigned this 2020-06-11 09:26:12 +02:00
Sign in to join this conversation.
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
4 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#77171
No description provided.