When I run this code in the script editor of Maya, I get this error:
TypeError: super() takes at least 1 argument (0 given)
I do not understand what my super init function is requiring.
google, and youtube. I am running this code in maya 2018.
import maya.cmds as cmds
class one:
mod_txt = "_one_mod"
def __init__(self,txt):
self.txt = txt
def mod_txt_method(self):
self.txt = self.txt + self.mod_txt
class two(one):
mod_txt = "_two_mod"
def __init__(self,txt,txt_two):
super().__init__(self,txt)
self.txt_two = text_two
ltv = two('doug','chris')
print ltv.txt
print ltv.txt_two
I would think I should be able to add the new attribute txt_two
to my class, two
.