AddToSelection and SI2013 problem

Discussions concerning programming of SOFTIMAGE©
Post Reply
SreckoM
Posts: 187
Joined: 25 Jul 2010, 00:18
Skype: srecko.micic

AddToSelection and SI2013 problem

Post by SreckoM » 05 May 2012, 16:44

Code: Select all

var selected = Selection.Item(0).SubComponent.ComponentCollection;
var testArray = new Array();
testArray.push(23,25,76,54);
AddToSelection(Selection(0).Name+".edge["+testArray+"]", null, true);
I have one script that has part of code like above. Script works OK in 2012 but I was informed that it does not work in 2013. I do not have access to 2013 so I can not check it by myself. Problem is that when you execute it, it shows in viewport that new edges are selected but it does not select them actually. Could anyone that have 2013 just copy paste this code and execute it to confirm? Make sphere, select one edge and execute script. When I execute this code in SI2012 it works OK.
What I manage to figure out that first line is causing this, when that is commented it works as expected.

Is there something specific I need to do so script works in 2013?
- H -

User avatar
rray
Moderator
Posts: 1775
Joined: 26 Sep 2009, 15:51
Location: Bonn, Germany
Contact:

Re: AddToSelection and SI2013 problem

Post by rray » 05 May 2012, 17:00

Can Confirm that, it's weird.

adding

Code: Select all

SetSelFilter("Point");
SetSelFilter("Edge");
at the end of your script lets it work again.
softimage resources section updated Jan 5th 2024

SreckoM
Posts: 187
Joined: 25 Jul 2010, 00:18
Skype: srecko.micic

Re: AddToSelection and SI2013 problem

Post by SreckoM » 05 May 2012, 17:06

Thanks for fast reply and help Ray!
- H -

Post Reply

Who is online

Users browsing this forum: No registered users and 63 guests