예제 #1
0
    def execute(self, context):
        if not arm.utils.check_saved(self):
            return {"CANCELLED"}

        if not arm.utils.check_sdkpath(self):
            return {"CANCELLED"}

        if not arm.utils.check_engine(self):
            return {"CANCELLED"}

        arm.utils.check_projectpath(self)

        arm.utils.check_default_props()

        wrd = bpy.data.worlds['Arm']
        item = wrd.arm_exporterlist[wrd.arm_exporterlist_index]
        if item.arm_project_rp == '':
            item.arm_project_rp = wrd.arm_rplist[wrd.arm_rplist_index].name
        # Assume unique rp names
        rplist_index = wrd.arm_rplist_index
        for i in range(0, len(wrd.arm_rplist)):
            if wrd.arm_rplist[i].name == item.arm_project_rp:
                wrd.arm_rplist_index = i
                break
        assets.invalidate_shader_cache(None, None)
        assets.invalidate_enabled = False
        make.build(item.arm_project_target, is_export=True)
        make.compile()
        wrd.arm_rplist_index = rplist_index
        assets.invalidate_enabled = True
        return{'FINISHED'}
예제 #2
0
def set_renderpath(self, context):
    global updating_preset
    if updating_preset == True:
        return
    # assets.invalidate_compiled_data(self, context)
    assets.invalidate_shader_cache(self, context)
    make_renderer(arm.utils.get_rp())
예제 #3
0
def set_renderpath(self, context):
    global updating_preset
    if updating_preset == True:
        return
    if bpy.context.camera == None:
        return
    assets.invalidate_shader_cache(self, context)
    make_renderer.make_renderer(bpy.context.camera)
    bpy.context.camera.renderpath_path = 'armory_default'
예제 #4
0
def update_material_model(self, context):
    assets.invalidate_shader_cache(self, context)
    update_renderpath(self, context)
예제 #5
0
def update_renderpath(self, context):
    if assets.invalidate_enabled == False:
        return
    assets.invalidate_shader_cache(self, context)
    bpy.data.worlds['Arm'].arm_recompile = True