Example #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
Example #2
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
Example #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:
            _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
Example #4
0
    def tsem_library_use_infixed_update(self, context):

        if not _get_scs_globals(
        ).config_update_lock:  # prevent reloading library when blender is starting
            _config_container.update_tsem_library_rel_path(
                _get_scs_globals().scs_tsem_profile_inventory,
                self.tsem_library_rel_path,
                readonly=True)

        _config_container.update_item_in_file(
            'Paths.TSemProfileUseInfixed', int(self.tsem_library_use_infixed))
Example #5
0
    def trigger_actions_use_infixed_update(self, context):

        if not _get_scs_globals(
        ).config_update_lock:  # prevent reloading library when blender is starting
            _config_container.update_trigger_actions_rel_path(
                _get_scs_globals().scs_trigger_actions_inventory,
                self.trigger_actions_rel_path,
                readonly=True)

        _config_container.update_item_in_file(
            'Paths.TriggerActionsUseInfixed',
            int(self.trigger_actions_use_infixed))
Example #6
0
    def traffic_rules_library_use_infixed_update(self, context):

        if not _get_scs_globals(
        ).config_update_lock:  # prevent reloading library when blender is starting
            _config_container.update_traffic_rules_library_rel_path(
                _get_scs_globals().scs_traffic_rules_inventory,
                self.traffic_rules_library_rel_path,
                readonly=True)

        _config_container.update_item_in_file(
            'Paths.TrafficRulesUseInfixed',
            int(self.traffic_rules_library_use_infixed))
        return None
Example #7
0
 def active_uv_only_update(self, context):
     _config_container.update_item_in_file('Export.ActiveUVOnly',
                                           int(self.active_uv_only))
     return None
Example #8
0
 def tp_line_color_update(self, context):
     _config_container.update_item_in_file(
         'GlobalColors.TriggerLineBase',
         tuple(self.tp_connection_base_color))
     return None
Example #9
0
 def export_vertex_color_type_7_update(self, context):
     _config_container.update_item_in_file('Export.ExportVertexColorType7', self.export_vertex_color_type_7)
     return None
Example #10
0
 def include_edgesplit_update(self, context):
     _config_container.update_item_in_file('Export.IncludeEdgesplit', int(self.include_edgesplit))
     return None
Example #11
0
 def mesh_creation_type_update(self, context):
     _config_container.update_item_in_file('Import.MeshCreationType', self.mesh_creation_type)
     return None
Example #12
0
 def import_pis_file_update(self, context):
     _config_container.update_item_in_file('Import.ImportPisFile', int(self.import_pis_file))
     return None
Example #13
0
 def dump_level_update(self, context):
     # utils.update_item_in_config_file(utils.get_config_filepath(), 'Various.DumpLevel', self.dump_level)
     _config_container.update_item_in_file('Header.DumpLevel', self.dump_level)
     return None
Example #14
0
 def locator_coll_face_color_update(self, context):
     _config_container.update_item_in_file('GlobalColors.ColliderLocatorsFace',
                                           tuple(self.locator_coll_face_color))
     return None
Example #15
0
 def locator_model_wire_color_update(self, context):
     _config_container.update_item_in_file('GlobalColors.ModelLocatorsWire',
                                           tuple(self.locator_model_wire_color))
     return None
Example #16
0
 def use_normals_update(self, context):
     _config_container.update_item_in_file('Import.UseNormals',
                                           int(self.use_normals))
     return None
Example #17
0
 def export_vertex_color_update(self, context):
     _config_container.update_item_in_file('Export.ExportVertexColor',
                                           int(self.export_vertex_color))
     return None
Example #18
0
 def display_connections_update(self, context):
     _config_container.update_item_in_file('GlobalDisplay.DisplayConnections', int(self.display_connections))
     return None
Example #19
0
 def info_text_color_update(self, context):
     _config_container.update_item_in_file('GlobalColors.InfoText',
                                           tuple(self.info_text_color))
     return None
Example #20
0
 def optimized_connections_drawing_update(self, context):
     _config_container.update_item_in_file('GlobalDisplay.OptimizedConnsDrawing', int(self.optimized_connections_drawing))
     return None
Example #21
0
 def welding_precision_update(self, context):
     _config_container.update_item_in_file('Import.WeldingPrecision', int(self.welding_precision))
     return None
Example #22
0
 def curve_segments_update(self, context):
     _config_container.update_item_in_file('GlobalDisplay.CurveSegments', self.curve_segments)
     return None
Example #23
0
 def bone_import_scale_update(self, context):
     _config_container.update_item_in_file('Import.BoneImportScale', float(self.bone_import_scale))
     return None
Example #24
0
 def np_curve_color_update(self, context):
     _config_container.update_item_in_file('GlobalColors.NavigationCurveBase', tuple(self.np_connection_base_color))
     return None
Example #25
0
 def export_scale_update(self, context):
     _config_container.update_item_in_file('Export.ExportScale', float(self.export_scale))
     return None
Example #26
0
 def tp_line_color_update(self, context):
     _config_container.update_item_in_file('GlobalColors.TriggerLineBase', tuple(self.tp_connection_base_color))
     return None
Example #27
0
 def export_vertex_groups_update(self, context):
     _config_container.update_item_in_file('Export.ExportVertexGroups', int(self.export_vertex_groups))
     return None
Example #28
0
 def display_info_update(self, context):
     _config_container.update_item_in_file('GlobalDisplay.DisplayTextInfo', self.display_info)
     return None
Example #29
0
 def export_pia_file_update(self, context):
     _config_container.update_item_in_file('Export.ExportPiaFile', int(self.export_pia_file))
     return None
Example #30
0
 def info_text_color_update(self, context):
     _config_container.update_item_in_file('GlobalColors.InfoText', tuple(self.info_text_color))
     return None
Example #31
0
 def include_edgesplit_update(self, context):
     _config_container.update_item_in_file('Export.IncludeEdgesplit',
                                           int(self.include_edgesplit))
     return None
Example #32
0
 def output_type_update(self, context):
     _config_container.update_item_in_file('Export.OutputType',
                                           self.output_type)
     return None
Example #33
0
 def export_vertex_groups_update(self, context):
     _config_container.update_item_in_file('Export.ExportVertexGroups',
                                           int(self.export_vertex_groups))
     return None
Example #34
0
 def sign_export_update(self, context):
     _config_container.update_item_in_file('Export.SignExport',
                                           int(self.sign_export))
     return None
Example #35
0
 def export_vertex_color_type_7_update(self, context):
     _config_container.update_item_in_file('Export.ExportVertexColorType7',
                                           self.export_vertex_color_type_7)
     return None
Example #36
0
 def display_info_update(self, context):
     _config_container.update_item_in_file('GlobalDisplay.DisplayTextInfo',
                                           self.display_info)
     return None
Example #37
0
 def export_pia_file_update(self, context):
     _config_container.update_item_in_file('Export.ExportPiaFile',
                                           int(self.export_pia_file))
     return None
Example #38
0
 def dump_level_update(self, context):
     # utils.update_item_in_config_file(utils.get_config_filepath(), 'Various.DumpLevel', self.dump_level)
     _config_container.update_item_in_file('Header.DumpLevel',
                                           self.dump_level)
     return None
Example #39
0
 def use_welding_update(self, context):
     _config_container.update_item_in_file('Import.UseWelding',
                                           int(self.use_welding))
     return None
Example #40
0
 def welding_precision_update(self, context):
     _config_container.update_item_in_file('Import.WeldingPrecision',
                                           int(self.welding_precision))
     return None
Example #41
0
 def use_welding_update(self, context):
     _config_container.update_item_in_file('Import.UseWelding', int(self.use_welding))
     return None
Example #42
0
 def load_textures_update(self, context):
     _config_container.update_item_in_file('Import.LoadTextures',
                                           int(self.load_textures))
     return None
Example #43
0
 def load_textures_update(self, context):
     _config_container.update_item_in_file('Import.LoadTextures', int(self.load_textures))
     return None
Example #44
0
 def import_pis_file_update(self, context):
     _config_container.update_item_in_file('Import.ImportPisFile',
                                           int(self.import_pis_file))
     return None
Example #45
0
 def connected_bones_update(self, context):
     _config_container.update_item_in_file('Import.ConnectedBones', int(self.connected_bones))
     return None
Example #46
0
 def connected_bones_update(self, context):
     _config_container.update_item_in_file('Import.ConnectedBones',
                                           int(self.connected_bones))
     return None
Example #47
0
 def search_subdirs_for_pia_update(self, context):
     _config_container.update_item_in_file('Import.IncludeSubdirsForPia', int(self.include_subdirs_for_pia))
     return None
Example #48
0
 def bone_import_scale_update(self, context):
     _config_container.update_item_in_file('Import.BoneImportScale',
                                           float(self.bone_import_scale))
     return None
Example #49
0
 def content_type_update(self, context):
     _config_container.update_item_in_file('Export.ContentType', self.content_type)
     return None
Example #50
0
 def search_subdirs_for_pia_update(self, context):
     _config_container.update_item_in_file(
         'Import.IncludeSubdirsForPia', int(self.include_subdirs_for_pia))
     return None
Example #51
0
 def apply_modifiers_update(self, context):
     _config_container.update_item_in_file('Export.ApplyModifiers', int(self.apply_modifiers))
     return None
Example #52
0
 def mesh_creation_type_update(self, context):
     _config_container.update_item_in_file('Import.MeshCreationType',
                                           self.mesh_creation_type)
     return None
Example #53
0
 def active_uv_only_update(self, context):
     _config_container.update_item_in_file('Export.ActiveUVOnly', int(self.active_uv_only))
     return None
Example #54
0
 def content_type_update(self, context):
     _config_container.update_item_in_file('Export.ContentType',
                                           self.content_type)
     return None
Example #55
0
 def export_vertex_color_update(self, context):
     _config_container.update_item_in_file('Export.ExportVertexColor', int(self.export_vertex_color))
     return None
Example #56
0
 def export_scale_update(self, context):
     _config_container.update_item_in_file('Export.ExportScale',
                                           float(self.export_scale))
     return None
Example #57
0
 def output_type_update(self, context):
     _config_container.update_item_in_file('Export.OutputType', self.output_type)
     return None
Example #58
0
 def apply_modifiers_update(self, context):
     _config_container.update_item_in_file('Export.ApplyModifiers',
                                           int(self.apply_modifiers))
     return None
Example #59
0
 def sign_export_update(self, context):
     _config_container.update_item_in_file('Export.SignExport', int(self.sign_export))
     return None
Example #60
0
 def np_curve_color_update(self, context):
     _config_container.update_item_in_file(
         'GlobalColors.NavigationCurveBase',
         tuple(self.np_connection_base_color))
     return None