Changeset 498


Ignore:
Timestamp:
07/20/10 16:06:33 (19 months ago)
Author:
ddangelo
Message:

Name field of all scripts set

Location:
trunk/avango-utils
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/avango-utils/python/_MFMerger.py

    r363 r498  
    2929        self.super(MFMerger).__init__() 
    3030        self._initialized = False 
     31         
     32        self.Name.value = "MFMerger" 
    3133 
    3234    def init(self, sftype, mftype): 
  • trunk/avango-utils/python/_bool_scripts.py

    r448 r498  
    4343 
    4444        self._actual_id = 0 
     45         
     46        self.Name.value = "BoolXBase" 
    4547 
    4648    def add_and_connect_bool_field(self,field): 
     
    6769 
    6870class BoolXOr(BoolXBase): 
     71     
     72    def __init__(self): 
     73        self.super(BoolXOr).__init__() 
     74         
     75        self.Name.value = "BoolXOr" 
    6976 
    7077    def on_calculate(self): 
     
    8491 
    8592class BoolXAnd(BoolXBase): 
     93     
     94    def __init__(self): 
     95        self.super(BoolXAnd).__init__() 
     96         
     97        self.Name.value = "BoolXAnd" 
    8698 
    8799    def on_calculate(self): 
  • trunk/avango-utils/python/_converter.py

    r488 r498  
    3737    def __init__(self): 
    3838        self.super(FloatXBase).__init__() 
     39         
     40        self.Name.value = "FloatXBase" 
    3941 
    4042        self.Output.value = 0 
     
    6567 
    6668class FloatXSum(FloatXBase): 
     69     
     70    def __init__(self): 
     71        self.super(FloatXSum).__init__() 
     72         
     73        self.Name.value = "FloatXSum" 
    6774 
    6875    def on_calculate(self): 
     
    7885 
    7986class FloatXMin(FloatXBase): 
     87     
     88    def __init__(self): 
     89        self.super(FloatXMin).__init__() 
     90         
     91        self.Name.value = "FloatXMin" 
    8092 
    8193    def on_calculate(self): 
     
    99111 
    100112    Output = avango.SFFloat() 
     113     
     114    def __init__(self): 
     115        self.super(Float2Add).__init__() 
     116         
     117        self.Name.value = "Float2Add" 
    101118 
    102119    def evaluate(self): 
     
    113130 
    114131    Output = avango.osg.SFVec2() 
     132     
     133    def __init__(self): 
     134        self.super(Float4AddVec2Converter).__init__() 
     135         
     136        self.Name.value = "Float4AddVec2Converter" 
    115137 
    116138    def evaluate(self): 
    117139        self.Output.value = avango.osg.Vec2(self.Value00.value+self.Value01.value, self.Value10.value+self.Value11.value) 
     140 
    118141 
    119142class SFNode2MFContainerConverter(avango.script.Script): 
     
    122145    Input = avango.osg.SFNode() 
    123146    Output = avango.MFContainer() 
     147     
     148    def __init__(self): 
     149        self.super(SFNode2MFContainerConverter).__init__() 
     150         
     151        self.Name.value = "SFNode2MFContainerConverter" 
     152 
    124153 
    125154    def evaluate(self): 
    126155        self.Output.value = [ self.Input.value ] 
     156 
    127157 
    128158class Float2Vec2Converter(avango.script.Script): 
     
    132162    Value1 = avango.SFFloat() 
    133163    Output = avango.osg.SFVec2() 
     164     
     165    def __init__(self): 
     166        self.super(Float2Vec2Converter).__init__() 
     167         
     168        self.Name.value = "Float2Vec2Converter" 
     169         
    134170 
    135171    def evaluate(self): 
    136172        self.Output.value = avango.osg.Vec2(self.Value0.value, self.Value1.value) 
     173         
    137174         
    138175class Vec3ToTransMatrix(avango.script.Script): 
     
    141178    Matrix = avango.osg.SFMatrix() 
    142179     
     180    def __init__(self): 
     181        self.super(Vec3ToTransMatrix).__init__() 
     182         
     183        self.Name.value = "Vec3ToTransMatrix" 
     184     
     185     
    143186    def evaluate(self): 
    144187        self.Matrix.value = avango.osg.make_trans_mat(self.TransVec.value + self.TransOffset.value) 
     
    157200    MatrixTransDif = avango.osg.SFMatrix() 
    158201     
     202    def __init__(self): 
     203        self.super(TranslationMatrixCalculator).__init__() 
     204         
     205        self.Name.value = "TranslationMatrixCalculator" 
     206     
     207     
    159208    def evaluate(self): 
    160209        if not self.MatrixFrom.value or not self.MatrixTo.value: 
     
    172221        self.__alpha_changed = False 
    173222        self.__color_in = avango.osg.Vec4(1,1,1,1) 
     223        self.Name.value = "FloatToAlphaConverter" 
    174224         
    175225    @field_has_changed(ColorIn) 
  • trunk/avango-utils/python/_field_dump.py

    r448 r498  
    4747        self.super(ScriptFieldPrinter).__init__() 
    4848        self.always_evaluate(True) 
     49         
     50        self.Name.value = "ScriptFieldPrinter" 
    4951 
    5052    def evaluate(self): 
  • trunk/avango-utils/python/_interpolators.py

    r488 r498  
    4343         
    4444        self.__time_sensor = avango.nodes.TimeSensor() 
     45         
     46        self.Name.value = "Interpolator" 
    4547         
    4648#    def __del__(self): 
     
    139141        self.RawInterpolatedValue.connect_weak_from(self.__interpolator.Value) 
    140142         
     143        self.Name.value = "ColorFader" 
    141144         
    142145    @field_has_changed(StartFade) 
  • trunk/avango-utils/python/_node_scalers.py

    r452 r498  
    4040        self.Radius.value = 1.0 
    4141        self.__file_loaded = False 
     42         
     43        self.Name.value = "LoadFileScaler" 
    4244 
    4345    @field_has_changed(LoadFileFinished) 
  • trunk/avango-utils/python/_normalization.py

    r490 r498  
    4747    def __init__(self): 
    4848        self.super(FloatNormalization).__init__() 
    49  
     49         
    5050        self.MinIn.value = -1.0 
    5151        self.MaxIn.value = 1.0 
     
    5353        self.MinOut.value = 0.0 
    5454        self.MaxOut.value = 1.0 
     55         
     56        self.Name.value = "FloatNormalization" 
    5557 
    5658    def evaluate(self): 
  • trunk/avango-utils/python/_property_modifier.py

    r448 r498  
    5959 
    6060        self.always_evaluate(True) 
     61         
     62        self.Name.value = "PropertyModifierInt" 
    6163 
    6264    def evaluate(self): 
  • trunk/avango-utils/python/_task_scheduler.py

    r448 r498  
    3232 
    3333        self.TimeDelta.value = 1.0 
     34         
     35        self.Name.value = "TaskSchedulerTask" 
    3436 
    3537    def on_active(self): 
     
    4446        self.__tasks = [] 
    4547        self.TimeIn.value = 0 
     48         
     49        self.Name.value = "TaskScheduler" 
    4650 
    4751    def evaluate(self): 
  • trunk/avango-utils/python/_triggers.py

    r483 r498  
    4040 
    4141        self._last_trigger = False 
     42         
     43        self.Name.value = "ImmediateEdgeTrigger" 
    4244 
    4345    @field_has_changed(Trigger) 
     
    6870 
    6971        self._last_trigger = False 
     72         
     73        self.Name.value = "EdgeTrigger" 
    7074 
    7175    def evaluate(self): 
     
    102106        self.super(KeyMonitorTrigger).__init__() 
    103107         
     108        self.Name.value = "KeyMonitorTrigger" 
     109         
    104110    def on_up_transition(self): 
    105111        self.Pressed.value = False 
     
    123129        self.super(KeyToggleTriggerAlternate).__init__() 
    124130         
     131        self.Name.value = "KeyToggleTriggerAlternate" 
     132         
    125133    def init(self,initial_state): 
    126134        self.Toggle.value = initial_state 
     
    141149        self.super(KeyToggleTrigger).__init__() 
    142150         
     151        self.Name.value = "KeyToggleTrigger" 
     152         
    143153    def on_up_transition(self): 
    144154        self.Toggle.value = True 
  • trunk/avango-utils/python/_utils.cpp

    r497 r498  
    9999  { 
    100100    std::string type = ::av::ContainerPool::getNameByInstance(iter->second); 
     101//    std::string type = iter->second->Name.getValue(); 
     102 
    101103    int l = type.length(); 
    102104    if(l>maxLength) 
     
    123125    ss<< i->first << std::endl; 
    124126  } 
    125   ss << "Total number of containers: " << av::ContainerPool::getNumberOfContainers() << std::endl; 
     127  for(int n=0;n<maxLength+2;++n) 
     128      ss << " "; 
     129  ss << "-------"<<std::endl; 
     130  std::string total_desc = "Total number of containers:"; 
     131  int l = maxLength - total_desc.length(); 
     132  ss <<"\""<< total_desc << "\" "; 
     133  for(int n=0;n<l;++n) 
     134    ss << " "; 
     135  ss<< av::ContainerPool::getNumberOfContainers() << std::endl; 
     136 
    126137 
    127138  std::cout << ss.str(); 
  • trunk/avango-utils/src/Bool2And.cpp

    r380 r498  
    3636    AV_FC_ADD_FIELD(Input2,false); 
    3737    AV_FC_ADD_FIELD(Output,false); 
     38 
     39    Name.setValue("Bool2And"); 
    3840} 
    3941 
  • trunk/avango-utils/src/Bool2Or.cpp

    r380 r498  
    3636    AV_FC_ADD_FIELD(Input2,false); 
    3737    AV_FC_ADD_FIELD(Output,false); 
     38 
     39    Name.setValue("Bool2Or"); 
    3840} 
    3941 
  • trunk/avango-utils/src/Bool3And.cpp

    r380 r498  
    3737    AV_FC_ADD_FIELD(Input3,false); 
    3838    AV_FC_ADD_FIELD(Output,false); 
     39 
     40    Name.setValue("Bool3And"); 
    3941} 
    4042 
  • trunk/avango-utils/src/Bool3Or.cpp

    r380 r498  
    3737    AV_FC_ADD_FIELD(Input3,false); 
    3838    AV_FC_ADD_FIELD(Output,false); 
     39 
     40    Name.setValue("Bool3Or"); 
    3941} 
    4042 
  • trunk/avango-utils/src/ProximitySensor.cpp

    r363 r498  
    4141    AV_FC_ADD_FIELD(Proximity,         0.); 
    4242    AV_FC_ADD_FIELD(Switch,            0); 
     43 
     44    Name.setValue("ProximitySensor"); 
    4345} 
    4446 
  • trunk/avango-utils/src/Trackball.cpp

    r483 r498  
    8383  mCenterTransInv = ::osg::Matrix::inverse(CenterTransform.getValue()); 
    8484 
     85  Name.setValue("Trackball"); 
    8586} 
    8687 
Note: See TracChangeset for help on using the changeset viewer.