tSBridge.AttrClean(Space.CurrentScene())

Smart people ~ Great Scripts
Post Reply
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

tSBridge.AttrClean(Space.CurrentScene())

Post by trueBlue »

Model - Load Clock.scn
Switch to:
Workspace - Save to Library = 12.65 MB
Workspace - Run tSBridge.AttrClean(Space.CurrentScene())
Workspace - Save to Library = 8.74 MB

Another option:
Workspace - Run and Stop 3D Record
Workspace - Save to Library as RsRcd = 2.58 MB

When I Load a RsRcd file and then Generate a new Scene, I do not get the usual Windows Message. Nice!
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: tSBridge.AttrClean(Space.CurrentScene())

Post by clintonman »

Didn't know you could do that. Big savings on disk space.
One more bit:
Clock.scn original size = 3.91 MB

location note:
trueSpace761\tS\Library\Scenes.scl\Clock.scn
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: tSBridge.AttrClean(Space.CurrentScene())

Post by trueBlue »

Wow that is crazy!
Nevertheless I wonder if that command would help in your Exporters?
User avatar
trueBlue
Captain
Posts: 5208
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: tSBridge.AttrClean(Space.CurrentScene())

Post by trueBlue »

Using the RsViewPlugin.rsx plugin I can verify what is removed (Hidden) from the Sphere object, that has been animated in Model, when running the following commands:

Code: Select all

tSBridge.FlushSyncEvents()
tSBridge.AttrClean(Space.CurrentScene())
Before
Before.PNG
After
After.PNG
The tSObj is present when creating a Workspace RsObj

You can also run it on a selected object:

Code: Select all

tSBridge.FlushSyncEvents()
tSBridge.AttrClean('')
Info from the sdk_tS761B8/Doc
tSBridge.AttrClean('/Project/Space 3D/Cube');

Remove all the bridge's attributes from specified object.

It is useful if you want to export an object(s) and be sure all the bridge package objects are removed from exported object.

After using this command be aware that the bridge will stop working.
You can activate it again from Model view if you activate the whole scene synchronization.
You can do it by load a scene or if you turn off and then again turn on bridge with Modeler->workspace synchronization.

tSBridge.HookToScene('/Project/Space 3D');
Method reconnects 3D objects between Modeler scene and workspace View.

This command is called automatically after Modeler or workspace loads a scene.
You can use it to partially restore the bridge connection after AttrClean method
You do not have the required permissions to view the files attached to this post.
Post Reply