@@ -1369,7 +1369,7 @@ def __emit_diffuse_btdf(self, material, bsdf_name, scene, layer=None, node=None)
13691369 self .__close_element ("bsdf" )
13701370
13711371 #------------------------
1372- # Write Sheen BRDF
1372+ # Write Sheen BRDF
13731373 #------------------------
13741374 def __emit_sheen_brdf (self , material , bsdf_name , scene , layer = None , node = None ):
13751375 reflectance = ""
@@ -1615,7 +1615,7 @@ def __emit_glass_bsdf(self, material, bsdf_name, scene, layer=None, node=None):
16151615 1 )
16161616
16171617 else :
1618-
1618+
16191619 # check for texture in surface_transmittance_name slot
16201620 if layer .glass_surface_transmittance_use_tex and layer .glass_surface_transmittance_tex != "" :
16211621 if util .is_uv_img (bpy .data .textures [layer .glass_surface_transmittance_tex ]):
@@ -1682,7 +1682,7 @@ def __emit_glass_bsdf(self, material, bsdf_name, scene, layer=None, node=None):
16821682 if anisotropy not in self ._textures_set :
16831683 self ._textures_set .add (anisotropy )
16841684 self .__emit_texture (bpy .data .textures [layer .glass_anisotropy_tex ], False , scene )
1685-
1685+
16861686 # check for texture in volume_transmittance slot
16871687 if layer .glass_volume_transmittance_use_tex and layer .glass_volume_transmittance_tex != "" :
16881688 if util .is_uv_img (bpy .data .textures [layer .glass_volume_transmittance_tex ]):
@@ -1704,7 +1704,7 @@ def __emit_glass_bsdf(self, material, bsdf_name, scene, layer=None, node=None):
17041704 if volume_transmittance_distance not in self ._textures_set :
17051705 self ._textures_set .add (volume_transmittance_distance )
17061706 self .__emit_texture (bpy .data .textures [layer .glass_volume_transmittance_distance_tex ], False , scene )
1707-
1707+
17081708 # check for texture in volume_absorption slot
17091709 if layer .glass_volume_absorption_use_tex and layer .glass_volume_absorption_tex != "" :
17101710 if util .is_uv_img (bpy .data .textures [layer .glass_volume_absorption_tex ]):
@@ -1827,7 +1827,7 @@ def __emit_plastic_brdf(self, material, bsdf_name, scene, layer=None, node=None)
18271827 roughness = layer .plastic_roughness
18281828 diffuse_reflectance = ""
18291829 diffuse_reflectance_multiplier = layer .plastic_diffuse_reflectance_multiplier
1830-
1830+
18311831 # check for texture in specular_reflectance slot
18321832 if layer .plastic_specular_reflectance_tex and layer .plastic_specular_reflectance_tex != "" :
18331833 if util .is_uv_img (bpy .data .textures [layer .plastic_specular_reflectance_tex ]):
@@ -1991,7 +1991,7 @@ def __emit_specular_btdf(self, material, bsdf_name, scene, layer, node=None):
19911991 transmittance_multiplier = layer .spec_btdf_trans_mult
19921992
19931993 fresnel_multiplier = layer .spec_fresnel_multiplier
1994-
1994+
19951995 if layer .spec_fresnel_multiplier_use_tex and layer .spec_fresnel_multiplier_tex != "" :
19961996 if util .is_uv_img (bpy .data .textures [layer .spec_fresnel_multiplier_tex ]):
19971997 spec_fresnel_multiplier = layer .spec_fresnel_multiplier_tex + "_inst"
@@ -2607,8 +2607,8 @@ def __emit_frame_element(self, scene):
26072607 self .__emit_parameter ("filter" , scene .appleseed .pixel_filter )
26082608 self .__emit_parameter ("filter_size" , scene .appleseed .pixel_filter_size )
26092609 if scene .render .use_border :
2610- X , Y , endX , endY = self .__get_border_limits (scene , width , height )
2611- self .__emit_parameter ("crop_window" , "{0} {1} {2} {3}" .format (X , Y , endX , endY ))
2610+ min_x , min_y , max_x , max_y = self .__get_border_limits (scene , width , height )
2611+ self .__emit_parameter ("crop_window" , "{0} {1} {2} {3}" .format (min_x , min_y , max_x , max_y ))
26122612 self .__close_element ("frame" )
26132613
26142614 def __get_frame_resolution (self , render ):
@@ -2624,11 +2624,11 @@ def __get_frame_aspect_ratio(self, render):
26242624 return xratio / yratio
26252625
26262626 def __get_border_limits (self , scene , width , height ):
2627- X = int (scene .render .border_min_x * width )
2628- Y = height - int (scene .render .border_max_y * height )
2629- endX = int (scene .render .border_max_x * width )
2630- endY = height - int (scene .render .border_min_y * height )
2631- return X , Y , endX , endY
2627+ min_x = int (scene .render .border_min_x * width )
2628+ max_x = int (scene .render .border_max_x * width )
2629+ min_y = height - int (scene .render .border_max_y * height ) - 1
2630+ max_y = height - int (scene .render .border_min_y * height ) - 1
2631+ return min_x , min_y , max_x , max_y
26322632
26332633 # ----------------------------------------------------------------------------------------------
26342634 # Configurations.
@@ -2707,7 +2707,7 @@ def __emit_common_configuration_parameters(self, scene, type):
27072707 self .__emit_parameter ("ibl_env_samples" , scene .appleseed .ibl_env_samples )
27082708 if not scene .appleseed .max_diffuse_bounces_unlimited :
27092709 self .__emit_parameter ("max_diffuse_bounces" , scene .appleseed .max_diffuse_bounces )
2710- if not scene .appleseed .max_glossy_bounces_unlimited :
2710+ if not scene .appleseed .max_glossy_bounces_unlimited :
27112711 self .__emit_parameter ("max_glossy_bounces" , scene .appleseed .max_glossy_bounces )
27122712 if not scene .appleseed .max_specular_bounces_unlimited :
27132713 self .__emit_parameter ("max_specular_bounces" , scene .appleseed .max_specular_bounces )
0 commit comments