Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Register
    • Register
    • Login
    1. Maxon Developers Forum
    2. visualride
    V
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 7
    • Best 0
    • Controversial 0
    • Groups 0

    visualride

    @visualride

    0
    Reputation
    62
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    visualride Unfollow Follow

    Latest posts made by visualride

    • Check if a texture is missing

      This is just a basic question that I haven't found an answer for after searching here for "missing texture".

      Is there a way to find out if a material cannot find one of it's assigned textures?

      I'm writing a script that will remove these materials if a missing texture is found.

      posted in Cinema 4D SDK python 2024 macos
      V
      visualride
    • RE: How to change bitmap in layered shader?

      Perfect! Thank you so much!

      posted in Cinema 4D SDK
      V
      visualride
    • How to change bitmap in layered shader?

      I'm writing a plugin to change the bitmaps within layered shaders. I've found here some great examples on how to change parameters in LayerShaderLayer but have yet to figure out exactly how to change and update a bitmap in the layered shader.

      Here's my latest attempt. I know that I probably don't have to update all elements, but to be sure, I updated a few.

      mat = doc.GetFirstMaterial()
          shd = mat.GetFirstShader()
          if shd.GetName() == "Layer":
              layShd = mat[c4d.MATERIAL_COLOR_SHADER]
              layShdFirst = layShd.GetFirstLayer()
              print layShdFirst.GetParameter(c4d.LAYER_S_PARAM_SHADER_LINK)
              theBitmap = c4d.BaseList2D(c4d.Xbitmap)  #create a bitmap baseshader
              theBitmap[c4d.BITMAPSHADER_FILENAME] = "/Woven_Black_Carpet_Flat.jpg"
              theBitmap.InsertUnder(layShd)
              #layShdFirst.SetParameter(c4d.LAYER_S_PARAM_ALL_ACTIVE, True)
              
              #print layShdFirst.GetBitmap()
              layShdFirst.SetParameter(c4d.LAYER_S_PARAM_SHADER_LINK, theBitmap)
              layShd.Message(c4d.MSG_UPDATE)#update
              shd.Message(c4d.MSG_UPDATE)#update
              mat.Update(True, True)
              print layShdFirst.GetParameter(c4d.LAYER_S_PARAM_SHADER_LINK)
      
      posted in Cinema 4D SDK python r19
      V
      visualride
    • RE: How to close a dialog box by event

      That should work. Thanks for the clarification and pointer to the example!

      posted in Cinema 4D SDK
      V
      visualride
    • How to close a dialog box by event

      I want to display what the document name that I am currently processing with my plugin. Can I use a gui.MessageDialog, or is there a better way? If I do use a gui.MessageDialog, how do I close it automatically when I move on to process the next document?

      posted in Cinema 4D SDK python
      V
      visualride
    • RE: How to cancel FileLoad error message.

      Thanks for the reply! I'll try that, though I thought that SCENEFILTER_IGNOREXREFS would keep xrefs from being loaded, and since my plugin edits the xref path/name, this would not work. But then again, perhaps I assumed wrong. I appreciate the help! By the way, the idea of classification by tags appears to be a good way to escape the messy folding out tree of classification system that we are all used to. I'll use it next time.

      posted in Cinema 4D SDK
      V
      visualride
    • How to cancel FileLoad error message.

      I have a plugin that I need to use c4d.documents.LoadFile(). I get a pop up question if I load a file with a New XRef that is missing a reference, asking a Yes or No question. Can I answer yes or no in code, or cancel the load if I get an error? I tried using c4d.documents.LoadDocument() but this is causing another xref issue. My Legacy XRefs aren't always keeping their options set and often times all display and on/off options (under the XRef O tab) all turn on. The plugin replaces text in an xref path/filename.

      posted in Cinema 4D SDK
      V
      visualride