Example #1
0
 def onClicked(event):            
     
     reload(mh2povray)  # Avoid having to close and reopen MH for every coding change (can be removed once testing is complete)
     # it is necessary to put this code here, so that it is executed with the 'renderButton.event'
     if os.name == 'nt':
         #
         if os.environ['PROCESSOR_ARCHITECTURE'] == "x86":
             binary = 'win32'
             #
             if self.win32sse2Button.selected:
                 binary = 'win32sse2'
         #
         else:
             binary = 'win64'
     # for Ubuntu.. atm
     if sys.platform == 'linux2':
         binary = 'linux'
     #
     mh2povray.povrayExport(gui3d.app.selectedHuman.mesh, gui3d.app,
                            {'source':'gui',         # 'ini' if self.iniButton.selected else 'gui',
                             'format':'mesh2',       # 'array' if self.arrayButton.selected else 'mesh2',
                             'action':'render',      # 'export' if self.exportButton.selected else 'render',
                             'subdivide':True if self.doSubdivide.selected else False,
                             'AA': 0.5-0.49*self.AA.getValue(),
                             'bintype': binary,
                             'SSS': True if self.useSSS.selected else False,
                             'SSSA': 6*self.SSSA.getValue(), # power of 2
                             'skinoil': 0.001 *(10**(4*self.skinoil.getValue())), # exponential slider
                             'rough':0.001 *(10**(2*self.rough.getValue())), # exponential slider
                             'wrinkles': 0.5*self.wrinkles.getValue(),
                             'hairSpec':True if self.hairSpec.selected else False,
                             'hspecA': 0.1*(10**(2*self.hspecA.getValue())), # exponential slider
                             'hairThin': 5**(2*(1-self.hairThick.getValue()))}) # exponential slider 
Example #2
0
        def onClicked(event):

            reload(
                mh2povray
            )  # Avoid having to close and reopen MH for every coding change (can be removed once testing is complete)
            # it is necessary to put this code here, so that it is executed with the 'renderButton.event'
            if os.name == 'nt':
                #
                if os.environ['PROCESSOR_ARCHITECTURE'] == "x86":
                    binary = 'win32'
                    #
                    if self.win32sse2Button.selected:
                        binary = 'win32sse2'
                #
                else:
                    binary = 'win64'
            # for Ubuntu.. atm
            if sys.platform == 'linux2':
                binary = 'linux'
            #
            mh2povray.povrayExport(
                gui3d.app.selectedHuman.mesh,
                gui3d.app,
                {
                    'source':
                    'gui',  # 'ini' if self.iniButton.selected else 'gui',
                    'format':
                    'mesh2',  # 'array' if self.arrayButton.selected else 'mesh2',
                    'action':
                    'render',  # 'export' if self.exportButton.selected else 'render',
                    'subdivide': True if self.doSubdivide.selected else False,
                    'AA': 0.5 - 0.49 * self.AA.getValue(),
                    'bintype': binary,
                    'SSS': True if self.useSSS.selected else False,
                    'SSSA': 6 * self.SSSA.getValue(),  # power of 2
                    'skinoil': 0.001 *
                    (10**(4 * self.skinoil.getValue())),  # exponential slider
                    'rough': 0.001 *
                    (10**(2 * self.rough.getValue())),  # exponential slider
                    'wrinkles': 0.5 * self.wrinkles.getValue(),
                    'hairSpec': True if self.hairSpec.selected else False,
                    'hspecA': 0.1 *
                    (10**(2 * self.hspecA.getValue())),  # exponential slider
                    'hairThin': 5**(2 * (1 - self.hairThick.getValue()))
                })  # exponential slider
 def onClicked(event):            
     
     reload(mh2povray)  # Avoid having to close and reopen MH for every coding change (can be removed once testing is complete)
     # it is necessary to put this code here, so that it is executed with the 'renderButton.event'
     if os.name == 'nt':
         #
         if os.environ['PROCESSOR_ARCHITECTURE'] == "x86":
             binarie = 'win32'
             #
             if self.win32sse2Button.selected:
                 binarie = 'win32sse2'
         #
         else:
             binarie = 'win64'
     # for Ubuntu.. atm
     if sys.platform == 'linux2':
         binarie = 'linux'
     #
     mh2povray.povrayExport(gui3d.app.selectedHuman.mesh, gui3d.app,
                            {'source':'ini' if self.iniButton.selected else 'gui',
                             'format':'array' if self.arrayButton.selected else 'mesh2',
                             'action':'export' if self.exportButton.selected else 'render',
                             'bintype': binarie,
                             'SSS': True if self.useSSS.selected else False})