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 Layered Portraits #2119

Merged
merged 56 commits into from May 25, 2024
Merged

Conversation

CakeVR
Copy link
Collaborator

@CakeVR CakeVR commented Feb 27, 2024

Adds support for layered portraits to Dialogic.

If you want to get started trying this Pull Request, take a look at this WIP doc page: https://github.com/dialogic-godot/documentation/blob/38df52f0e6d0ba19ebd1705aa13a4d4a7553952e/documentation/layered-portrait.md

Here is the new command syntax available, we need to instruct layer changes via extra_data shortcode parameters.

# Show an entire group:
show Group1

# Show a layer, does not hide others:
show Group1/Layer1

# Hide a group:
hide Group1

# Hide a layer:
hide Group1/Layer1

# Show only one layer and hide the others:
set Group1/Layer1

Examples in the timeline:

join princess (default) 2 [animation="Heartbeat" extra_data="show Group1"]

update princess [extra_data="set Group1/Layer1"]]

The syntax after the command names (hide, show, set) is based on the valid syntax for node hierarchy paths. The different commands can be executed in a single extra_data by using the , (comma) delimiter.

update princess [extra_data="set Group1/Layer1, set Group2/Layer3"]]

You can access this node path syntax by right-clicking the target group/layer and clicking Copy Node Path. However, it's a very simple syntax to learn.

Technical Details

This pull requests fixes the update event variant and allows it to set the extra data.

It also corrects the behaviour of the Portrait subsystem. Adding support to properly fade portraits in and out.

Fade Animations doing XYZ In and XYZ Out were unified as XYZ In Out, using the is_reversed (POV: Fade In) member on the base.

guess_special_resource supports searching for these In Out animations by just declaring In Out.

Leaving Animations are automatically set to be is_reversed true.

The Animation Base provides get_modulation_property as method, to easily access the correct modulation property on CanvasGroups. self_modulate affects the entire internal viewport image instead of individual parented nodes.

The Portrait Settings Tab supports a default Transition Animation. If using the Change event on unique scenes (e.g. two Layered Portraits), it will automatically resort to this animation.

@CakeVR CakeVR marked this pull request as ready for review March 17, 2024 04:59
@CakeVR
Copy link
Collaborator Author

CakeVR commented Mar 17, 2024

This Pull Request is ready for review.

However, I have not changed all animations yet.

@Jowan-Spooner
Copy link
Collaborator

Alright, let's do this.

@Jowan-Spooner Jowan-Spooner merged commit 1bf165b into dialogic-godot:main May 25, 2024
2 checks passed
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.

None yet

2 participants