Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Maxon Cinema 4D Python / xpresso question

  • Python / xpresso question

    Posted by Kenny Mcandrew on February 25, 2012 at 10:39 pm

    Hello,

    I’ve built a rotating carousel style menu in Cinema 4D which works well. I’m stuck on how to dynamically add menu items onto the ‘panels’ I’ve created. Ideally I would like to have either a set of textures or objects which could be added to the menu panels as required. Is there a way to do this?

    Thanks,

    Kenny

    Kenny Mcandrew replied 14 years, 2 months ago 2 Members · 2 Replies
  • 2 Replies
  • Greg Burrus

    February 27, 2012 at 12:17 pm

    It sounds like you need to use an iterator node in xpresso, like the objectlist to add items you put in a list and then iterate through them and apply them to you items. That would be one way for objects.

    As for textures the quick way would be using a multi shader somehow on your dynamic objects. That way you could just load them and apply them all at once to your menu items. You can pull the items through the multi shader through xpresso too but I haven’t found a easy way to do it with all the shaders at once yet.

    I’m sure there’s a way to do it through python but I only know tiny bit right now. If your interested in learning more check out the links below.

    https://chicagoc4d.com/C4DPythonSDK/
    https://cgrebel.com/2011/01/p4d101-starting/
    https://docs.python.org/release/3.1.3/
    https://www.maxon.net/index.php?id=157&L=0

    https://mogra.g2bproductions.com/ – Blog
    https://g2bproductions.com/ – Portfolio

  • Kenny Mcandrew

    February 27, 2012 at 1:29 pm

    Thanks Greg, I’ll see if the ObjectList node can do this, I haven’t used that one yet. Thanks also for the links.

    My Python node is set up so that it can output a number from 1 to 12(representing the object I need to target), I’m still a bit stuck on what syntax I can use to link this to an object elsewhere in the project.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy