Rename tess to displacement
This commit is contained in:
parent
52d5e04026
commit
68754ad79c
|
@ -98,7 +98,7 @@ def parse_output(node, _con, _vert, _frag, _geom, _tesc, _tese, _parse_surface,
|
|||
# parse_volume_input(node.inputs[1])
|
||||
|
||||
# Displacement
|
||||
if _parse_displacement and tess_enabled() and node.inputs[2].is_linked and tese != None:
|
||||
if _parse_displacement and disp_enabled() and node.inputs[2].is_linked and tese != None:
|
||||
parsed = []
|
||||
parents = []
|
||||
normal_parsed = False
|
||||
|
@ -1348,8 +1348,8 @@ def safesrc(name):
|
|||
def get_sdk_path():
|
||||
return arm.utils.get_sdk_path()
|
||||
|
||||
def tess_enabled():
|
||||
return arm.utils.tess_enabled(arm.make_state.target)
|
||||
def disp_enabled():
|
||||
return arm.utils.disp_enabled(arm.make_state.target)
|
||||
|
||||
def warn(text):
|
||||
arm.log.warn(text)
|
||||
|
|
|
@ -9,15 +9,15 @@ add_mesh_contexts = []
|
|||
def disp_linked(output_node):
|
||||
# Armory PBR with unlinked height socket
|
||||
linked = output_node.inputs[2].is_linked
|
||||
tess_enabled = arm.utils.tess_enabled(make_state.target)
|
||||
disp_enabled = arm.utils.disp_enabled(make_state.target)
|
||||
if linked:
|
||||
l = output_node.inputs[2].links[0]
|
||||
if l.from_node.type == 'GROUP' and l.from_node.node_tree.name.startswith('Armory PBR') and \
|
||||
((len(l.from_node.inputs) == 14 and l.from_node.inputs[10].is_linked == False) or (len(l.from_node.inputs) != 14 and l.from_node.inputs[7].is_linked == False)):
|
||||
return False
|
||||
if linked and not tess_enabled:
|
||||
if linked and not disp_enabled:
|
||||
log.warn('Tessellation not available on ' + make_state.target)
|
||||
return tess_enabled and linked
|
||||
return disp_enabled and linked
|
||||
|
||||
def get_rpasses(material):
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ class ArmRPListItem(bpy.types.PropertyGroup):
|
|||
('OrenNayar', 'OrenNayar', 'OrenNayar'),
|
||||
],
|
||||
name="Diffuse", description="Diffuse model", default='Lambert', update=assets.invalidate_shader_cache)
|
||||
arm_tessellation = bpy.props.BoolProperty(name="Tessellation", description="Enable tessellation for height maps on supported targets", default=True, update=assets.invalidate_shader_cache)
|
||||
arm_displacement = bpy.props.BoolProperty(name="Displacement", description="Enable tessellated displacement for height maps", default=True, update=assets.invalidate_shader_cache)
|
||||
arm_rp_resolution = EnumProperty(
|
||||
items=[('Display', 'Display', 'Display'),
|
||||
('480', '480p', '480p'),
|
||||
|
|
|
@ -1010,7 +1010,7 @@ class ArmRenderPathPanel(bpy.types.Panel):
|
|||
layout.prop(rpdat, 'arm_texture_filter')
|
||||
layout.prop(rpdat, "arm_diffuse_model")
|
||||
layout.prop(rpdat, 'arm_ssrs')
|
||||
layout.prop(rpdat, 'arm_tessellation')
|
||||
layout.prop(rpdat, 'arm_displacement')
|
||||
layout.prop(rpdat, 'arm_clouds')
|
||||
|
||||
class ArmRenderPropsPanel(bpy.types.Panel):
|
||||
|
|
|
@ -392,9 +392,9 @@ def check_engine(self):
|
|||
return False
|
||||
return True
|
||||
|
||||
def tess_enabled(target):
|
||||
def disp_enabled(target):
|
||||
rpdat = get_rp()
|
||||
return (target == 'krom' or target == 'native') and rpdat.arm_tessellation
|
||||
return (target == 'krom' or target == 'native') and rpdat.arm_displacement
|
||||
|
||||
def is_object_animation_enabled(bobject):
|
||||
# Checks if animation is present and enabled
|
||||
|
|
Loading…
Reference in a new issue