"Save Copy" option misfunction #37011

Closed
opened 2013-10-09 19:03:54 +02:00 by Dalai Felinto · 9 comments

%%%--- Blender version with error, and version that worked ---
Blender 2.69RC, OSX

- Short description of error ---

If I save the file with the "Save Copy" option Blender still sets bpy.filepath to be the new name.
What I expected (and what I see in other apps, e.g., Photoshop) is to be back in my original file after saving a copy.

- Steps for others to reproduce the error (preferably based on attached .blend file) ---
  1. open blender
  2. save the file as //test.blend
  3. add a monkey
  4. save the file with the 'Save Copy' option on, as //monkey.blend
  5. in Python Console write: bpy.data.filepath
    what I get: //monkey.blend
    what I expected: //test.blend

And I expect to see the monkey on the screen, even though //test.blend has no monkey. In other words, the solution cannot be simply to load the previously saved file.
%%%

%%%--- Blender version with error, and version that worked --- Blender 2.69RC, OSX - Short description of error --- If I save the file with the "Save Copy" option Blender still sets bpy.filepath to be the new name. What I expected (and what I see in other apps, e.g., Photoshop) is to be back in my original file after saving a copy. - Steps for others to reproduce the error (preferably based on attached .blend file) --- 1) open blender 2) save the file as //test.blend 3) add a monkey 4) save the file with the 'Save Copy' option on, as //monkey.blend 5) in Python Console write: bpy.data.filepath what I get: //monkey.blend what I expected: //test.blend And I expect to see the monkey on the screen, even though //test.blend has no monkey. In other words, the solution cannot be simply to load the previously saved file. %%%
Author
Owner

Changed status to: 'Open'

Changed status to: 'Open'

%%%Can't redo this error or Linux, tested trunk but nothing related changed since tagging.%%%

%%%Can't redo this error or Linux, tested trunk but nothing related changed since tagging.%%%
Author
Owner

%%%here it happens if I save as (shift+cmd+s), but it works fine if I "save copy" (ctrl+alt+s).

My real use case is that I'm saving a file from a script using:
bpy.ops.wm.save_as_mainfile(filepath="/Users/dfelinto/Desktop/copy.blend", copy=True)

And it behaves wrongly as described here, although copy is set to True.%%%

%%%here it happens if I save as (shift+cmd+s), but it works fine if I "save copy" (ctrl+alt+s). My real use case is that I'm saving a file from a script using: bpy.ops.wm.save_as_mainfile(filepath="/Users/dfelinto/Desktop/copy.blend", copy=True) And it behaves wrongly as described here, although copy is set to True.%%%
Author
Owner

%%%That's really strange. It seems that sometimes it works and sometimes not.
So far if I set 'Save Copy' manually it re-set the flag. I think I know what the problem is (without looking at the code):
'copy' is probably being saved in the operator props.

I'll see if RNA_def_property_flag(prop, PROP_SKIP_SAVE); fix that.

%%%

%%%That's really strange. It seems that sometimes it works and sometimes not. So far if I set 'Save Copy' manually it re-set the flag. I think I know what the problem is (without looking at the code): 'copy' is probably being saved in the operator props. I'll see if RNA_def_property_flag(prop, PROP_SKIP_SAVE); fix that. %%%

%%%Dalai, ah thats it, 'save as' uses last use save-a-copy prop, pls commit PROP_SKIP_SAVE, it will fix the issue.%%%

%%%Dalai, ah thats it, 'save as' uses last use save-a-copy prop, pls commit PROP_SKIP_SAVE, it will fix the issue.%%%
Author
Owner

%%%fixed on rev.60644
I think there is still strange going on, but I'll investigate it separately ;)%%%

%%%fixed on rev.60644 I think there is still strange going on, but I'll investigate it separately ;)%%%
Author
Owner

%%%Reopening, I found the other issue I was having (and the reason the report was confusing).

Basically if I open Blender, do not save the file, and do a bpy.ops.wm.save_as_mainfile(filepath='whatever.blend', copy=True) it will save as, instead of copy.
(easier way to check is by printing bpy.data.filepath before and after calling the operator)%%%

%%%Reopening, I found the other issue I was having (and the reason the report was confusing). Basically if I open Blender, do not save the file, and do a bpy.ops.wm.save_as_mainfile(filepath='whatever.blend', copy=True) it will save as, instead of copy. (easier way to check is by printing bpy.data.filepath before and after calling the operator)%%%

%%%fixed r60649.%%%

%%%fixed r60649.%%%

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
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: blender/blender#37011
No description provided.