Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fog Settings Only Display Relevant Parameters #270

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the print.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably better to remove this as it's not a TODO anymore and the commit and the commit author already give you the information that you are adding.

near: FloatProperty(
name="Near", description="Fog Near Distance (linear only)", default=1.0)

Expand Down