Applying several maps to multiple objects

General questions and troubleshooting SOFTIMAGE©
Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Applying several maps to multiple objects

Post by Pancho » 29 Feb 2012, 14:22

I know that I would like to write a script for that, e.g. record a script for this purpose. But the point I need to figure out is how to avoid the direct naming of the object. It would need to be something like "current.object" or "selected. object" like in ICE self.

Can somebody please point out the right "vocabulary", "grammar" and probably a reference site/book/pdf for this stuff?

Cheers
THomas

caledonian_tartan
Posts: 253
Joined: 17 Feb 2010, 14:13

Re: Applying several maps to multiple objects

Post by caledonian_tartan » 29 Feb 2012, 14:49

in VB script it is:
GetValue( "SelectionList" )
SI 2015 @ WIN7-64

Pancho
Posts: 659
Joined: 19 Sep 2010, 09:28

Re: Applying several maps to multiple objects

Post by Pancho » 29 Feb 2012, 23:03

I'll give it a try! Thanks!

User avatar
myara
Posts: 406
Joined: 28 Sep 2011, 08:33

Re: Applying several maps to multiple objects

Post by myara » 06 Mar 2012, 14:41

If you're going to use VBS, you'll need to use Set to get an object. Otherwise you'll get only a string.

But, even if you use Set for that, you will get an Object Collection. So if you have multiple objects selected you may have an error in your process.

I ussually use:

'VBS
dim oObj : set oObj = selection(0)
//JScript
var oObj = selection(0)

But if you do something that changes your selection in your script, this variable will be automatically updated. So if you want to retain the first select object you'll need something like this:

'VBScript
dim oObj : set oObj = getvalue(selection(0))
//JScript
var oObj = getvalue(selection(0))

If you do:
'VBScript
set oObj = getvalue("selectionlist")

you'll have to specify the object index like this:

oObj(0)

this will get you the first selected object.
M.Yara
Character Modeler | Softimage Generalist (sort of)