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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    UserData field problem

    Scheduled Pinned Locked Moved PYTHON Development
    7 Posts 0 Posters 852 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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 28/09/2011 at 14:53, xxxxxxxx wrote:

      Hi,

      I'm using a UserData field on a null to store a directory path.

      To cut a long story short, this feeds into a python script that sets what directory images are rendered to.

      When I use 'Save Project' (to save for NET Rendering) an error pops up 'Unable to find bitmap 'PATH/TO/FILE/' (material '[Null]')'

      C4D basically thinks this path I've used is a path for textures, which it is not.

      I noticed there is even a 'TEXTURE' checkbox for the UserData field (which is unchecked)

      Surely this must be a bug?

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 29/09/2011 at 00:51, xxxxxxxx wrote:

        Hi, of what type is the userdata entry?

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

          THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

          On 12/10/2011 at 05:23, xxxxxxxx wrote:

          userdata is of type filename- and the 'directory' radio button is selected

          thanks

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

            THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

            On 12/10/2011 at 05:54, xxxxxxxx wrote:

            May you post your scene file ?

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

              THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

              On 12/10/2011 at 07:11, xxxxxxxx wrote:

              heres the file

              http://marcuschaloner.com/c4d/render_path.c4d

              thanks

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

                THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                On 12/10/2011 at 10:05, xxxxxxxx wrote:

                Hm, I can't really replicate the error, I don't have TurbulenceFD installed. And fixing the paths (see below) renders fine (even everything is black because of missing TFD haha), however, not in NET Render (dont have it)

                On what operating system are you ?
                Maybe it is because of your pathnaming. It doesn't work on Windows here.
                Do always use the os.path module for path operations.
                (And why did you add "./" to the beginning of each path ?)

                from os.path import join, abspath  
                dirPath = abspath(join(op[c4d.ID_USERDATA,2], todaysDate))
                
                1 Reply Last reply Reply Quote 0
                • H Offline
                  Helper
                  last edited by

                  THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

                  On 13/10/2011 at 07:32, xxxxxxxx wrote:

                  The python script is fine, that's not what is causing the problem.

                  The UserData field on the Null stores a directory location. That is passed to the python script which creates a new folder with todays date - all works fine.

                  The problem is when you select File > Save Project

                  and error pops up saying 'unable to find material at PATH/ETC...etc'

                  C4D thinks the UserData field is a path to a texture (which it isn't) the TEXTURE radio field is unchecked - so surely this shouldn't happen?

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