Subversion Repositories filter_foundry

Rev

Rev 2 | Rev 18 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 15
Line 62... Line 62...
62
                /* FIXME: not sure if we are supposed to dispose of handle */
62
                /* FIXME: not sure if we are supposed to dispose of handle */
63
        }
63
        }
64
        return str;
64
        return str;
65
}
65
}
66
 
66
 
-
 
67
/* return true if dialog should be shown */
-
 
68
 
67
Boolean ReadScriptParamsOnRead(void)
69
Boolean ReadScriptParamsOnRead(void)
68
{
70
{
69
        PIReadDescriptor token;
71
        PIReadDescriptor token;
70
        DescriptorKeyID key;
72
        DescriptorKeyID key;
71
        DescriptorTypeID type;
73
        DescriptorTypeID type;
72
        DescriptorKeyIDArray array = { NULLID };
74
        DescriptorKeyIDArray array = { NULLID };
73
        int32 flags;
75
        int32 flags;
74
        OSErr stickyError;
76
        OSErr stickyError;
75
        Boolean returnValue = true;
77
        //Boolean returnValue = true;
76
        long v;
78
        long v;
77
       
79
       
78
        if (DescriptorAvailable(NULL)){ /* playing back.  Do our thing. */
80
        if (DescriptorAvailable(NULL)){ /* playing back.  Do our thing. */
79
                token = OpenReader(array);
81
                token = OpenReader(array);
80
                if (token){
82
                if (token){
81
                        while (PIGetKey(token, &key, &type, &flags)){
83
                        while (PIGetKey(token, &key, &type, &flags)){
82
                                switch (key){
84
                                switch (key){char s[10];
83
                                        case PARAM_R_KEY: expr[0] = get_cstring(token); break;
85
                                        case PARAM_R_KEY: expr[0] = get_cstring(token); break;
84
                                        case PARAM_G_KEY: expr[1] = get_cstring(token); break;
86
                                        case PARAM_G_KEY: expr[1] = get_cstring(token); break;
85
                                        case PARAM_B_KEY: expr[2] = get_cstring(token); break;
87
                                        case PARAM_B_KEY: expr[2] = get_cstring(token); break;
86
                                        case PARAM_A_KEY: expr[3] = get_cstring(token); break;
88
                                        case PARAM_A_KEY: expr[3] = get_cstring(token); break;
87
                                        default:
89
                                        default:
88
                                                key -= PARAM_CTL0_KEY;
90
                                                key -= PARAM_CTL0_KEY;
89
                                                if(key >=0 && key < 8){
91
                                                if(key >=0 && key < 8){
90
                                                        PIGetInt(token,&v);
92
                                                        PIGetInt(token,&v);
91
                                                        slider[key] = v;
93
                                                        slider[key] = v;
92
                                                }
94
                                                }
-
 
95
                                                //sprintf(s,"%d:%d",key,v);dbg(s);
93
                                                break;
96
                                                break;
94
                                }
97
                                }
95
                        }
98
                        }
96
 
99
 
97
                        stickyError = CloseReader(&token); // closes & disposes.
100
                        stickyError = CloseReader(&token); // closes & disposes.
Line 106... Line 109...
106
                                else
109
                                else
107
                                        ; //gResult = stickyError;
110
                                        ; //gResult = stickyError;
108
                        }
111
                        }
109
                }
112
                }
110
               
113
               
111
                returnValue = gpb->descriptorParameters->playInfo == plugInDialogDisplay;
114
                return gpb->descriptorParameters->playInfo == plugInDialogDisplay; /* TRUE if want to show our Dialog */               
112
                /* return TRUE if want to show our Dialog */           
-
 
113
        }
115
        }
114
       
116
       
115
        return returnValue;
117
        return true;
116
}
118
}
117
 
119
 
118
OSErr WriteScriptParamsOnRead(void)
120
OSErr WriteScriptParamsOnRead(void)
119
{
121
{
120
        PIWriteDescriptor token;
122
        PIWriteDescriptor token;