So i have a plugin we bought, thats doing what its supossed to do, but once i call the menue with my python script, i lack the ability to apply it. I tried threading, but cinema4d is (wisely) on the side of us devs threading lightly.
def main(): c4d.CallCommand(CORONA_TO_CV4DMATERIAL_CONVERT) doc = documents.GetActiveDocument() ackThread = threading.Thread(target=acknowledgeThread) ackThread.start() time.sleep(5) tool = c4d.plugins.FindPlugin(CORONA_TO_CV4DMATERIAL_CONVERT) # Search Transfer Tool instance c4d.CallButton(tool, c4d.MDATA_APPLY) c4d.EventAdd() c4d.WriteConsole("acknowledged\n")
PS: Usually there is a header file with menue options listed that can be called as commands. My first attempt was to itterate from the plugins command nr upwards in a for loop until i found another plugin. No changes were applied.
Finally, i tried to de-obfuscate the python bytecode, to repair the plugin, but failed due to lazyness. (Its identifying header + barrelshift & XOR?)