...
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
delight_pref = Application.Dictionary.GetObject( 'preferences.3Delight', False )
if( delight_pref != None ):
delight_pref.ExportMaterialsAndAttributes = False
delight_pref.ExportTransformations = False
# Promp a folder browser to select the location of your RIB File
rib_location = XSIUIToolkit.PickFolder( XSIUtils.ResolvePath( '[Project Path]' ), 'RIB Package Location' )
if( len( rib_location ) != 0 ):
rib_file = XSIUtils.ResolvePath( rib_location + os.sep + object.Name + '_RIB.[Frame #4].rib' )
# This will generate the object RIB for this Frame only
Application.ExportObjectRenderArchive( object, rib_file, int( XSIUtils.ResolvePath( '[Frame #4]' ) ), int( XSIUtils.ResolvePath( '[Frame #4]' ) ), 1, False, False )
# This will add the RIB Property to the object bounding box
rib_property = cube_bounding_box.AddProperty( '3Delight RIB Properties', False, object.Name + '_RIB_PROPERTY_3DELIGHT' )
# This will make sure we are using the delayed mode
rib_property.Parameters( 'ArchiveType' ).Value = 'Delayed'
# This will make sure we are rendering the RIB and not the bounding box object
rib_property.Parameters( 'EnableArchive' ).Value = True
# This will add the RIB file path to the RIB property
rib_property.Parameters( 'ArchiveName' ).Value = rib_file
for property in object.Properties:
if( property.Type == 'material' ):
Application.CopyPaste( property, '', cube_bounding_box, 3 )
Application.ResetTransform( cube_bounding_box, 'siCtr', 'siScl', 'siXYZ' )
Application.DeleteObj( object ) |
...