lhit from BaseVolumeData
-
Hi,
I've been trying to understand what type of structure I would need to be able to access what lhit offers, although I know what a PyCobject is, I still don't understand what structure I should use, or what data it affords me, I reviewed the C++ documentation but ended up with more questions than answers, I work in python in a simple sahder, I really don't plan anything elaborate and at this point I'm just testing what information I can get to identify what will be useful to me, I would appreciate it if someone could help me with this problemimport ctypes import c4d PyCObject_AsVoidPtr = ctypes.pythonapi.PyCObject_AsVoidPtr PyCObject_AsVoidPtr.restype = ctypes.c_void_p PyCObject_AsVoidPtr.argtypes = [ctypes.py_object] def Message(sh, msg, data): return True def InitRender(sh, irs, customdata): return c4d.INITRENDERRESULT_OK def FreeRender(sh, customdata): pass once = True def Output(sh, cd, customdata): global once if not cd.vd: return c4d.Vector(0) pyco = cd.vd.lhit if not pyco: return c4d.Vector(0) if once: ptr = PyCObject_AsVoidPtr(pyco) print (ptr) once = False return c4d.Vector(0)
I experimented with the PyCObjects of the PolygonObjects and managed to obtain information from the indices. It is not useful to me, but I wanted to know first if it was possible, but I require prior knowledge of the information I hope to obtain. In this case, I feel blind, I would appreciate it if someone would light my way.
thanks in advance
JH