Thank you, @s_bach I have enough here to figure out what I need to do. Cheers!
Posts made by glasses
-
RE: Trim a bitmap
-
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.
-
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.
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:
-
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)
-
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! -
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.
-
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.
-
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. -
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.
-
RE: Updating ObjectData plugin only on timeline change
Fantastic, Thank you for the suggestions, ObjectDataOptimizeCache(true) does what I need.
-
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.