Skip to content

Commit

Permalink
Pass proper args
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Garcia committed Sep 24, 2021
1 parent 322b78f commit d165536
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions io_scene_halo/misc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,15 @@ class SkyPropertiesGroup(PropertyGroup):
description="Set the yaw for the sun.",
default=0.0,
min=0.0,
max=360.0
max=350.0
)

sun_pitch: FloatProperty(
name="Sun Pitch",
description="Set the pitch for the sun.",
default=0.0,
min=0.0,
max=360.0
max=80.0
)
zenith_color: FloatVectorProperty(
name = "Zenith Color",
Expand Down
17 changes: 10 additions & 7 deletions io_scene_halo/misc/generate_hemisphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@

from math import degrees, radians

columm_rot = 14.65
columm_rot = 13.84615384615385
column_elements = 26
row_rot = 12.5
row_rot = 11.25
row_elements = 8

def interpolate_color(color_a, color_b, steps):
Expand All @@ -54,7 +54,10 @@ def get_center_point(rotation, is_x_axis):
light_spacing = columm_rot

sun_id = round(rotation / light_spacing)

print(light_spacing)
print(rotation)
print(is_x_axis)
print(sun_id)
return sun_id

def get_percentages(rotation, is_x_axis, color_loops):
Expand Down Expand Up @@ -156,11 +159,11 @@ def darken_color(color, light_x_idx, light_y_idx, percentage_list_y, percentage_
return (color_r_xy, color_g_xy, color_b_xy)

def generate_hemisphere(zenith_color, horizon_color, strength, sun_yaw, sun_pitch):
percentage_list_y = get_percentages(sun_yaw, False, False)
percentage_list_x = get_percentages(sun_pitch, True, True)
percentage_list_y = get_percentages(sun_pitch, False, False)
percentage_list_x = get_percentages(sun_yaw, True, True)

sun_row_id = get_center_point(sun_yaw, False)
sun_column_id = get_center_point(sun_pitch, True)
sun_row_id = get_center_point(sun_pitch, False)
sun_column_id = get_center_point(sun_yaw, True)

color_list = interpolate_color(zenith_color, horizon_color, 6)

Expand Down

0 comments on commit d165536

Please sign in to comment.