Esempio n. 1
0
    def scs_project_path_update(self, context):
        # Update all related paths so their libraries gets reloaded from new "SCS Project Path" location.
        if not _get_scs_globals().config_update_lock:
            # utils.update_cgfx_library_rel_path(_get_scs_globals().cgfx_library_rel_path)
            _config_container.update_sign_library_rel_path(_get_scs_globals().scs_sign_model_inventory,
                                                           _get_scs_globals().sign_library_rel_path)

            _config_container.update_tsem_library_rel_path(_get_scs_globals().scs_tsem_profile_inventory,
                                                           _get_scs_globals().tsem_library_rel_path)

            _config_container.update_traffic_rules_library_rel_path(_get_scs_globals().scs_traffic_rules_inventory,
                                                                    _get_scs_globals().traffic_rules_library_rel_path)

            _config_container.update_hookup_library_rel_path(_get_scs_globals().scs_hookup_inventory,
                                                             _get_scs_globals().hookup_library_rel_path)

            _config_container.update_matsubs_inventory(_get_scs_globals().scs_matsubs_inventory,
                                                       _get_scs_globals().matsubs_library_rel_path)

            _config_container.update_item_in_file('Paths.ProjectPath', self.scs_project_path)

        # Update Blender image textures according to SCS texture records, so the images are loaded always from the correct locations.
        _material_utils.correct_blender_texture_paths()

        return None
Esempio n. 2
0
def post_save(scene):
    # reaload inventories
    readonly = True
    scs_globals = _get_scs_globals()
    _config_container.update_hookup_library_rel_path(
        scs_globals.scs_hookup_inventory,
        scs_globals.hookup_library_rel_path,
        readonly
    )
    _config_container.update_matsubs_inventory(
        scs_globals.scs_matsubs_inventory,
        scs_globals.matsubs_library_rel_path,
        readonly
    )
    _config_container.update_traffic_rules_library_rel_path(
        scs_globals.scs_traffic_rules_inventory,
        scs_globals.traffic_rules_library_rel_path,
        readonly
    )
    _config_container.update_tsem_library_rel_path(
        scs_globals.scs_tsem_profile_inventory,
        scs_globals.tsem_library_rel_path,
        readonly
    )
    _config_container.update_sign_library_rel_path(
        scs_globals.scs_sign_model_inventory,
        scs_globals.sign_library_rel_path,
        readonly
    )
Esempio n. 3
0
    def scs_project_path_update(self, context):
        # Update all related paths so their libraries gets reloaded from new "SCS Project Path" location.
        if not _get_scs_globals().config_update_lock:
            # utils.update_cgfx_library_rel_path(_get_scs_globals().cgfx_library_rel_path)
            _config_container.update_sign_library_rel_path(
                _get_scs_globals().scs_sign_model_inventory,
                _get_scs_globals().sign_library_rel_path)

            _config_container.update_tsem_library_rel_path(
                _get_scs_globals().scs_tsem_profile_inventory,
                _get_scs_globals().tsem_library_rel_path)

            _config_container.update_traffic_rules_library_rel_path(
                _get_scs_globals().scs_traffic_rules_inventory,
                _get_scs_globals().traffic_rules_library_rel_path)

            _config_container.update_hookup_library_rel_path(
                _get_scs_globals().scs_hookup_inventory,
                _get_scs_globals().hookup_library_rel_path)

            _config_container.update_matsubs_inventory(
                _get_scs_globals().scs_matsubs_inventory,
                _get_scs_globals().matsubs_library_rel_path)

            _config_container.update_item_in_file('Paths.ProjectPath',
                                                  self.scs_project_path)

        # Update Blender image textures according to SCS texture records, so the images are loaded always from the correct locations.
        _material_utils.correct_blender_texture_paths()

        return None
Esempio n. 4
0
def post_save(scene):
    # reload inventories
    readonly = True
    scs_globals = _get_scs_globals()
    _config_container.update_hookup_library_rel_path(
        scs_globals.scs_hookup_inventory,
        scs_globals.hookup_library_rel_path,
        readonly
    )
    _config_container.update_matsubs_inventory(
        scs_globals.scs_matsubs_inventory,
        scs_globals.matsubs_library_rel_path,
        readonly
    )
    _config_container.update_traffic_rules_library_rel_path(
        scs_globals.scs_traffic_rules_inventory,
        scs_globals.traffic_rules_library_rel_path,
        readonly
    )
    _config_container.update_tsem_library_rel_path(
        scs_globals.scs_tsem_profile_inventory,
        scs_globals.tsem_library_rel_path,
        readonly
    )
    _config_container.update_sign_library_rel_path(
        scs_globals.scs_sign_model_inventory,
        scs_globals.sign_library_rel_path,
        readonly
    )
Esempio n. 5
0
    def scs_project_path_update(self, context):
        # Update all related paths so their libraries gets reloaded from new "SCS Project Path" location.
        if not _get_scs_globals().config_update_lock:
            _config_container.update_sign_library_rel_path(
                _get_scs_globals().scs_sign_model_inventory,
                _get_scs_globals().sign_library_rel_path)

            _config_container.update_tsem_library_rel_path(
                _get_scs_globals().scs_tsem_profile_inventory,
                _get_scs_globals().tsem_library_rel_path)

            _config_container.update_traffic_rules_library_rel_path(
                _get_scs_globals().scs_traffic_rules_inventory,
                _get_scs_globals().traffic_rules_library_rel_path)

            _config_container.update_hookup_library_rel_path(
                _get_scs_globals().scs_hookup_inventory,
                _get_scs_globals().hookup_library_rel_path)

            _config_container.update_matsubs_inventory(
                _get_scs_globals().scs_matsubs_inventory,
                _get_scs_globals().matsubs_library_rel_path)

            _config_container.update_item_in_file('Paths.ProjectPath',
                                                  self.scs_project_path)

        return None
Esempio n. 6
0
 def hookup_library_rel_path_update(self, context):
     # print('Hookup Library Path UPDATE: "%s"' % self.hookup_library_rel_path)
     _config_container.update_hookup_library_rel_path(_get_scs_globals().scs_hookup_inventory,
                                                      self.hookup_library_rel_path)
     return None
Esempio n. 7
0
 def hookup_library_rel_path_update(self, context):
     # print('Hookup Library Path UPDATE: "%s"' % self.hookup_library_rel_path)
     _config_container.update_hookup_library_rel_path(
         _get_scs_globals().scs_hookup_inventory,
         self.hookup_library_rel_path)
     return None