Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .res and .tres extensions in the scene CLI positional argument #38515

Merged
merged 1 commit into from
May 20, 2020

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented May 6, 2020

This closes #35709.

Edit: Disallowing to save scenes with .res or .tres extensions is probably a better idea, see below.

@Calinou Calinou added bug cherrypick:3.x Considered for cherry-picking into a future 3.x release regression topic:editor labels May 6, 2020
@Calinou Calinou added this to the 4.0 milestone May 6, 2020
@bruvzg
Copy link
Member

bruvzg commented May 6, 2020

macOS editor bundle .plist should be also changed to make it openable from Finder (.res and .tres are already registered as public.res to set icon, but not marked as editable documents).

diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/osx_tools.app/Contents/Info.plist
index c519a232c4..e918a74605 100755
--- a/misc/dist/osx_tools.app/Contents/Info.plist
+++ b/misc/dist/osx_tools.app/Contents/Info.plist
@@ -55,6 +55,18 @@
 				<string>public.tscn</string>
 			</array>
 		</dict>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>LSItemContentTypes</key>
+			<array>
+				<string>public.res</string>
+			</array>
+			<key>NSExportableTypes</key>
+			<array>
+				<string>public.res</string>
+			</array>
+		</dict>
 		<dict>
 			<key>CFBundleTypeRole</key>
 			<string>Editor</string>

@Calinou
Copy link
Member Author

Calinou commented May 6, 2020

@bruvzg Not all resources are Godot scenes, though. This is kind of an edge case; you generally never save a scene with a .res or .tres extension, but Godot doesn't prevent you from doing so.

If we prevent the Godot editor from doing so (which is probably a good idea), this PR would become redundant.

@aaronfranke
Copy link
Member

We should probably also disallow saving new scenes with .res or .tres.

@akien-mga akien-mga merged commit c404fe5 into godotengine:master May 20, 2020
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.2.2.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't run scene with .res or .tres extension
4 participants