Navigation

    • Register
    • Login
    • Search
    1. Home
    2. glasses
    3. Posts
    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    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 •
    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 •
    RE: Creating shaders from PSD files

    Here is a thread having similar issues. https://plugincafe.maxon.net/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 •
    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 •
    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 •
    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 •
    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 •
    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 •
    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 •
    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 •
    Updating ObjectData plugin only on timeline change

    At the moment my objectData plugin uses GetVirtualObjects() to update. It is calling a lot of my code multiple times even when I move the view. I'm fairly new to all this but I want to find a more efficient way to update my plugin. I only want it to update when the timeline changes forward or backward a frame in the timeline. How would I do this?
    Cheers mates for any thoughts here.

    posted in Cinema 4D SDK •