scripting exporting

Post Reply
garcia
Petty Officer First Class
Posts: 65
Joined: 23 Jan 2023, 02:51
Type the number ten into the box: 10

scripting exporting

Post by garcia »

Hi,
I've been playing around with scripting feature in 7.6, very cool stuff :bananacool2:
However, I would like to script saving, ie save as COLLADA .dae, but the command history shows a blank line, in both 7.6 and 7.61beta.
Is this not possible or is there a way?
Thanks for any help.
Mike. :bananacheers:
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: scripting exporting

Post by trueBlue »

Try adding your script to the Export button and saving it as ImportExport.rsobjj in the preobjects folder
When you Save as dae from the file menu, your script will run when you press the Export button
Import Export panel.png
garcia
Petty Officer First Class
Posts: 65
Joined: 23 Jan 2023, 02:51
Type the number ten into the box: 10

Re: scripting exporting

Post by garcia »

Hi, thanks for the quick reply, thanks that might work!

Would it be possible to pass a parameter that way?
I want to run polygon reduction, at different levels (for quick LOD's and to .dae conversion).

I'm still trying to figure out that part too, at least I have a clue, via cmd history :)

Node.Value("/Project/Space 3D/Horse", "Simplification level") = 60
ScriptObject.RunCmd("mesh modifiers package/simplifymesh", "Nodes list", "")
User avatar
trueBlue
Captain
Posts: 5216
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: scripting exporting

Post by trueBlue »

trueBlue wrote: 27 Jul 2023, 14:26
garcia wrote: 27 Jul 2023, 04:10 Hi, thanks for the quick reply, thanks that might work!

Would it be possible to pass a parameter that way?
I want to run polygon reduction, at different levels (for quick LOD's and to .dae conversion).

I'm still trying to figure out that part too, at least I have a clue, via cmd history :)

Node.Value("/Project/Space 3D/Horse", "Simplification level") = 60
ScriptObject.RunCmd("mesh modifiers package/simplifymesh", "Nodes list", "")
Sounds like you really do not need to use trueSpace's Collada Import Export to modify your object
You would need to make your object ready to be Exported first and then Export it
Be aware that trueSpace's Mesh Simplifier may or may not be compatible with Collada Import Export because of the Hierarchy it creates
Also, Flatten History does not work as you would expect on objects that have trueSpace's Mesh Simplifier applied
Post Reply