simple-carla 2.3.1__tar.gz → 2.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,11 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: simple_carla
3
- Version: 2.3.1
3
+ Version: 2.3.2
4
4
  Summary: An easy-to-use, object-oriented interface to the carla plugin host.
5
5
  Author-email: Leon Dionne <ldionne@dridesign.sh.cn>
6
6
  Description-Content-Type: text/markdown
7
7
  Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
8
+ License-File: LICENSE
8
9
  Requires-Dist: numpy
9
10
  Requires-Dist: log_soso
10
11
  Requires-Dist: PyQt5
@@ -18,7 +18,7 @@ build-backend = "flit_core.buildapi"
18
18
  sc-plugin-def = "simple_carla.scripts.sc_plugin_def:main"
19
19
 
20
20
  [bumpver]
21
- current_version = "2.3.1"
21
+ current_version = "2.3.2"
22
22
  version_pattern = "MAJOR.MINOR.PATCH"
23
23
  commit_message = "Bump version {old_version} -> {new_version}"
24
24
  commit = true
@@ -240,7 +240,7 @@ from carla_backend import (
240
240
  )
241
241
 
242
242
 
243
- __version__ = "2.3.1"
243
+ __version__ = "2.3.2"
244
244
 
245
245
 
246
246
  # -------------------------------------------------------------------
@@ -1295,7 +1295,7 @@ class _SimpleCarla(CarlaHostDLL):
1295
1295
  self._plugins[plugin_id] = self._plugin_by_uuid[carla_plugin_name]
1296
1296
  self._plugins[plugin_id].post_embed_init(plugin_id) # Set up parameters, etc.
1297
1297
  else:
1298
- logging.error('cb_plugin_added: Plugin "%s" not found in _plugin_by_uuid when added',
1298
+ logging.error('cb_plugin_added: Plugin "%s" not found in _plugin_by_uuid',
1299
1299
  carla_plugin_name)
1300
1300
 
1301
1301
  def cb_plugin_removed(self, plugin_id):
@@ -1514,20 +1514,20 @@ class _SimpleCarla(CarlaHostDLL):
1514
1514
  # ================================================================================
1515
1515
 
1516
1516
  def add_plugin(self, plugin):
1517
+ logging.debug('add_plugin %s', plugin.unique_name)
1517
1518
  self._plugin_by_uuid[plugin.unique_name] = plugin
1518
- if self.is_engine_running():
1519
- if not self._add_plugin( # Carla parameter
1520
- # ----------------------------------------- # ---------------
1521
- plugin.plugin_def['build'], # btype
1522
- plugin.plugin_def['type'], # ptype
1523
- plugin.plugin_def['filename'], # filename
1524
- plugin.unique_name, # name
1525
- plugin.plugin_def['label'], # label
1526
- int(plugin.plugin_def['uniqueId'] or 0), # uniqueId
1527
- None, # extraPtr
1528
- PLUGIN_OPTIONS_NULL # options
1529
- # ----------------------------------------- # ---------------
1530
- ): raise Exception("Failed to add plugin")
1519
+ if not self._add_plugin( # Carla parameter
1520
+ # ----------------------------------------- # ---------------
1521
+ plugin.plugin_def['build'], # btype
1522
+ plugin.plugin_def['type'], # ptype
1523
+ plugin.plugin_def['filename'], # filename
1524
+ plugin.unique_name, # name
1525
+ plugin.plugin_def['label'], # label
1526
+ int(plugin.plugin_def['uniqueId'] or 0), # uniqueId
1527
+ None, # extraPtr
1528
+ PLUGIN_OPTIONS_NULL # options
1529
+ # ----------------------------------------- # ---------------
1530
+ ): raise Exception("Failed to add plugin")
1531
1531
 
1532
1532
  # -------------------------------------------------------------------
1533
1533
  # Plugin access funcs
@@ -1801,14 +1801,12 @@ class _SimpleCarla(CarlaHostDLL):
1801
1801
  """
1802
1802
  Generates a "unique_name" string for internal plugin identification.
1803
1803
  """
1804
- unique_names = [ existing_plugin.unique_name \
1805
- for existing_plugin in self._plugin_by_uuid.values() \
1806
- if existing_plugin.original_plugin_name == plugin.original_plugin_name ]
1807
- idx = len(unique_names) + 1
1808
- unique_name = f'{plugin.original_plugin_name} {idx}'
1809
- while unique_name in unique_names:
1804
+ sanitized = plugin.original_plugin_name.replace('/', '.')
1805
+ idx = 1
1806
+ unique_name = f'{sanitized} {idx}'
1807
+ while unique_name in self._plugin_by_uuid:
1810
1808
  idx += 1
1811
- unique_name = f'{plugin.original_plugin_name} {idx}'
1809
+ unique_name = f'{sanitized} {idx}'
1812
1810
  return unique_name
1813
1811
 
1814
1812
 
File without changes
File without changes
File without changes