Subversion Repositories SmartDukaan

Rev

Rev 76 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

import camera_math as mathmodel
import utils

print "expSlide=" + `expSlide`

struct = utils.contentModel2Struct(expSlide)
print "struct=" + `struct`

if struct.has_key("features") :
    features = struct.get("features")
    camcount = features.pop("Number of Cameras")
    print "camcount=" + `camcount`
    
    nfcsfeatures = {}
    
    if camcount == 1 :
        nfcsfeatures['Primary camera'] = []
        
    elif camcount > 1 :
        nfcsfeatures['Secondary camera'] = []
    
    nfcsslides = {}
    nfcsslides['Number of Cameras'] = {'features': nfcsfeatures}
    
    struct['childrenslides'] = nfcsslides
    
    print "newstruct=" + `struct`
    
score = mathmodel.getscore(struct)