Skip to content

Commit

Permalink
feat(property): Add new renderedInViewports prop
Browse files Browse the repository at this point in the history
  • Loading branch information
NMC-TBone authored and StjerneIdioten committed Nov 21, 2023
1 parent 1dcecf2 commit 5024983
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion addon/i3dio/ui/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class I3DNodeObjectAttributes(bpy.types.PropertyGroup):
'visibility': {'name': 'visibility', 'default': True, 'tracking': {'member_path': 'hide_render',
'mapping': {True: False,
False: True}}},
'rendered_in_viewports': {'name': 'renderedInViewports', 'default': True},
'clip_distance': {'name': 'clipDistance', 'default': 1000000.0},
'min_clip_distance': {'name': 'minClipDistance', 'default': 0.0},
'object_mask': {'name': 'objectMask', 'default': '0', 'type': 'HEX'},
Expand Down Expand Up @@ -86,6 +87,12 @@ class I3DNodeObjectAttributes(bpy.types.PropertyGroup):
default=True
)

rendered_in_viewports: BoolProperty(
name="Rendered In Viewports",
description="Determines if the object is rendered in Giants Editor viewport",
default=i3d_map['rendered_in_viewports']['default']
)

lod_distance: StringProperty(
name="LOD Distance",
description="For example:0 100",
Expand Down Expand Up @@ -412,8 +419,9 @@ def draw(self, context):
layout.use_property_split = True
layout.use_property_decorate = False
obj = bpy.context.active_object

i3d_property(layout, obj.i3d_attributes, 'visibility', obj)
i3d_property(layout, obj.i3d_attributes, 'rendered_in_viewports', obj)
i3d_property(layout, obj.i3d_attributes, 'clip_distance', obj)
i3d_property(layout, obj.i3d_attributes, 'min_clip_distance', obj)
i3d_property(layout, obj.i3d_attributes, 'lod_distance', obj)
Expand Down

0 comments on commit 5024983

Please sign in to comment.