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

[OoT] Auto-set tied Room object for transition actors and entrances #288

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Yanis42
Copy link
Contributor

@Yanis42 Yanis42 commented Jan 9, 2024

This is a feature request I tried to implement, it's not great and the main limitation is the active object requirement, too bad you can't set default values for PointerProperty...

This is a draft until I find a solution I'm happy with, feel free to make suggestions

@Yanis42 Yanis42 marked this pull request as ready for review January 15, 2024 21:10
@Yanis42
Copy link
Contributor Author

Yanis42 commented Jan 15, 2024

(marked a ready since I enjoy this solution)

@Yanis42 Yanis42 changed the title [OoT] Default fromRoom to the parented room is it's parented to a room [OoT] Auto-set tied Room object for transition actors and entrances Jan 16, 2024
Copy link
Contributor

@Dragorn421 Dragorn421 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you explain what this achieves? (screenshots of relevant props in blender would be appreciated)

if scene.gameEditorMode != "OOT":
return

def updateTiedRoom(parentObj: Object, isScene: bool):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please don't use the same function name twice

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops lol didn't notice that

Comment on lines +976 to +979
if parentObj.ootEmptyType == "Room":
updateTiedRoom(parentObj, False)
elif parentObj.ootEmptyType == "Scene":
updateTiedRoom(parentObj, True)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since you use children_recursive, empties will be processed twice, once per scene and once per room (they're recursively children of both)

depending on who comes first between scene and rooms, the final result will be different, which doesn't sound intended

@Yanis42
Copy link
Contributor Author

Yanis42 commented Jan 22, 2024

can you explain what this achieves? (screenshots of relevant props in blender would be appreciated)

this updates automatically the "tiedRoom" prop (or "fromRoom" and "toRoom" for doors), it's to avoid people updating this manually, for instance for waterboxes it would set the room to none if it becomes parented to the scene empty and vice versa, this idea was something cdi asked: "Would it be possible to still have the shorthand method of having the "from" room be auto assigned if it happens to be parented to a room object?" (https://discord.com/channels/874816709855440926/874832163483287612/1194365695841013923), which lead to this PR (and the similar ones)
image

@Dragorn421 Dragorn421 added the oot Has to do with the Ocarina of Time 64 side label Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
oot Has to do with the Ocarina of Time 64 side
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants