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

    Undo c4d.BASEDRAW_DATA_PICTURE ?

    Scheduled Pinned Locked Moved PYTHON Development
    1 Posts 0 Posters 158 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 02/07/2012 at 11:36, xxxxxxxx wrote:

      I'm trying to find out the way to be able to Undo
      a change of a filepath for the Background image.
      There are no problems anywhere else (for materials, objects using
      shaders etc). But when I use the same method as in a Material,
      no Undo is registered for the image path of the Background image, see below.

      Anyone have an idea?

      I've tried the different Undo Flags available with no success.
      OTOH, changing any parameter in the Viewport AM (Shift + V) manually
      doesn't register for an Undo either, so maybe this is not possible?

      Cheers
      Lennart

        
      doc.StartUndo()   
      bd      = doc.GetRenderBaseDraw()   
      abspath = bd[c4d.BASEDRAW_DATA_PICTURE]   
      if abspath == '':   
          print 'No Active BaseDraw Pict'   
          return   
             
      relpath = os.path.split(abspath)[1]   
      if relpath in globtex:   
          doc.AddUndo(c4d.UNDOTYPE_CHANGE_SMALL,bd)   
          bd[c4d.BASEDRAW_DATA_PICTURE] = relpath   
          print '[ BG Picture ]',relpath,' : Set to Relative Path'   
      else:   
          print '[ BG Picture ]',relpath,' : Is NOT in Global Texture Paths!'   
      doc.EndUndo()   
      
      1 Reply Last reply Reply Quote 0
      • First post
        Last post