I've coded in C#/C++ since both those respective languages started but haven't programmed much in Python though I don't think that's a serious problem. I'm trying to find the sample positions local to the field object in the Sample routine for a Python field. The sample code provided when you create a python field varies based on time and is totally agnostic on positions so doesn't really offer any insight. It appears to me that the values in the Sample function's inputs parameter for inputs._position are all global positions. I thought that I'd be able to multiply them by inputs._transform but that seems to always be an identity matrix no matter whether I move the object I'm dealing with or the field so I guess I must really not understand it's purpose. It says in the documentation "The transform matrix for the points in the input block. Use to bring the position and direction lists into world space or the local space of a FieldObject." but I don't see how this happens if it stays as an identity matrix. I'm enclosing a file which has what I'm working on. It has a sphere with a red material applied to a face selection set determined by the Python field. The code in the field just specifies 1 if the input point has a z value < 0 and 0 otherwise. This always colors red based on the world origin showing that the inputs are world coordinates. I have printed out inputs._transform to verify it's the identity matrix. I can't seem to find any examples of a Python Field anywhere on the internet except the default one produced initially which, as noted above, is no help. Can somebody help me out here? Thanks in advance!
Darrell Plank