Page MenuHome

Appending bug in non-GUI blender
Closed, ArchivedPublic


System Information
win10 and GTX 1060

Blender Version
Blender 2.79

Short description of error
Wrong texture image path after appending using scripts

Exact steps for others to reproduce the error
I am going to append a cloth from A file to B file.
If I use relative path for the image of the texture of the cloth, the image path will go wrong after appending using scripts.
I used PowerShell to run the command, "blender -b -P"
blendfile = "C:\\XXXXXX\\A.blend"
section = "\\Group\\"
object = "XXXX"

filepath = blendfile + section + object
directory = blendfile + section
filename = object



If the path in A is relative path, I will get a wrong path for the cloth texture in B..... Absolute path works well.
The script works well, if I open Blender GUI. However, running in non-GUI mode, the texture path go wrong....



Event Timeline

Philipp Oeser (lichtwerk) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.Jun 25 2018, 10:22 AM

Hm, cannot reproduce here.

Also not sure what you mean by "goes wrong"? blender doesnt find the file at all? the path is changed to absolute?

Anyways, made a quick example [it is always helpful if you provide these yourself as setting these up always takes a little bit of time...]

There is a "lib" .blend with a cube using a (relative file path) texture, an "append" python script (this will also save the resulting .blend file as "result" after appending), and a "main" .blend file (where Group "Group" from "lib" file gets appended to)
I can call blender -b /path/to/main.blend -P /path/to/ without problems here and the resulting file will still have the texture path relative.

Could you confirm this is working for you?
If not: could you exactly describe what is wrong?
If I misunderstood something: please be clear [and provide an example yoursef with exact steps on how to reproduce the issue...]

Marking as incomplete until we have an answer...

@Philipp Oeser (lichtwerk)

Use windows 10 (I think other win are fine)
Download and unzip the into D or E Drive(Don't put blbackgroundtest into C Drive)
Move folder blbgtest to C Drive
Both python scripts will create a new blender file.
Use PowerShell run "blender -b -P" and you will find the texture path go wrong in resultrel.blend
Use PowerShell run "blender -b -P" and compare resultabs.blend to resultrel.blend
abs.blend use absolute path in texture, while rel.blend use relative path in texture.

Can someone try to reproduce that on Windows? otherwise we’ll have to archive am afraid…

Bastien Montagne (mont29) closed this task as Archived.Aug 3 2018, 11:08 AM
Bastien Montagne (mont29) claimed this task.

I’m sorry, but we cannot investigate an issue we cannot reproduce, so will archive this report until someone can give enough elements to consistently reproduce it. Thanks for the report anyway.