Jump to content

Hermenator

Regular Member
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

3 Noble Beginner

Profile Information

  • First Name
    Hermen
  • Last Name
    Bijleveld
  • C4D Version
    18 Prime
  • Location
    Delft, Netherlands
  1. What's in it for Prime? The whole month of August I have been getting excited about the volume modeling (VDB), until I opened R20: No VDB in Prime. Isn't Prime supposed to be for modeling? Why then leave out the 'Volume Modeling'? Don't get me wrong, I am excited about most of the new stuff. It's just not in Prime. When I expectantly opened up my new R20 Prime I found, well, nothing new, really :(except for the node system, which is probably great but not modeling) A tad disappointed Prime user...
  2. 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
×
×
  • Create New...