Update render paths

This commit is contained in:
Lubos Lenco 2017-01-30 12:02:40 +01:00
parent 897e5c29de
commit 4af982f5de
5 changed files with 26 additions and 6 deletions

Binary file not shown.

View file

@ -2842,7 +2842,7 @@ class ArmoryExporter:
def post_export_world(self, world, o):
defs = bpy.data.worlds['Arm'].world_defs + bpy.data.worlds['Arm'].rp_defs
bgcol = world.world_envtex_color
if '_LDR' in defs:
if '_LDR' in defs: # No compositor used
for i in range(0, 3):
bgcol[i] = pow(bgcol[i], 1.0 / 2.2)
o['background_color'] = armutils.color_to_int(bgcol)

View file

@ -399,10 +399,11 @@ def play_project(in_viewport):
def on_compiled(mode): # build, play, play_viewport, publish
log.clear()
sdk_path = armutils.get_sdk_path()
wrd = bpy.data.worlds['Arm']
# Print info
if mode == 'publish':
target_name = make_utils.get_kha_target(bpy.data.worlds['Arm'].arm_project_target)
target_name = make_utils.get_kha_target(wrd.arm_project_target)
print('Project published')
files_path = armutils.get_fp() + '/build/' + target_name
if target_name == 'html5':
@ -412,14 +413,13 @@ def on_compiled(mode): # build, play, play_viewport, publish
elif target_name == 'windows':
print('VisualStudio 2015 project files are located in ' + files_path + '-build')
elif target_name == 'android-native':
print('Android Studio project files are located in ' + files_path + '-build')
print('Android Studio project files are located in ' + files_path + '-build/' + wrd.arm_project_name)
else:
print('Makefiles are located in ' + files_path + '-build')
return
# Launch project in new window
elif mode =='play':
wrd = bpy.data.worlds['Arm']
if wrd.arm_play_runtime == 'Electron':
electron_app_path = './build/electron.js'

View file

@ -46,12 +46,32 @@ def make_forward(cam):
if not cam.rp_worldnodes:
relink('Draw World', 'Set Target Accum')
nodes['Clear Target Mesh'].inputs[1].default_value = True
if not cam.rp_render_to_texture:
links.new(nodes['Framebuffer'].outputs[0], nodes['Set Target Mesh'].inputs[1])
if cam.rp_worldnodes:
l = nodes['Draw World'].outputs[0].links[0]
else:
l = nodes['Draw Meshes Mesh'].outputs[0].links[0]
links.remove(l)
if not cam.rp_translucency:
relink('Set Target Accum', 'Draw Compositor + FXAA')
last_node = 'Draw Compositor + FXAA'
if cam.rp_antialiasing == 'SMAA':
pass
elif cam.rp_antialiasing == 'TAA':
pass
elif cam.rp_antialiasing == 'FXAA':
pass
elif cam.rp_antialiasing == 'None':
last_node = 'Draw Compositor'
relink('Draw Compositor + FXAA', 'Draw Compositor')
if cam.rp_overlays:
links.new(nodes['Draw Compositor + FXAA'].outputs[0], nodes['Clear Target Overlay'].inputs[0])
links.new(last_node.outputs[0], nodes['Clear Target Overlay'].inputs[0])
def make_deferred(cam):

View file

@ -94,7 +94,7 @@ def init_properties():
bpy.types.World.arm_lod_gen_levels = IntProperty(name="Levels", description="Number of levels to generate", default=3, min=1)
bpy.types.World.arm_lod_gen_ratio = FloatProperty(name="Decimate Ratio", description="Decimate ratio", default=0.8)
bpy.types.World.arm_cache_shaders = BoolProperty(name="Cache Shaders", description="Do not rebuild existing shaders", default=True, update=assets.invalidate_shader_cache)
bpy.types.World.arm_cache_compiler = BoolProperty(name="Cache Compiler", description="Only recompile sources when required", default=True)
bpy.types.World.arm_cache_compiler = BoolProperty(name="Cache Compiler", description="Only recompile sources when required", default=False)
bpy.types.World.arm_gpu_processing = BoolProperty(name="GPU Processing", description="Utilize GPU for asset pre-processing at build time", default=True)
bpy.types.World.arm_play_live_patch = BoolProperty(name="Live Patching", description="Sync running player data to Blender", default=True)
bpy.types.World.arm_play_auto_build = BoolProperty(name="Auto Build", description="Rebuild scene on operator changes", default=True)