Skip to content

Commit

Permalink
Fog Settings Only Display Valid Parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiderguy-F committed Feb 15, 2024
1 parent 28cb741 commit da9bf97
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion addons/io_hubs_addon/components/definitions/fog.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ class Fog(HubsComponent):
'icon': 'MOD_OCEAN',
'version': (1, 0, 0)
}

def draw(self, context, layout, panel):
'''Draw method to be called by the panel. The base class method will print all the component properties'''
layout.prop(data=self, property="type")
print("Type:", self.type)
if self.type == "linear":
layout.prop(data=self, property="near")
layout.prop(data=self, property="far")
else:
layout.prop(data=self, property="density")

type: EnumProperty(
name="type",
Expand All @@ -29,7 +39,7 @@ class Fog(HubsComponent):
min=0,
max=1)

# TODO Make these properties to be displayed dynamically based on the fog type
# TODO Make these properties to be displayed dynamically based on the fog type, BlenderDiplom: Done
near: FloatProperty(
name="Near", description="Fog Near Distance (linear only)", default=1.0)

Expand Down

0 comments on commit da9bf97

Please sign in to comment.