Contextual menu Collab Viewer Template

Hi all,

For serveral days i’m trying to add a extra “dynamic” button on the contextual menu in the collab view template.

I want to change the sun time through that menu.

afbeelding

After some research i found out that these buttons are created via contextual menu through a Wrap box.

The contextual menu is created in the BP_Base_pawn blueprint.

In the “CollaborativeViewer → Blueprints → Commands” are the blueprints that will make the buttons on the contextual menu.

If i create a blueprint with the “BP_BaseCommandComponent” as parrent with the following code

no button is set to the contextual menu. Could someone help me to make this work?

other question:
If i compare my blueprint with a other “command blueprint” i find a “thumbnail” under the class settings off the default blueprint


In the blueprint i created there is no setting for a “thumbnail”

Hope someone can help me out.

1 Like

Hey! I know this is an old post but I’ve been working on this exact same issue and wanted to share what I’ve found so far since there’s almost no documentation on it.

The contextual menu buttons are driven by components on the Pawn you are using. Each button you see in the menu corresponds to a component at the bottom of the component list in your Pawn (Snapshot, Dimension, Annotation, Bookmark, etc.).

To remove a button: Simply remove the corresponding component from your Pawn. No component, no button in the menu.

To add a custom button:

  1. Find the component Blueprint of an existing option (e.g. BP_BookmarkComponent) in the Collab Viewer content folder

  2. Duplicate it and rename it

  3. Modify the duplicated Blueprint — in Event Execute After Spawn Pawn you set the button name and icon, and from there you call Create Activate Button which is the function that actually creates the button in the menu

  4. Add your new component to your Pawn

I’m still working on adding sub-options to my custom button, but in principle it seems to follow the same flow as the existing components, so that should be the right direction to look into.

Hope this helps anyone still working on this!