File Output Node does not generate filename only folder #31369

Closed
opened 2012-05-08 11:15:26 +02:00 by ronald engel · 16 comments

%%%With "/Users/ronald/Desktop/mask1_" in the Base Path Field of the File Output Node it should generate "/Users/ronald/Desktop/mask1_0001.jpg"
Instead it gives me /Users/ronald/Desktop/mask1_/0001.jpg

Same goes for relative paths: "//../04_Renderings/diff_dir_" generates a folder "diff_dir_" instead of a file "diff_dir_000x.jpg"

This did work in 2.62.

Tested with official 2.63 64bit OSX build and also with a 64 bit linux build (2.63-r46374)

%%%

%%%With "/Users/ronald/Desktop/mask1_" in the Base Path Field of the File Output Node it should generate "/Users/ronald/Desktop/mask1_0001.jpg" Instead it gives me /Users/ronald/Desktop/mask1_/0001.jpg Same goes for relative paths: "//../04_Renderings/diff_dir_" generates a folder "diff_dir_" instead of a file "diff_dir_000x.jpg" This did work in 2.62. Tested with official 2.63 64bit OSX build and also with a 64 bit linux build (2.63-r46374) %%%
Author

Changed status to: 'Open'

Changed status to: 'Open'
Member

%%%Assigned to myself.%%%

%%%Assigned to myself.%%%
Member

%%%This is correct, the base path is really just a path, it interprets the last part as a folder.
You can add a filename by changing the socket sub-path (in the sidebar, n-key to bring it up). So in your case that would be

base path = "/Users/ronald/Desktop" (or "/Users/ronald/Desktop/")
socket path = "mask_"

You can add multiple sockets with different filenames and/or subfolders in the same base path this way. Documentation for the node is still on my personal wiki page, since unfortunately the node docs have not been ported to 2.6 at all:

http://wiki.blender.org/index.php/User:Phonybone/MultiFileOutputNode

May be worth a design discussion on bf-committers mailing list, but it's not a bug, so closing this report.%%%

%%%This is correct, the base path is really just a path, it interprets the last part as a folder. You can add a filename by changing the socket sub-path (in the sidebar, n-key to bring it up). So in your case that would be base path = "/Users/ronald/Desktop" (or "/Users/ronald/Desktop/") socket path = "mask_" You can add multiple sockets with different filenames and/or subfolders in the same base path this way. Documentation for the node is still on my personal wiki page, since unfortunately the node docs have not been ported to 2.6 at all: http://wiki.blender.org/index.php/User:Phonybone/MultiFileOutputNode May be worth a design discussion on bf-committers mailing list, but it's not a bug, so closing this report.%%%
Author

%%%Ahh - its a feature - not a bug :)

But it breaks compatibility (at least for me) from 2.62 files to 2.63 :(%%%

%%%Ahh - its a feature - not a bug :) But it breaks compatibility (at least for me) from 2.62 files to 2.63 :(%%%
Member

%%%Sorry, didn't realize that. I'll add some backward compatibility code to split the previous path into base + file name.%%%

%%%Sorry, didn't realize that. I'll add some backward compatibility code to split the previous path into base + file name.%%%
Member

%%%Your reported issue has been fixed in SVN. Thanks for taking the
time to report!.%%%

%%%Your reported issue has been fixed in SVN. Thanks for taking the time to report!.%%%
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author

%%%Thank you for taking time to fix it!
Regards! :)

%%%

%%%Thank you for taking time to fix it! Regards! :) %%%

%%%PLEEEAASSE.... can somebody tell me how to set the "File Path" property (socket) via Python??

This works ok:
py.data.scenes- [x].node_tree.nodes['File Output'].base_path = "ABC"

but I need also to set the file name. Something like this:
py.data.scenes- [x].node_tree.nodes['File Output'].sockets- [x].file_name = ... (doesn't work :( )

%%%

%%%PLEEEAASSE.... can somebody tell me how to set the "File Path" property (socket) via Python?? This works ok: py.data.scenes- [x].node_tree.nodes['File Output'].base_path = "ABC" but I need also to set the file name. Something like this: py.data.scenes- [x].node_tree.nodes['File Output'].sockets- [x].file_name = ... (doesn't work :( ) %%%
Member

%%%In principle what you would do is access the "file_slots" collection (for singlelayer file output) or the "layer_slots" collection (for multilayer) respectively:

node_tree.nodes['File Output'].file_slots- [x].path = "ABC"
node_tree.nodes['File Output'].layer_slots- [x].name = "ABC"

However, i noticed this still crashes due to a general bug :(
Solution for this will require some more digging into and possibly a bit of redesign ... will make a note when this is fixed!

(Dev info: PointerRNA parameter in the "set" callback for RNA properties does not include ID pointer.)%%%

%%%In principle what you would do is access the "file_slots" collection (for singlelayer file output) or the "layer_slots" collection (for multilayer) respectively: node_tree.nodes['File Output'].file_slots- [x].path = "ABC" node_tree.nodes['File Output'].layer_slots- [x].name = "ABC" However, i noticed this still crashes due to a general bug :( Solution for this will require some more digging into and possibly a bit of redesign ... will make a note when this is fixed! (Dev info: PointerRNA parameter in the "set" callback for RNA properties does not include ID pointer.)%%%

%%%That's what I was looking for but it still says:
'CompositorNodeOutputFile' object has no attribute 'file_slots'

Anyway, I understand there's some work still needed to be done, so I"ll wait. Thank you for v. prompt answer! I Appreciate.%%%

%%%That's what I was looking for but it still says: 'CompositorNodeOutputFile' object has no attribute 'file_slots' Anyway, I understand there's some work still needed to be done, so I"ll wait. Thank you for v. prompt answer! I Appreciate.%%%
Member

%%%Are you using a recent version? These "_slots" collections were added after 2.63, r46542. In earlier versions the file path would be something like

node_tree.nodes['File Output'].inputs- [x].path = "ABC" (for both single- and multilayer)

Originally the idea was to have the extra info stored as additional socket data. From a design perspective, however, it would be better to make dedicated lists of "slots" in the file output node, and then update the sockets of the node according to those lists. The RNA already implements this as two collections (for single-/multilayer), but it's not yet reflected properly in the DNA data ...%%%

%%%Are you using a recent version? These "_slots" collections were added after 2.63, r46542. In earlier versions the file path would be something like node_tree.nodes['File Output'].inputs- [x].path = "ABC" (for both single- and multilayer) Originally the idea was to have the extra info stored as additional socket data. From a design perspective, however, it would be better to make dedicated lists of "slots" in the file output node, and then update the sockets of the node according to those lists. The RNA already implements this as two collections (for single-/multilayer), but it's not yet reflected properly in the DNA data ...%%%

%%%just updated to 2.63a (r46461)

bpy.data.scenes- [x].node_tree.nodes['File Output'].inputs- [x].path

Traceback (most recent call last):

File "<blender_console>", line 1, in <module>

AttributeError: 'NodeImageFileSocket' object has no attribute 'path'%%%

%%%just updated to 2.63a (r46461) >>> bpy.data.scenes- [x].node_tree.nodes['File Output'].inputs- [x].path Traceback (most recent call last): ``` File "<blender_console>", line 1, in <module> ``` AttributeError: 'NodeImageFileSocket' object has no attribute 'path'%%%

%%%ok, i have downloaded the latest version (from SVN build) and noticed "file_slots". The problem is
... .file_slots- [x].path = "ABC"
makes Blender crash :(

and this

bpy.data.scenes- [x].node_tree.nodes['File Output'].inputs- [x].path

returns:
Traceback (most recent call last):

File "<blender_console>", line 1, in <module>

AttributeError: 'NodeSocketRGBA' object has no attribute 'path'%%%

%%%ok, i have downloaded the latest version (from SVN build) and noticed "file_slots". The problem is ... .file_slots- [x].path = "ABC" makes Blender crash :( and this >>> bpy.data.scenes- [x].node_tree.nodes['File Output'].inputs- [x].path returns: Traceback (most recent call last): ``` File "<blender_console>", line 1, in <module> ``` AttributeError: 'NodeSocketRGBA' object has no attribute 'path'%%%
Member

%%%The first case is what i was describing above (.file_slots- [x].path = "ABC" makes Blender crash). It is supposed to work, but due to incomplete data in the RNA system this still fails. will try to fix this asap.

The second case is not valid code: "inputs" refers to the plain sockets list, which does not directly store the file/layer information for slots any longer.%%%

%%%The first case is what i was describing above (.file_slots- [x].path = "ABC" makes Blender crash). It is supposed to work, but due to incomplete data in the RNA system this still fails. will try to fix this asap. The second case is not valid code: "inputs" refers to the plain sockets list, which does not directly store the file/layer information for slots any longer.%%%
Member

%%%Fixed the crash problem in SVN.%%%

%%%Fixed the crash problem in SVN.%%%
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
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#31369
No description provided.