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
    • Login
    1. Maxon Developers Forum
    2. sydney_ko
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    sydney_ko

    @sydney_ko

    Tired Developer 😴

    0
    Reputation
    2
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Location No Where Age 1

    sydney_ko Unfollow Follow

    Latest posts made by sydney_ko

    • RE: Calling “Add” button in Multi Shader: doesn’t work!

      Yes, I know about not using multiple events. I was playing with that, I thought that's the reason the button was not being called

      Thank you @ferdinand

      posted in Cinema 4D SDK
      S
      sydney_ko
    • RE: Calling “Add” button in Multi Shader: doesn’t work!

      @ferdinand Thank you

      posted in Cinema 4D SDK
      S
      sydney_ko
    • RE: Calling “Add” button in Multi Shader: doesn’t work!

      Hi there, it throws no error. That’s the reason I don’t know what causes that! While I am using what Documentation says.

      def oc_floor_material (self):
              doc = c4d.documents.GetActiveDocument()
              oc_material = c4d.BaseMaterial(1029501)
              oc_material.SetName("Magic_Floor")
              oc_material[c4d.OCT_MATERIAL_TYPE] = 2516
              oc_multi_shader = c4d.BaseShader(1019397)
              oc_material[c4d.OCT_MATERIAL_DIFFUSE_LINK] = oc_multi_shader
              oc_material.InsertShader(oc_multi_shader)
              c4d.CallButton(oc_multi_shader, c4d.MGMULTISHADER_ADD)
      
              for index, file_path in enumerate(self.get_selected_filess()):
                  _, file_name = os.path.split(file_path)
                  file_name_lower = file_name.lower()
                  oc_base = c4d.BaseShader(1029508)
                  oc_correct = c4d.BaseShader(1029512)
                  oc_multi_shader [1050] = oc_base
                  oc_multi_shader [1051] = oc_base
                  oc_base[c4d.IMAGETEXTURE_FILE] = file_path
                  oc_base [c4d.ID_BASELIST_NAME] = "Color"
                  oc_base[1118] = 1
                  oc_material[c4d.OCT_MATERIAL_DIFFUSE_FLOAT] = 1
                  oc_multi_shader.InsertShader(oc_base)
                  c4d.EventAdd()
      
              doc.InsertMaterial(oc_material)
      

      edit (@ferdinand): Please use forum markup to embed code. See forum-features for details. Please also follow our support-procedures. Please also consolidate your postings. I have fixed your posting.

      @sydney_ko said:

      MoGraph Multi Shader belongs to C4D. To increase the number of inputs, I must click on add button. But it doesn’t do anything with my code

      posted in Cinema 4D SDK
      S
      sydney_ko
    • Calling “Add” button in Multi Shader: doesn’t work!

      Guys, has anyone tried to call the add button of MoGraph multi shader?

      I used c4d.CallButton (oc_multi, C4D.MGMULTISHADER_Add) but it keeps failing

      posted in Cinema 4D SDK r25 python 2024
      S
      sydney_ko
    • how to limit the type of files we can import?

      hello,

      I'm new here. I'm trying to create an import button to import only tiff files. but it still shows all types of files when the file browser gets opened. any help? Is there a thing to import multiple files?

      c4d.storage.LoadDialog(c4d.FILESELECTTYPE_IMAGES, "Select Images", c4d.FILESELECT_LOAD, force_suffix=["tiff"])
      
      posted in Cinema 4D SDK python 2024
      S
      sydney_ko