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

Request: Ability to apply xEdit script to selected refs in Referenced By window #856

Closed
fadingsignal opened this issue Aug 24, 2020 · 6 comments

Comments

@fadingsignal
Copy link

fadingsignal commented Aug 24, 2020

Humble request! The Referenced By tab/window is a very powerful tool to be able to quickly see groupings of references, especially when they are scattered throughout a worldspace.

I often find myself in situations where being able to apply an xEdit script directly to these references from this view would be extremely helpful. Specifically selected references, as pictured, not all of them.

Thank you for your consideration!

applyscript

@zilav
Copy link
Contributor

zilav commented Aug 24, 2020

You can handle references of a record from specific plugin with a bit of additional coding, in this case you will be applying script to XMarker record

function Process(e: IInterface): Integer;
var
  i: Integer;
  ref: IInterface;
begin
  e := MasterOrSelf(e);
  for i := 0 to Pred(ReferencedByCount(e)) do begin
    ref := ReferencedByIndex(e, i);
    if SameText( GetFileName(ref), 'SuperCoolPlugin.esp' ) then begin
      // do something with ref
    end;
  end;
end;

@zilav
Copy link
Contributor

zilav commented Aug 24, 2020

Oh and if you are going to redirect ref to another base object, then use reverse loop
for i := Pred(ReferencedByCount(e)) downto 0 do

@ElminsterAU
Copy link
Collaborator

He wants to be able to multi-select a subset of the records in the "referenced by" tab to apply the script to, not all of them.

@fadingsignal
Copy link
Author

@zilav Yeah as @ElminsterAU said, I'd like to be able to select certain records in Referenced By and apply script only to what is selected. However, your code is also very useful, so I appreciate it as well :)

@fireundubh
Copy link
Contributor

@fadingsignal Randomly found this request while searching for something unrelated in Discord.

I implemented this feature in 96333bc for v4.1.4.

ElminsterAU added a commit that referenced this issue Jul 9, 2021
…cript to selected refs in Referenced By window
@ElminsterAU
Copy link
Collaborator

The PR for this was merged and should show up in 4.1.3h

Thanks @fireundubh

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

No branches or pull requests

4 participants