Пример #1
0
def init_properties_on_load():
    global arm_version
    if not 'Arm' in bpy.data.worlds:
        init_properties()
    arm.utils.fetch_script_names()
    wrd = bpy.data.worlds['Arm']
    # Outdated project
    if bpy.data.filepath != '' and wrd.arm_version != arm_version:  # Call on project load only
        print('Project updated to sdk v' + arm_version)
        wrd.arm_version = arm_version
        arm.make.clean_project()
    # Set url for embedded player
    if arm.utils.with_krom():
        barmory.set_files_location(arm.utils.get_fp_build() + '/krom')
Пример #2
0
def init_properties_on_load():
    global arm_ver

    if not "Arm" in bpy.data.worlds:
        init_properties()

    armutils.fetch_script_names()

    wrd = bpy.data.worlds["Arm"]

    # Outdated project
    if int(wrd.arm_version.replace(".", "")) < int(arm_ver.replace(".", "")):
        wrd.arm_version = arm_ver

    # Set url for embedded player
    if armutils.with_krom():
        barmory.set_files_location(armutils.get_fp() + "/build/krom")
Пример #3
0
def init_properties_on_load():
    global arm_ver

    if not 'Arm' in bpy.data.worlds:
        init_properties()

    armutils.fetch_script_names()

    wrd = bpy.data.worlds['Arm']

    # Outdated project
    if int(wrd.arm_version.replace(".", "")[:4]) < int(
            arm_ver.replace(".", "")[:4]):
        # 17.01 - 17.01.1
        wrd.arm_version = arm_ver

    # Set url for embedded player
    if armutils.with_krom():
        barmory.set_files_location(armutils.get_fp() + '/build/krom')
Пример #4
0
def init_properties_on_load():
    global arm_version
    if not 'Arm' in bpy.data.worlds:
        init_properties()
    arm.utils.fetch_script_names()
    wrd = bpy.data.worlds['Arm']
    # Outdated project
    if bpy.data.filepath != '' and (
            wrd.arm_version != arm_version
            or wrd.arm_commit != arm_commit):  # Call on project load only
        print('Project updated to sdk v' + arm_version)
        if arm_version == '0.1.0':
            # TODO: Deprecated
            for lamp in bpy.data.lamps:
                lamp.arm_shadows_bias = 1.0
        wrd.arm_version = arm_version
        wrd.arm_commit = arm_commit
        arm.make.clean_project()
    # Set url for embedded player
    if arm.utils.with_krom():
        barmory.set_files_location(arm.utils.get_fp_build() + '/krom')
Пример #5
0
def init_properties_on_load():
    global arm_version
    if not 'Arm' in bpy.data.worlds:
        init_properties()
    arm.utils.fetch_script_names()
    wrd = bpy.data.worlds['Arm']
    # Outdated project
    if bpy.data.filepath != '' and wrd.arm_version != arm_version:  # Call on project load only
        print('Project updated to sdk v' + arm_version)
        # TODO: deprecated - Cycles profile merged into Full
        if arm_version == '17.10':
            if len(wrd.arm_rplist) > 0:
                rpdat = arm.utils.get_rp()
                if rpdat.arm_material_model == 'Solid':
                    rpdat.arm_material_model = 'Mobile'
                else:
                    rpdat.arm_material_model = 'Full'
        wrd.arm_version = arm_version
        arm.make.clean_project()
    # Set url for embedded player
    if arm.utils.with_krom():
        barmory.set_files_location(arm.utils.get_fp_build() + '/krom')
Пример #6
0
def init_properties_on_load():
    global arm_version
    if not 'Arm' in bpy.data.worlds:
        init_properties()
    arm.utils.fetch_script_names()
    wrd = bpy.data.worlds['Arm']
    # Outdated project
    if bpy.data.filepath != '' and (
            wrd.arm_version != arm_version
            or wrd.arm_commit != arm_commit):  # Call on project load only
        print('Project updated to sdk v' + arm_version)
        if arm_version == '0.2.0' and wrd.arm_version == '0.1.0':
            # Migrate deprecated props here
            for o in bpy.data.objects:
                if hasattr(o, 'arm_rb_ghost'):
                    o.arm_rb_trigger = o.arm_rb_ghost
            pass
        wrd.arm_version = arm_version
        wrd.arm_commit = arm_commit
        arm.make.clean_project()
    # Set url for embedded player
    if arm.utils.with_krom():
        barmory.set_files_location(arm.utils.get_fp_build() + '/krom')