I understand retrieving world space has been discussed before like in this thread (https://plugincafe.maxon.net/topic/11586/get-deformed-points-from-skin-deformer)
Sorry for asking the questions, but I can't seem to set the Vector Y of the points to 0 (in world space). Basically, I'm mimicking the "Set Point Value" command.
You can see an illustration of the problem here:
For the illustration file, you can check it here:
The code used is as follow:
import c4d def set_Y_vector(obj, value): oldPoints = obj.GetAllPoints() obj_mat = obj.GetMg() inv_obj_mat = ~obj_mat # Not used newLocalPoints = [c4d.Vector(p, p*value, p) for p in oldPoints] # The zero Y value in newLocalPoints is in local space. So I'm trying to convert it on global space below newWorldPoints = [p * obj_mat for p in newLocalPoints] obj.SetAllPoints(newWorldPoints) obj.Message (c4d.MSG_UPDATE) c4d.EventAdd() set_Y_vector(op, 0)
Is there a way around this?
Thank you for looking at the problem.