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

Name field of all scripts set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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) 
Note: See TracChangeset for help on using the changeset viewer.