Create Mograph Effectors



  • On 09/04/2014 at 08:52, xxxxxxxx wrote:

    Hello everyone,

    I'm trying to create a Mograph Effector in python, I'm looking in all of the usual places which have descriptions such as Ocube etc but cannot find anything for the effectors. Can anyone point me in the right direction?

    Thanks

    Adam



  • On 11/04/2014 at 04:43, xxxxxxxx wrote:

    Oh well, - if anyone does know where the object definitions are for this then let me know. For now I'll continue to just create by ID number.

    Thanks,

    Adam



  • On 11/04/2014 at 06:58, xxxxxxxx wrote:

    Its not clear to me what you are asking for. Is it the description IDs of the parameters on the
    Python Effector object? Just drag them into the Script Manager or Command Line and you'll
    see them.

    Best,
    -Niklas



  • On 11/04/2014 at 08:16, xxxxxxxx wrote:

    Hi Niklas, thanks for your response.

    I see why my previous post is ambiguous, maybe a little more info is necessary.

    I am working on a sort of pseudo plugin (just an object in the OM at the moment - but with plugin aspirations) which dynamically creates and removes Mograph Effectors(Any of the presets, not really pythonEffector) and references them to chosen Generators. The created effectors have animation calculated by parameters - avoiding the use of keyframes.

    So, getting attributes is fine, I drag them in to the Script Manager as you say or for some slightly more tricky things I dig it out of the appropriate c++ header file.

    The problem I have is more aesthetic than anything else, for example:

    if I want to create a cube I define it as such:

    cube = c4d.Ocube

    if I want to create a PlainEffector I type:

    plain = c4d.BaseObject(1021337)

    All I was wondering was if there was something closer to the "Ocube" method as opposed to the "longIDnumber" one.

    I only ask as I'm trying to be a bit more disciplined with my coding as it's starting to influence my projects on a much bigger scale than it used to and I'm trying to keep it neat.

    Thanks

    Adam



  • On 11/04/2014 at 09:36, xxxxxxxx wrote:

    Hi Adam,

    thank you for clarifying your question. Unfortunately, some IDs have not respective name in the
    Cinema 4D module (for instance most of the MoGraph module). You'll have to use the long ID
    number. It's good habit to first define it globally, like

    Oplaineffector = 1021337
      
    # ...
      
    plain = c4d.BaseObject(Oplaineffector)
    

    Best,
    -Niklas



  • On 14/04/2014 at 04:49, xxxxxxxx wrote:

    Thanks!

    Adam


Log in to reply