Hi Eterea,
For starters, 'CallCommand' is just 'c4d.CallCommand' in Python. You can access the Script Log in c4d from Script > Script Log. An empty script log appears, which records all actions that you do in the user interface. This will get you going with all the 'CallCommand' scripts that you have. There is a simple structure that every script obeys:
It starts with a number of import statements, at least one: import c4d,
then your main function, in which you do everything you want (your CallCommand(...) goes here)
and finally the 'if __name__ == "__main__:' block, which calls the main function if the script is executed
For the more complicated ones, you may want to browse the Python SDK. Oftentimes, the python function that you're looking for has the same name as the coffee script one. But to simplify things, some variables are already available without you assigning them. Examples are:
doc: the currently active document
op: the currently selected object (or NONE if nothing is selected)
So, in Python your second script would go like:
import c4d
def main():
# toggle Hypernurbs visibility
bd = doc.GetActiveBaseDraw()
bd[c4d.BASEDRAW_DISPLAYFILTER_HYPERNURBS] = not bd[c4d.BASEDRAW_DISPLAYFILTER_HYPERNURBS]
bd.Message(c4d.MSG_CHANGE)
c4d.EventAdd()
if __name__=='__main__':
main()
Actually, there's an example in the python SDK for this function here, but the above example is even shorter. Please note that in python all CONSTANTS are preceded by "c4d."
Hope this helps,
Kind regards,
Hermen