Describe the issue
Hey, I have some old projects with VST2s that I no longer have installed and I want to replace their absolute plugin path with the VST3 path.
I can't seem to set plugin_path.
I'm fairly sure I'm not doing this wrong, but it's a bit difficult to understand what PyFLP is doing at a low level without comments, so it could be that I'm not meant to do it like this - if that's the case I'd appreciate a point in the right direction.
What version of PyFLP are you using?
2.0.0a7.post0
What code caused this issue?
import pyflp
file = "fc.flp"
project = pyflp.parse(file)
# key: plugin name
# value: new plugin path
remap = {
'Nectar 3':'C:\\Program Files\\Common Files\\VST3\\iZotope\\Nectar 3.vst3'}
for insert in project.mixer:
for slot in insert:
if slot.plugin is not None:
if type(slot.plugin) == pyflp.plugin.VSTPlugin:
if str(slot.plugin.name) in remap:
print("! " + str(slot.plugin.name))
print("! changing path " + str(slot.plugin.plugin_path) + " to " + remap[str(slot.plugin.name)])
slot.plugin.plugin_path = remap[slot.plugin.name]
else:
print(slot.plugin.name)
#pyflp.save(project, "remap_" + file)
Screenshots, Additional info
! Nectar 3
! changing path F:\Program Files\Steinberg\VSTPlugins\iZotope\Nectar 3.dll to C:\Program Files\Common Files\VST3\iZotope\Nectar 3.vst3
Traceback (most recent call last):
File "C:\Users\gen5\Documents\flp2.py", line 21, in <module>
slot.plugin.plugin_path = remap[slot.plugin.name]
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\gen5\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyflp\plugin.py", line 461, in __set__
self._set(cast(VSTPluginEvent, ins.events.first(PluginID.Data)), value)
File "C:\Users\gen5\AppData\Local\Programs\Python\Python311\Lib\site-packages\pyflp\plugin.py", line 467, in _set
event[self._id][self._prop] = value
~~~~~~~~~~~~~~~^^^^^^^^^^^^
TypeError: 'str' object does not support item assignment
Describe the issue
Hey, I have some old projects with VST2s that I no longer have installed and I want to replace their absolute plugin path with the VST3 path.
I can't seem to set plugin_path.
I'm fairly sure I'm not doing this wrong, but it's a bit difficult to understand what PyFLP is doing at a low level without comments, so it could be that I'm not meant to do it like this - if that's the case I'd appreciate a point in the right direction.
What version of PyFLP are you using?
2.0.0a7.post0
What code caused this issue?
Screenshots, Additional info