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

Add export_resource_uid annotation #91805

Closed
wants to merge 193 commits into from

Conversation

huwpascoe
Copy link
Contributor

@huwpascoe huwpascoe commented May 10, 2024

Resource UIDs can now be selected from the inspector in the same way a Resource would be selected.

EditorResourcePicker has new path_only property to facilitate the annotation that hides menu items unrelated to UID selection.

Example usage:

@export_resource_uid("ResourceTypeName") var item : int

func load_item() -> ResourceTypeName:
	return load(ResourceUID.get_id_path(item))

Closes godotengine/godot-proposals#9216
Closes godotengine/godot-proposals#9552

@huwpascoe huwpascoe requested review from a team as code owners May 10, 2024 17:01
@AThousandShips AThousandShips changed the title Added export_resource_uid annotation Add export_resource_uid annotation May 10, 2024
@AThousandShips AThousandShips added this to the 4.x milestone May 10, 2024
@huwpascoe huwpascoe requested a review from a team as a code owner May 10, 2024 19:14
@AThousandShips
Copy link
Member

You used a merge commit to update your branch, please use rebase in the future instead, see here

Resource UIDs can now be selected from the inspector
in the same way a Resource would be selected.

EditorResourcePicker has new path_only property to facilitate
the annotation that hides menu items unrelated to UID selection.

Example usage:
```
@export_resource_uid("ResourceTypeName") var item : int

func load_item() -> ResourceTypeName:
	return load(ResourceUID.get_id_path(item))
```
@huwpascoe
Copy link
Contributor Author

You used a merge commit to update your branch, please use rebase in the future instead, see here

Oh how I am trying. I managed to rebase and then ended up 300 commits behind master because I have no idea. I'll get it eventually.

RandomShaper and others added 24 commits May 10, 2024 20:47
- Use alpha scissor to resolve transparency sorting issues with gizmo
  icons relative to other transparent materials in the scene.
  This also makes gizmos visible in `screen_texture`, which means
  gizmos can now be seen through refractive materials.
  Lastly, this reduces the amount of artifacts visible around gizmo
  outlines (although they are still present at times).
- Make icons darker when not selected to be less intrusive
  (and easier to distinguish when selected).
The documentation makes it seem like CryptoKey can only hold an RSA key.  This is compounded by the fact that Cypto only has a function generate an RSA based key.  Godot however is perfectly happy loading and using ECC based keys.
- Removed redundant new() initializations
- removed _ready and node
- improved readability
… an index is outside the array valid indices

Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
@huwpascoe
Copy link
Contributor Author

Okay it just keeps getting worse. I can reset back to the fixup commit, and then rebase from there, and on the local, it looks completely fine.

f990b0850d (HEAD) HEAD@{0}: rebase (fixup): Added export_resource_uid annotation
d6c1efb23b HEAD@{1}: rebase (start): checkout HEAD~2

See no problem.

But then when I push it... Yeah. It's broken, it's completely broken

remote: Resolving deltas: 100% (1263/1263), completed with 352 local objects.

shrug Git's gonna git I guess. I'll have to fall back to ol' reliable: Recreate the entire commit manually and start a new pull request.

@huwpascoe
Copy link
Contributor Author

#91815

@huwpascoe huwpascoe closed this May 10, 2024
@Calinou Calinou removed this from the 4.x milestone May 10, 2024
@huwpascoe huwpascoe deleted the export_resource_uid branch May 10, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment