New File Browser no longer automatically appends file extensions #69457

Closed
opened 2019-09-03 21:55:57 +02:00 by William Reynish · 10 comments

System Information
Operating system: Darwin-18.6.0-x86_64-i386-64bit 64 Bits
Graphics card: Intel(R) Iris(TM) Plus Graphics 640 Intel Inc. 4.1 INTEL-12.9.22

Blender Version
Broken: version: 2.81 (sub 5), branch: master (modified), commit date: 2019-09-03 17:51, hash: 9e3cd98529
Worked: (optional)

Short description of error
Previously, saving a Blender file would automatically add the file extension when you type in a fine name. This no longer works

Exact steps for others to reproduce the error

  • New Blender file
  • File > Save As
  • type in a name, such as 'bob'
  • the .blend file extension isn't added (should be 'bob.blend')
**System Information** Operating system: Darwin-18.6.0-x86_64-i386-64bit 64 Bits Graphics card: Intel(R) Iris(TM) Plus Graphics 640 Intel Inc. 4.1 INTEL-12.9.22 **Blender Version** Broken: version: 2.81 (sub 5), branch: master (modified), commit date: 2019-09-03 17:51, hash: `9e3cd98529` Worked: (optional) **Short description of error** Previously, saving a Blender file would automatically add the file extension when you type in a fine name. This no longer works **Exact steps for others to reproduce the error** - New Blender file - File > Save As - type in a name, such as 'bob' - the .blend file extension isn't added (should be 'bob.blend')

Added subscriber: @WilliamReynish

Added subscriber: @WilliamReynish
Julian Eisel was assigned by William Reynish 2019-09-03 21:56:27 +02:00
Member

Added subscribers: @mont29, @brecht

Added subscribers: @mont29, @brecht
Member

Okay, seems I went a bit fast with removing the old file/path button drawing... That was one of the first changes I did and months later, I forgot there were things to check on still...

By removing the C defined file/path text button drawing, I also (unintentionally) removed:

  • Auto completion for paths and file names
  • Additional handling applied on changes, like automatic extension appending (file_filename_enter_handle, file_directory_enter_handle)
  • Red highlight when the file name already exists

I can think of ways to address these (e.g. auto-complete callbacks for RNA, special handling through RNA set/update callbacks, etc), but some ugly hacks would be required. E.g. file_filename_enter_handle() needs a uiBut to function properly, which we can't pass from .py/RNA.

So right now I'm leaning towards moving the EXECUTE region drawing (buttons for file name, open and cancel) back to C. The file-path button (upper region) could be created through a layout template.
That way we could also bring back the fixed size Open and Cancel buttons, which we wanted anyway.

Any opinion @mont29 & @brecht?

Okay, seems I went a bit fast with removing the old file/path button drawing... That was one of the first changes I did and months later, I forgot there were things to check on still... By removing the C defined file/path text button drawing, I also (unintentionally) removed: * Auto completion for paths and file names * Additional handling applied on changes, like automatic extension appending (`file_filename_enter_handle`, `file_directory_enter_handle`) * Red highlight when the file name already exists I can think of ways to address these (e.g. auto-complete callbacks for RNA, special handling through RNA set/update callbacks, etc), but some ugly hacks would be required. E.g. `file_filename_enter_handle()` needs a `uiBut` to function properly, which we can't pass from .py/RNA. So right now I'm leaning towards moving the `EXECUTE` region drawing (buttons for file name, open and cancel) back to C. The file-path button (upper region) could be created through a layout template. That way we could also bring back the fixed size *Open* and *Cancel* buttons, which we wanted anyway. Any opinion @mont29 & @brecht?

Added subscriber: @StephenSwaney

Added subscriber: @StephenSwaney

This is a bad regression and should be fixed as soon as possible, preferably today.

Moving it to a template is fine with me.

This is a bad regression and should be fixed as soon as possible, preferably today. Moving it to a template is fine with me.

A template also sounds like a good solution to me…

A template also sounds like a good solution to me…
Member

The template should work fine for the file-path button.
However for the buttons in the execute region (lower bar) I'd suggest moving them back to C entirely. We wanted to make the Open and Cancel buttons use a fixed width like previously, so they behave better on resize. The layout code doesn't allow me to do it. uiLayout.ui_units_x doesn't work as expected, some careful tweaks to the layout code would be needed and I don't really want to spend time on that.
It's an embarrassingly difficult problem, I've tried multiple things, but I don't see a different solution than having the entire region in C.

So, I'll just bring back C defined drawing code for the lower region, and add a template for the file path if there are no objections.

The template should work fine for the file-path button. However for the buttons in the execute region (lower bar) I'd suggest moving them back to C entirely. We wanted to make the *Open* and *Cancel* buttons use a fixed width like previously, so they behave better on resize. The layout code doesn't allow me to do it. `uiLayout.ui_units_x` doesn't work as expected, some careful tweaks to the layout code would be needed and I don't really want to spend time on that. It's an embarrassingly difficult problem, I've tried multiple things, but I don't see a different solution than having the entire region in C. So, I'll just bring back C defined drawing code for the lower region, and add a template for the file path if there are no objections.

Fine with me. I don't really care about having any of these buttons in Python, if it's easy why not, but it's not something we are tweaking all the time.

Fine with me. I don't really care about having any of these buttons in Python, if it's easy why not, but it's not something we are tweaking all the time.

This issue was referenced by 45d4c92579

This issue was referenced by 45d4c925799e94c6d442a9a9066af2d3305724e1
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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
6 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#69457
No description provided.