Skip to content

Feature: Specify Relative Directory Without Specifying Filename#760

Open
Connor-Russell wants to merge 1 commit into
X-Plane:masterfrom
Connor-Russell:feature-relative-export-dir
Open

Feature: Specify Relative Directory Without Specifying Filename#760
Connor-Russell wants to merge 1 commit into
X-Plane:masterfrom
Connor-Russell:feature-relative-export-dir

Conversation

@Connor-Russell

Copy link
Copy Markdown
Contributor

Summary:

This pull request allows users to specify a just a folder to export into, vs having to also provide the filename. If only a folder is provided (determined by the name ending in a / or ), the root collection/root obj name will be appended to the specified folder. For example, if the user enters "../MyFolder/" and the collection name is "Object", the collection will be exporter to "<.blend parent dir>/../MyFolder/Object.obj"

Detailed Changes:

xplane_file.py

  • Changed name setting logic to first check if the name ends in / or , and if so, use the name with the root col/obj name appended. Otherwise check if the name is not empty, if so use it, otherwise using the root col/obj name (as the previous logic did)

Testing:

Unit tests were run on 4.11, with the same pass/fails as the current version of XP2B. No new unit tests were added, however I manually verified the file exports to the correct path when a relative directory is specified, when a filename is specified, and when no name is specified.

… dir sep) in the .obj exporter, without specifying the file name (file name will come from the root obj/col)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant