-
Notifications
You must be signed in to change notification settings - Fork 60
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
base: main
Are you sure you want to change the base?
Conversation
(marked a ready since I enjoy this solution) |
fromRoom
to the parented room is it's parented to a roomThere was a problem hiding this 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): |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
if parentObj.ootEmptyType == "Room": | ||
updateTiedRoom(parentObj, False) | ||
elif parentObj.ootEmptyType == "Scene": | ||
updateTiedRoom(parentObj, True) |
There was a problem hiding this comment.
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
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) |
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