On 31/10/2015 at 07:26, xxxxxxxx wrote:
A method that is instance bound needs a parameter "self" so it can be called through
instance.method(parameters)
Then you can create a variable of the newly defined class, and call the methods on it:
import c4d
class dialog() :
def maindialog(self) :
x = worker()
print x.dosomething(dialogid=5)
class worker() :
def dosomething(self, dialogid) :
result = dialogid+10
return result
def main() :
dlg = dialog()
dlg.maindialog()
Nevertheless: These are totally basic Python concepts. If you struggle with these already, you should perhaps take a Python tutorial and familiarize yourself with Python and OOP concepts. I don't know whether you have any programming knowledge in some other language, but here is a tutorial that may be of help:
http://www.bogotobogo.com/python/python_introduction.php
(There are tons of others on the web...)
"Winging it" will probably not do you any good if you need to ask for every little bit of information; this would make for a very frustrating experience.