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. glasses
    G
    • Profile
    • Following 0
    • Followers 0
    • Topics 3
    • Posts 11
    • Best 0
    • Controversial 0
    • Groups 0

    glasses

    @glasses

    0
    Reputation
    26
    Profile views
    11
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    glasses Unfollow Follow

    Latest posts made by glasses

    • RE: Trim a bitmap

      Thank you, @s_bach I have enough here to figure out what I need to do. Cheers!

      posted in Cinema 4D SDK
      G
      glasses
    • RE: Creating shaders from PSD files

      You can use LayerSet.AddLayer('myPSD_LayerName') which will select the layer of the layerSet. It works, However, you can't retrieve the name of the PSD layers using LayerSet so I'm still stuck with the SendPainterCommand openGL bug and MultiPassBitmap not functioning with Python. 😕

      posted in Cinema 4D SDK
      G
      glasses
    • RE: Creating shaders from PSD files

      Here is a thread having similar issues. https://developers.maxon.net/forum/topic/3209/2592_parsing-psd-layers-in-multipassbitmap/11

      Looks like Pythons MultiPassBitmap class is not working at all for loading bitmaps from layered PSD files. I get a layer count of 0 and no other data from the PSD file. I can't write C++ so I think I'll have to live with the openGL bug.

      Screen Shot 2019-11-20 at 2.45.24 PM.png
      image above is editor view vs standard renderer picture view.

      I want to be able to just select these layers here somehow without using SendPainterCommand:
      Screen Shot 2019-11-20 at 8.15.30 PM.png

      posted in Cinema 4D SDK
      G
      glasses
    • RE: Creating shaders from PSD files

      Gah, this bug has me hung up too. I'll attempt to implement the external library approach. @yanmasterson @m_adam did you find a workaround that doesn't use an external library?

      Also, is there any other way to get the layers from a photoshop file other than using:

      c4d.modules.bodypaint.SendPainterCommand(c4d.PAINTER_LOADTEXTURE, doc=doc, tex=None, bc=bc)
      
      posted in Cinema 4D SDK
      G
      glasses
    • RE: Creating a 'Reload Image' button

      Ok, I was trying to call this from def main(): calling from def message(id, data):
      is working! Thank you for the help!

      posted in Cinema 4D SDK
      G
      glasses
    • RE: Creating a 'Reload Image' button

      Thank you @s_bach The button is working great. However I'm getting the following error for this line:

      c4d.CallButton(bitmapShader, c4d.BITMAPSHADER_RELOADIMAGE)
      

      RuntimeError: illegal operation, invalid cross-thread call

      Yikes, sounds serious. Maybe I need to stop the threads?

      To be more clear I am using a Texture path in my user data.

      Alternatively, there must there must be a way to empty the cache on the Texture Path and then load the image again.

      posted in Cinema 4D SDK
      G
      glasses
    • Creating a 'Reload Image' button

      I have a python Generator with a Texture path in its UserData.

      I place a photoshop file in my texture path and I want to reload the shader image every time I make a change to the photoshop file. How can I recreate the 'Reload Image...' button (see pic) to refresh the shader? Thanks mates for any thoughts.
      Screen Shot 2019-11-19 at 12.21.34 AM.png

      posted in Cinema 4D SDK
      G
      glasses
    • RE: ObjectData plugin not rendering to picture viewer

      I'm accessing the objects from an inExclude using.

      
      doc = c4d.documents.GetActiveDocument()
      inEx = op[res.MyInExcludeData]
      activeObj = inEx.ObjectFromIndex(doc, i)
      

      @fwilleke80 yes this was a python generator object that I've converted to a plugin. I'm still figuring out the basics here so sorry for the noob Q's.
      I tried to replace GetActiveDocument() with GetDocument() but I don't think I'm structuring my plugin properly. I can't seem to find any resources online to figure this one out.

      posted in Cinema 4D SDK
      G
      glasses
    • ObjectData plugin not rendering to picture viewer

      Ok, I have a simple object data plugin that takes a list of objects and rotates them along the timeline. It works perfectly in the editor view but won't update (looks stuck) in the picture viewer.
      In the editor my objects link fine but the console when rendering says my objects are returning NoneType.

      What am I missing here? Is the renderer not using my document or creating some kind of clone and not finding the objects?

      Cheers mates for any thought on this.

      posted in Cinema 4D SDK
      G
      glasses
    • RE: Updating ObjectData plugin only on timeline change

      Fantastic, Thank you for the suggestions, ObjectDataOptimizeCache(true) does what I need.

      posted in Cinema 4D SDK
      G
      glasses