Temp visibility prop

This commit is contained in:
luboslenco 2018-05-24 23:58:55 +02:00
parent 8e6cf61a33
commit 6b97946c22
3 changed files with 5 additions and 1 deletions

View file

@ -782,7 +782,7 @@ class ArmoryExporter:
if bobject.parent_type == "BONE":
o['parent_bone'] = bobject.parent_bone
if bobject.hide_render:
if bobject.hide_render or bobject.arm_visible == False:
o['visible'] = False
if not bobject.cycles_visibility.camera:

View file

@ -168,6 +168,7 @@ def init_properties():
bpy.types.Object.arm_export = BoolProperty(name="Export", description="Export object data", default=True)
bpy.types.Object.arm_spawn = BoolProperty(name="Spawn", description="Auto-add this object when creating scene", default=True)
bpy.types.Object.arm_mobile = BoolProperty(name="Mobile", description="Object moves during gameplay", default=False)
bpy.types.Object.arm_visible = BoolProperty(name="Visible", description="Render this object", default=True)
bpy.types.Object.arm_soft_body_margin = FloatProperty(name="Soft Body Margin", description="Collision margin", default=0.04)
bpy.types.Object.arm_rb_linear_factor = FloatVectorProperty(name="Linear Factor", size=3, description="Set to 0 to lock axis", default=[1,1,1])
bpy.types.Object.arm_rb_angular_factor = FloatVectorProperty(name="Angular Factor", size=3, description="Set to 0 to lock axis", default=[1,1,1])

View file

@ -33,6 +33,9 @@ class ObjectPropsPanel(bpy.types.Panel):
row.prop(obj, 'arm_mobile')
row.prop(obj, 'arm_animation_enabled')
if bpy.app.version >= (2, 80, 1):
layout.prop(obj, 'arm_visible')
if obj.type == 'MESH':
layout.prop(obj, 'arm_instanced')
if obj.arm_instanced: