Skip to content

Add helper variables for collaboration remote objects - #8580

Open
CouleeApps wants to merge 1 commit into
devfrom
collab_helpers
Open

CouleeApps wants to merge 1 commit into
devfrom
collab_helpers

Conversation

@CouleeApps

Copy link
Copy Markdown
Member

Adds:

  • current_remote: Currently connected collab remote
  • current_remote_project: Remote project associated with current_project
  • current_remote_file: Remote file associated with bv.

Also todo at some point probably: should expose RemoteProject::CollabFileForCoreFile / RemoteProject::CoreFileForCollabFile / others

@CouleeApps
CouleeApps requested a review from negasora September 24, 2026 04:05
@CouleeApps CouleeApps self-assigned this Sep 24, 2026

@negasora negasora left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It works but it relies on metadata whose format/existence can change. We have ways to track these associations without the metadata so we should use those.

PythonScriptingProvider.register_magic_variable("current_remote", _get_current_remote)


def _get_current_remote_project(instance: PythonScriptingInstance):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We have BNRemoteProject* BNProjectGetRemoteProject(BNProject* project), that should be added to python's Project class and used with current_project instead

)


def _get_current_remote_file(instance: PythonScriptingInstance):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

RemoteFile for a ProjectFile should be tracked the same way RemoteProject is tracked for Project, and then view.project_file.remote_file should be used here

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants