Hi there:
How do I access the UI parameters that gets created in Create function call in postDialog function call
For example
I have declared rezpackage as an option in Create function but when I try to retrieve the value for this option I get keyerror ..?
def nbPrman_postDialog(cmd, values):
#Accessing rezpackage
rezpac = values['package']['rezpackage']
# Make sure ribFile contains QB_FRAME_NUMBER
ribFile = values['package']['ribFile']
frame = os.path.basename(os.path.dirname(ribFile))
values['package']['padding'] = len(frame)
values['package']['ribFile'] = ribFile.replace('/%s' %frame, '/QB_FRAME_NUMBER')
# Create real command line
cmdline = 'prman -progress "%s"' %values['package']['ribFile']
values['package']['cmdline'] = cmdline
values['prototype'] = 'nbCmdrange'
def create_nbPrman():
"""Create nbPrman SimpleSubmit."""
cmdjob = SimpleSubmit('nbPrman', hasRange=True, canChunk=False,
help='Front-end submission to nbPrman jobtype', category='3D',
postDialog=nbPrman_postDialog, controlChanged=default_controlChanged)
cmdjob.add_optionGroup('Primary Parameters')
cmdjob.add_option('rezpackage', 'string', mode = 'open', default = 'rman_shaders', choices = ['rman_shaders'])
cmdjob.add_option('ribFile', 'file', 'Renderman .rib file to render with Prman',
label='RIB File', mode='open',
mask='Renderman RIB File (*.rib)|*.rib|All files (*.*)|*.*', required=True,
startDirectory=PROD_PATH)
default_nbOptions(cmdjob)
return cmdjob
Thanks
/Biju