Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Getting access to vray tag settings

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 285 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      On 22/07/2015 at 10:22, xxxxxxxx wrote:

      Hi everyone,

      I am trying to change settings in a vray light tag via python. It is working so far, except of one thing. Each time I am running the script it is changing the settings and then directly switching back into it's default settings. Does anyone know, what the problem might be?

      I wrote the following script:

      import c4d
      from c4d import documents, plugins
      #Welcome to the world of Python

      def main() :
          def tool() :
              return plugins.FindPlugin(doc.GetAction(), c4d.PLUGINTYPE_TOOL)

      def object() :
              return doc.GetActiveObject()

      def tag() :
              return doc.GetActiveTag()

      def renderdata() :
              return doc.GetActiveRenderData()

      def prefs(id) :
              return plugins.FindPlugin(id, c4d.PLUGINTYPE_PREFS)

      c4d.CallCommand(600000106, 600000106) # Flächen-Lichtquelle
          c4d.CallCommand(100004788, 50071) # Neues Tag
          tag()[c4d.VRAYLIGHTTAG_COMMON_SHDON]=True

      if __name__=='__main__':
          main()
          c4d.EventAdd()

      Have a nice evening and thanks a lot

      Anna

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 23/07/2015 at 05:36, xxxxxxxx wrote:

        Hi Anna,

        welcome to the Plugin Café forums 🙂
        As far as I can see, your code looks fine (from a Cinema 4D point of view). So I guess, there must be something different with V-Ray. Unfortunately the MAXON SDK Support team has no information about V-Ray implementation, so I see two options. Either you ask the VRAYforC4D guys (LAUBlab) directly or somebody in our community can help out.

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          On 23/07/2015 at 05:49, xxxxxxxx wrote:

          Hey,

          thanks a lot.

          Yes that might be the problem. It seems like, that if I am switching the shadow on in the cinema light settings, the vray tag is taking over it's settings. Maybe there is a collision, if something can be changed at to different places at the programm? Just an idea. Don't know if I am right or if it is true. Just a suggestion.

          Someone answered me as well on the other forum. I wasn't ment to start a double thread. So I am really sorry, that it turned out this way. But I wrote here as well, as someone pointed out, that I might get help here.

          Currently I have a running script, the only thing is, that if I am opening Cinema 4D fresh, it is not creating the vray tag, only if I have been creating one by myself before hand. Than it works perfectly. That's a very strange thing.

          But I will ask the Vray Guys, if they have an idea. Maybe they can help me 🙂

          1 Reply Last reply Reply Quote 0
          • First post
            Last post