Jump to content
Sign in to follow this  
Synide

Visitor3 Scripting

Recommended Posts

Does anyone have any idea how to 'scale' and object in 3-axis using scripting in V3?

eg. Some psdeuo-code...

_obj = _doc getposedobject 600; //Gets the 600 Hundreth object on the map.

_obj.scale(_ScaleX, _ScaleY, _ScaleZ);

Cheers,Sy

edit1:

Hmmm... ok, I can do a...

_mx = mxScale [1,2,3];

which gives me a standard scaling matrix in '_mx'.

I'm wondering how I apply this to the V3 '_obj'....

Edit: Well, after querying the dev's it seems that current V3 scripting functionality does not support 'scaling' of object instances.

Oh, well... nvm...

Share this post


Link to post
Share on other sites

I have no idea, but it'd be nice if someone could create such a script, would be useful for elongating ladders.

Share this post


Link to post
Share on other sites

true, I was gonna use it two fold...

1. during importing object position, orientation & scale...

2. behind some dialog sliders for interactively changing the scale of objects on the map...

If only someone with some inside knowledge of the scripting functions in V3 provided some examples of the usage of each command... trying to glean how they are used from 'supportInfo' is about as much use as tits on a bull...

Share this post


Link to post
Share on other sites

was looking for such a command for a longer time but no luck.

The only thing  - I wondered about a little bit - was the type of the Object Template which is "Object Template,Matrix".

For the most commands there are descriptions and examples in the comref included in the BI-Tools.

But in visitor3 there are not all commands of the comref available and a few commands of Visitor3 aren't in the comref.

A list of all available commands (I hope so) is here - but without description (if necessary I can write a few lines).

Master85

Share this post


Link to post
Share on other sites

Hi,

Yes I saw your listing of 'suppotInfo' regarding the V3 commands... (I did a search on the Biki for 'mxLoad'... wonderful thing search functions on websites...)

This was after I'd extracted the 'supportInfo' myself... so since your's was already formated I have been referring to it quite alot over the last 24hours. Good Job.

Anyway, I too thought about using the ["b:Object Template,Matrix setmodelfile STRING"] command but... 1. couldn't work out the proper syntax and 2. the syntax I did work out crashed the 'script engine' and V3 to desktop.

It doesn't appear there is a 'alter the transform matrix of a template' type of command.

And, it doesn't appear you can 'make a new template' from an existing one tempoarily so you could then do a 'createposedobject' command from the temporary 'template'.

If I don't find a scripting solution by tomorrow, then I'll resort to just inserting them into the .pew from an external application.

Cheers, Sy.

Share this post


Link to post
Share on other sites

maybe send T_D a pm

Share this post


Link to post
Share on other sites
maybe send T_D a pm

who's 'T_D'?

but anyway, think I'm gonna stick with 'I'll resort to just inserting them into the .pew from an external application.'... 'cause then I have complete control over what goes where when & how... and... it's already done... smile_o.gif

Edit: Well, after querying the dev's it seems that current V3 scripting functionality does not support 'scaling' of object instances.

Oh, well... nvm...

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×