Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions doc/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ settings use the `slVscodeEdit.` prefix.
| `slVscodeEdit.sync.includeFileMetaInOutput` | Boolean | `false` | Includes file metadata in processed script output. |
| `slVscodeEdit.sync.includeCreatorInFileMeta` | Boolean | `false` | Includes the current Second Life user in file metadata. |
| `slVscodeEdit.sync.keepViewerFileOpen` | Boolean | `true` | Keeps the viewer's temporary file open during editing. |
| `slVscodeEdit.sync.autoLinkOnPublish` | Boolean | `false` | Automatically links matching workspace files when an object is explored. |
| `slVscodeEdit.sync.notecardComment` | String | `null` | Defines the comment text used to match external files with notecards. |

### Preprocessor
Expand Down Expand Up @@ -232,6 +233,27 @@ and sends the processed result to the viewer. The viewer then compiles the
resulting script. For details about includes and requires, macros, conditionals,
and other preprocessor behavior, see the [Preprocessor Guide](preprocessor-guide.md).

### Linking all files in an explored object

To link all matching workspace files for an explored object, open the object's
context menu and select **Link All**. The operation checks the root prim and
every linked prim, including both scripts and notecards.

The plugin uses the same matching rules as individual file linking. It checks
file metadata when available, then falls back to matching the displayed file
name and extension. Existing links are retained, and one workspace file may be
linked to more than one in-world item.

**Link All** does not open editor tabs. It reads each object item, establishes
matching links in the current session, and displays one summary when complete.
Items without matching workspace files and items without modify permission are
reported in that summary. Links are ephemeral and must be recreated after the
plugin session ends.

To run this automatically whenever an object is explored, enable
`slVscodeEdit.sync.autoLinkOnPublish` in the **SL Scripting - Sync** settings.
The setting is disabled by default.

## Pinning Objects

You can pin explored objects in the **Second Life** view so they are restored
Expand Down Expand Up @@ -283,6 +305,8 @@ The available actions include:
- **New File...**: Prompts for a filename. If the name ends with `.lsl`, the
new item is created as an LSL script; if it ends with `.luau`, it is created
as a Luau script; otherwise, it is created as a notecard.
- **Link All**: Attempts to link every script and notecard in the object,
including items in linked prims, with matching workspace files.
- **Unexplore**: Removes the selected object from publication in the viewer.
- **Save Back to Contents**: If the object was rezzed directly from another object,
it is saved back to that rezzing object's inventory.
Expand Down
15 changes: 15 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@
"title": "Open",
"category": "Second Life"
},
{
"command": "slVscodeEdit.autoLinkObject",
"title": "Link All",
"category": "Second Life"
},
{
"command": "slVscodeEdit.renameInventoryItem",
"title": "Rename...",
Expand Down Expand Up @@ -209,6 +214,11 @@
"when": "view == slInworldExplorer && viewItem =~ /slObject|slLinkedPrim/",
"group": "7_modification"
},
{
"command": "slVscodeEdit.autoLinkObject",
"when": "view == slInworldExplorer && viewItem == slObject",
"group": "navigation"
},
{
"command": "slVscodeEdit.teleportToObject",
"when": "view == slInworldExplorer && viewItem == slObject",
Expand Down Expand Up @@ -306,6 +316,11 @@
"default": true,
"description": "Should the viewers tempfile be kept open while editing"
},
"slVscodeEdit.sync.autoLinkOnPublish": {
"type": "boolean",
"default": false,
"description": "Automatically link matching workspace files when an object is first published"
},
"slVscodeEdit.sync.notecardComment": {
"type": "string",
"default": null,
Expand Down
12 changes: 11 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function activate(context: vscode.ExtensionContext): void {
() => synchService.isConnected(),
synchService.onDidChangeConnectionState,
() => synchService.getWebSocket(),
synchService,
);
context.subscriptions.push(
vscode.window.registerWebviewViewProvider(ObjectExplorerWebviewProvider.viewType, objectExplorerWebview),
Expand All @@ -127,7 +128,16 @@ export function activate(context: vscode.ExtensionContext): void {
(uri: vscode.Uri) => {
vscode.window.showTextDocument(uri, { preview: false });
}
)
),
vscode.commands.registerCommand(
"slVscodeEdit.autoLinkObject",
async (node: ExplorerNode) => {
if (node.kind !== "object") {
return;
}
await synchService.autoLinkObject(node.object_id);
Comment on lines +134 to +138
},
),
);

// Rename commands for context menu actions
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/configinterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export enum ConfigKey {
AskIfViewerScriptMismatchesMaster = 'sync.askIfViewerScriptMismatchesMaster',
CompareHashBeforeSync = 'sync.compareHashBeforeSync',
KeepViewerFileOpen = 'sync.keepViewerFileOpen',
AutoLinkOnPublish = 'sync.autoLinkOnPublish',
NotecardSyncComment = 'sync.notecardComment',

FileMetaInfoInOutput ='sync.includeFileMetaInOutput',
Expand Down
Loading
Loading