THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/10/2011 at 09:59, xxxxxxxx wrote:
I'm attempting to port some existing Delaunay Triangulation code over to work in Cinema 4d. I'd like to preface this with that I'm not an experienced C4d user, and I'm doing this as part of a collab project with a friend. However I've many years of programming experience in a professional setting so I'm guessing my issue will be more on the C4d side of things.
I've basically setup a scene with a plane which has a single textureTag on it, which points to a material with a single colour shader on it. The texture for the colour shader is a bitmap. I am running the following code in a python generator to grab the plane and attempt to pull the bitmap off of it. However I'm getting None back for the bitmap.
from c4d import utils
def main() :
doc = c4d.documents.GetActiveDocument()
vidPlane = doc.SearchObject('vidPlane')
textureTag = vidPlane.GetTag(c4d.Ttexture)
material = textureTag.GetMaterial()
colShader = material[c4d.MATERIAL_COLOR_SHADER]
colBitmap = colShader.GetBitmap()
colBitmap == None
<c4d.BaseObject object called 'vidPlane/Plane' with ID 5168 at 0x000000000DFB41F0>
<c4d.TextureTag object called 'Texture/Texture' with ID 5616 at 0x000000000DFB41B0>
<c4d.BaseMaterial object called 'videoMaterial/Mat' with ID 5703 at 0x000000000DFB41D0>
<c4d.BaseShader object called 'Bitmap/Bitmap' with ID 5833 at 0x0000000012A3EAA8>
Usually at this point I'd check out the documentation, however it appears the documentation is rather lacking. On a side note if anyone knows where the source of this c4d namespace is would be incredibly handy) Is there anything obviously wrong with what I'm doing here?
I'm running in R13.