chiark / gitweb /
Allow plugin variable names to include numbers
authorsmorloc <smorloc@gmail.com>
Tue, 22 Jan 2013 18:04:16 +0000 (13:04 -0500)
committersmorloc <smorloc@gmail.com>
Tue, 22 Jan 2013 18:04:16 +0000 (13:04 -0500)
An example name would be 'extruder1'

Cura/util/profile.py

index bfd0c0d689f17607af721eda7f7c816a7ae4554c..36d76c4e8fc5e87f6de80556eb942230ffe4cbff 100644 (file)
@@ -586,7 +586,7 @@ def getPluginList():
                                        elif line[0].upper() == 'DEPEND':
                                                pass
                                        elif line[0].upper() == 'PARAM':
-                                               m = re.match('([a-zA-Z]*)\(([a-zA-Z_]*)(?::([^\)]*))?\) +(.*)', line[1].strip())
+                                               m = re.match('([a-zA-Z][a-zA-Z0-9]*)\(([a-zA-Z_]*)(?::([^\)]*))?\) +(.*)', line[1].strip())
                                                if m is not None:
                                                        item['params'].append({'name': m.group(1), 'type': m.group(2), 'default': m.group(3), 'description': m.group(4)})
                                        else: