@s_bach thank you for your answer! I think I have the same question as mike do, so it has been solved now. Thank you again!

eZioPan
@eZioPan
Posts made by eZioPan
-
RE: How to get spline offset by spline point index ?
-
RE: [XPresso] How to add numeric data from an In-/Exclusion Userdata?
Hi, @m_adam
Thank you for your kindness and the inspiring answer! It's a GREAT Christmas present for me!
So sorry asking
XPresso
related questions in this forum.
The problem I faced is a little bit complex than this: I need sampleEffector
s' totalOutput Strength
s in the position from aPolygon Object
'sPoint
s, and store the result into aVertex Color Map
attached for further use.
This problem bothers me for months, and I didn't find any clue until your post. I have never think about usingPython Node
withglobal variable
inXPresso Network
can keep the data as I need and do the magic!From the bottom of my heart, I want to say THANK YOU.
The answer you give not only solve this problem, but also inspire me re-thinking ofObjectList Node
andPython Node
, and how these nodes executed in anXPresso Network
.Just let me THANK YOU AGAIN!
Best wishes for you to have a wonderful holiday!
-
[XPresso] How to add numeric data from an In-/Exclusion Userdata?
Hi,
I have a
Null Object
with anIn-/Exclusion Userdata
attached. InIn-/Exclusion Userdata
someMograph Effector
have been added. I want to useSample Node
to get allStrength
ofMograph Effector
, then add outputStrength
together. How can I do?Here is the snapshot of the scene.
The problem I meet is that I can't use
Python
to sample the output of aMograph Effector
(Sample Node With Python), and I haven't found a way to cumulate output of anObject List Node
.Thanks!
-
RE: How to get spline offset by spline point index ?
Hi @r_gigante,
Thank you for replying. I'd like to know more about this topic: if I only know theControl Point Index
fromPointObject.GetPoint(id)
of a spline, how could I get theSpline Position
of this point? -
RE: Sampling the falloff of a mograph effector? (python/R19)
Hi, here is a thread from the old forum: Sample Node With Python.
I don't know if there will be any solution for now. -
RE: n-gones with python
hi @passion3d,
There is no actual n-gon in the underlying layer of Cinema 4D.
Adjacent polygons usehidden edge
to create n-gon-like shape(s).Following code creates a 5-side polygon object:
import c4d, math from c4d import utils #Welcome to the world of Python def main(): pointCount = 5 polygonCount = math.ceil(pointCount/4.0) # caculate minimum needed polygon number polyObj = c4d.BaseObject(c4d.Opolygon) # create an empty polygon object polyObj.ResizeObject(pcnt=pointCount, vcnt=polygonCount) # resize object to have 5 points, 2 polygons # manually set all point position polyObj.SetPoint(id=0, pos=c4d.Vector(200,0,-200)) polyObj.SetPoint(id=1, pos=c4d.Vector(-200,0,-200)) polyObj.SetPoint(id=2, pos=c4d.Vector(-200,0,200)) polyObj.SetPoint(id=3, pos=c4d.Vector(200,0,200)) polyObj.SetPoint(id=4, pos=c4d.Vector(300,0,0)) # associate points into polygons polygon0 = c4d.CPolygon(t_a=0, t_b=1, t_c=2, t_d=3) polygon1 = c4d.CPolygon(t_a=0, t_b=3, t_c=4) # set polygon in polygon object polyObj.SetPolygon(id=0, polygon=polygon0) polyObj.SetPolygon(id=1, polygon=polygon1) # set hidden edge nbr = utils.Neighbor() nbr.Init(op=polyObj, bs=None) # create Neighor counting all polygon in edge = c4d.BaseSelect() edge.Select(num=3) # set selection, which is the id of the edge to be hidden polyObj.SetSelectedEdges(e=nbr, pSel=edge, ltype=c4d.EDGESELECTIONTYPE_HIDDEN) # hide the edge polyObj.Message(c4d.MSG_UPDATE) doc.InsertObject(polyObj) c4d.EventAdd() if __name__=='__main__': main()
-
RE: Aligning a ray origin and direction towards a target by rotating a parent matrix
Hi @cmpxchg8b and @a_block ,
I don't know much about matrix, but here is what I found.
If thepoint with arrow
should rotate to aim, then all the possible position of the point must lay on thesphere surface
which sphere's center is the parent object.
And one point and a vector can form a line in space.
So the question becomes a line-sphere intersection problem.
After solving the equations, we can get 2 points:original point
andtransformed point(s)
.
After that, we can find the transform matrix between 2 points. -
RE: Pointcount from bevel deformer
btw, please read the How to Post Questions, Q&A New Functionality.
I think it's better to move this question into Cinema 4D Development category ;) -
RE: Pointcount from bevel deformer
Hi @bonsak,
Try useop.GetObject().GetDeformCache().GetPointCount()
in aPython Tag
on thePolygon Object
.
Here you can get more information: GetDeformCache(). -
RE: Miscellaneous questions about "BaseContainer","DescID" etc
@s_bach, thank you, I'll start to do some hard reading!