The Workspace Copy command:
Node.Copy('', '')
Only copies one object at a time and the copied object is hidden underneath the selected object in the Link Editor
@Clinton
Looking at your Mirror Matrix scripts, It looks like you have a way to make a proper Copy script that can copy multiple selected items and rearrange the copies in the Link Editor
Any way you could make this into a single script?
Workspace Copy
- clintonman
- Captain
- Posts: 5422
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Workspace Copy
I think so, but I just discovered that the con remove trick doesn't work for lights. They seem to have a bunch of LE2Data connectors.
Also doesn't work for command scripts, they have 4 LE2Data connectors.
Also doesn't work for command scripts, they have 4 LE2Data connectors.
Re: Workspace Copy
Yep it does not work for Lights or Scripts unless they are encapsulated 2D or 3D
I'll look into the Lights and see if I can fix the multiple LE2Data connectors
This is how I discovered removing the LE2Data connector
I noticed that the unreleased Gear primitive had several LE2Data connectors
LE2Data, LE2Data, 1, LE2Data, 2, LE2Data, 3 etc..
Try this on a new jScript
Works for Lights too!
I'll look into the Lights and see if I can fix the multiple LE2Data connectors
This is how I discovered removing the LE2Data connector
I noticed that the unreleased Gear primitive had several LE2Data connectors
LE2Data, LE2Data, 1, LE2Data, 2, LE2Data, 3 etc..
Try this on a new jScript
Code: Select all
var sel = Node.Copy('', '');
Node.ConRemove(sel, 'LE2Data')
Node.ConRemove(sel, 'LE2Data')
Node.ConRemove(sel, 'LE2Data')
Node.ConRemove(sel, 'LE2Data')
Node.ConRemove(sel, 'LE2Data, 1')
Node.ConRemove(sel, 'LE2Data, 2')
Node.ConRemove(sel, 'LE2Data, 3')
- clintonman
- Captain
- Posts: 5422
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Workspace Copy
It does work. My test shows that the LE2Data, 123 isn't needed.trueBlue wrote: ↑09 Dec 2020, 04:16 Yep it does not work for Lights or Scripts unless they are encapsulated 2D or 3D
I'll look into the Lights and see if I can fix the multiple LE2Data connectors
This is how I discovered removing the LE2Data connector
I noticed that the unreleased Gear primitive had several LE2Data connectors
LE2Data, LE2Data, 1, LE2Data, 2, LE2Data, 3 etc..
Try this on a new jScriptWorks for Lights too!Code: Select all
var sel = Node.Copy('', ''); Node.ConRemove(sel, 'LE2Data') Node.ConRemove(sel, 'LE2Data') Node.ConRemove(sel, 'LE2Data') Node.ConRemove(sel, 'LE2Data') Node.ConRemove(sel, 'LE2Data, 1') Node.ConRemove(sel, 'LE2Data, 2') Node.ConRemove(sel, 'LE2Data, 3')
Re: Workspace Copy
Does not seem to hurt and as said I saw 'LE2Data, 123'
- clintonman
- Captain
- Posts: 5422
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Workspace Copy
Here is what I came up with. enjoy.
- Attachments
-
- tB Copy Request.RsObj
- (5.34 KiB) Downloaded 161 times
Re: Workspace Copy
Sweeeeet!
Almost perfect...
I selected several Lights, Cameras, and Scripts
Ran your script
Everything copied and rearranged except the Scripts did not rearrange
I added:
Now the Scripts rearrange too!
Thank you!
Need to stop the error if it is ran with nothing selected
Invalid procedure call or argument Error code: 0x800a0005
Line: 17, Char: 2 Script text: var currentCopy = Node.Copy(currentNode, Node.Owner(currentNode));
I tried several different ways without success
A good object to test the above changes, use the GearObj.RsObj in the Objects - Script objects library
It has a hidden LE2Data, 3 con
Almost perfect...
I selected several Lights, Cameras, and Scripts
Ran your script
Everything copied and rearranged except the Scripts did not rearrange
I added:
Code: Select all
Node.ConRemove(currentCopy, "LE2Data, 1");
Node.ConRemove(currentCopy, "LE2Data, 2");
Node.ConRemove(currentCopy, "LE2Data, 3");
Thank you!
Need to stop the error if it is ran with nothing selected
Invalid procedure call or argument Error code: 0x800a0005
Line: 17, Char: 2 Script text: var currentCopy = Node.Copy(currentNode, Node.Owner(currentNode));
I tried several different ways without success
A good object to test the above changes, use the GearObj.RsObj in the Objects - Script objects library
It has a hidden LE2Data, 3 con
- clintonman
- Captain
- Posts: 5422
- Joined: 21 May 2009, 21:08
- Type the number ten into the box: 0
- Location: California
- Contact:
Re: Workspace Copy
Gear was a good sample.
In this case the "LE2Data, 2" wasn't really needed
I altered the code to add more plain vanilla "LE2Data con removes, added LE2Data123... with check for skipped value and added a try catch statement because the error is a tS bug that we can't fix. If you delete something tS still thinks it exists when you look for it in script.
In this case the "LE2Data, 2" wasn't really needed
I altered the code to add more plain vanilla "LE2Data con removes, added LE2Data123... with check for skipped value and added a try catch statement because the error is a tS bug that we can't fix. If you delete something tS still thinks it exists when you look for it in script.
- Attachments
-
- tB Copy Request.RsObj
- (6.04 KiB) Downloaded 158 times
Re: Workspace Copy
YAY!!!
Perfect!
Thank you so much!
I updated the Copy script in Commands
Updated all toolbars with the Copy icon
LMB runs Activity.Run('/Scripts/Commands/Copy')
RMB uses Node.Copy('', '')
Window.Shortcuts.xml
Workspace 3D Window & Link Editor Window
Ctrl + C
Activity.Run('/Scripts/Commands/Copy')
Perfect!
Thank you so much!
I updated the Copy script in Commands
Updated all toolbars with the Copy icon
LMB runs Activity.Run('/Scripts/Commands/Copy')
RMB uses Node.Copy('', '')
Window.Shortcuts.xml
Workspace 3D Window & Link Editor Window
Ctrl + C
Activity.Run('/Scripts/Commands/Copy')