Re: Script: Removing Parameters from Action Sources?

Date : Wed, 5 Apr 2006 20:30:03 +0930
To : XSI(at)Softimage.COM
From : Nick <nick.petit(at)gmail.com>
Subject : Re: Script: Removing Parameters from Action Sources?
I know it's not quite the same as removing them but you could disable the parameters influence in the clip source?

On 4/3/06, André Adam < a_adam(at)49games.de> wrote:
Yep:

  //Creates new action source from input source, excluding a defined
parameter list
  function ooRecreateSource(oSource, aBadParams){
    //Create new action source
    var oModel = oSource.Model;
    var + "_temp");
    //Test all source items with bad parameters list
    var eSourceItems = new Enumerator(oSource.SourceItems);
    while(!eSourceItems.atEnd()){
      var oFound = false;
      for(var i=0; i<aBadParams.length ; i++){
        if(eSourceItems.item().Target == aBadParams[i]){
          oFound = true;
        }
      }
      //Copy current source item to new source if not present in bad
parameter list
      if(!oFound){
        oNewSource.AddSourceItem(eSourceItems.item().Target,
eSourceItems.item().Source);
      }
      eSourceItems.moveNext();
    }
    return oNewSource;
  }

However, recreating a whole mixer this way is anything but fun, my last
week's script is something like a 400 lines, and it still misses out
things I don't need to copy for our current production scenario...

Cheers!

    -André


Rafe Sacks wrote:

> Can you create a new action source and copy the items over to it
> leaving out the ones you don't want?
>
>________________________________
>R A F E   S A C K S
>Lead Character TD - Technical
>Animal Logic Film
>+612  9383 - 4800
>
>
>
>
>
>
> André Adam wrote:
>
>> Thanks for the reply, I already figured that, took me two days now to
>> set up a basic script that recreates sources, the basic mixer setup
>> and offset effects leaving out the unwanted parameters. Especially
>> messing around with the offset effects was kind of horrible. This is
>> going to become a feature request this very minute...
>>
>> Thanks again!
>>
>>    -André
>>
>> Aloys Baillet wrote:
>>
>>> Hi André,
>>>
>>> No there is no way to do that!
>>> If you have 5 minutes you could send a feature request;-)
>>> And as you cannot access _expression_ items, if the ActionSource you
>>> need to clean contains an _expression_ item: you're in a bad situation...
>>>
>>> I'm sorry, that won't help...
>>>
>>> Cheers,
>>>
>>> Aloys
>>>
>>> On 3/30/06, *André Adam* < a_adam(at)49games.de
>>> <mailto:a_adam(at)49games.de>> wrote:
>>>
>>>     Hi!
>>>
>>>     I must be missing something obvious here, is there an equvalent to
>>>     ActionSource.AddSourceItem () that actually removes a Source Item
>>>     from an
>>>     Action Source? I'm not much of a fan of rebuilding the Action
>>> Source
>>>     from scratch to leave out a couple of Parameters. Sorry in case
>>>     this is
>>>     too obvious...
>>>
>>>     Cheers for a quick hint!
>>>
>>>         -André
>>>
>>>     ---
>>>     Unsubscribe? Mail Majordomo(at)Softimage.COM
>>>     <mailto: Majordomo(at)Softimage.COM> with the following text in body:
>>>     unsubscribe xsi
>>>
>>>
>>>
>>>
>>> --
>>> Aloys Baillet - XSI Technical Director
>>> Character Dpt - Animal Logic
>>> --
>>
>>
>>
>> ---
>> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in
>> body:
>> unsubscribe xsi
>

---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.