ok! finally, it is imporant to use the doc to get the irs !
now it works.
irs = c4d.modules.render.InitRenderStruct(doc)
is this the only / best way to check if textures are missing?
an alternative would be to actually check if the file is existing somewhere in the given paths
I also just ran into this...
< R24 you dont have BaseList2D.IsNodeBased, but as a small hack you can do:
return True if op.GetType == c4d.Mmaterial and '[Node]' in op.GetBubbleHelp() else False
hi and thanks Maxime !
GetAllAssetsNew() is S22 only,
and I had problems with InitRender() and Vray Bitmaps
so I decided to manually check for the files...
I had it already, but GenerateTexturePath() shortens the code quite a bit, because I dont have to check all possible paths.
It seem GenerateTexturePath() returns the absolute path, if the file is found somewhere in the texture paths, otherwise it returns None.
needs some testing, but until now it seems to work well.
Just FYI ...
I just noticed, that a Quicktab Radio UserData change results in two Messages (with the same UserData ID)
If I change the interface to Cycle, I get only one Message as expected for an UserData change.
This might be a tiny miny Bug (?)
... by the way ...
Do I have to re-init c4d.utils.SplineLengthData or c4d.utils.SplineHelp
if I insert or change points in a Spline ?
I miss a bit clarity in the documentation. Stupid questions maybe,
but what is a LineObject, and what are Segments exactly?
is that documented somewhere?
The SDK says nothing about such things.
The Manual neither.
so GetPointIndex() is the only thing you can work with, I guess.
Already on it to create this sampling function ...
the only thing i can imagine is to sample the spline using splineHelp.GetPointIndex(), that would get you an initial offset range.
then you could start inserting points at certain offsets and refine the sampling down until a given offset range treshold is reached.
but thats quite complicated and slow as well, of course
maybe somebody with a better idea how to approach this?
Sorry to resurrect this old thread ...
As mentioned above GetSplinePointSegment() is not available in python
Is there no way at all to get to the (real)offset of a spline point with a given index ?
spline --> point index --> offset? (in python)
that's a roadmap !!
gosh, it looks like i have quite some work ahead of me!
dunno yet, if i'm crazy enough to give it a try :))
ps. that also means that the nearest intersection between
a point and an object without vector is not possible with GeRayCollider (?)
hm, i tried to make an example, but now it worked as expected.
I will post an example, if i run into that again
ps. no multiple segments
hm.. looking at c4d.utils.GeRayCollider ...
is it correct that i always have to define a ray vector ?
as i understand it GetNearestIntersection() is just the nearest intersection with the given vector, right?
is possible to eval the nearest intersection between a point and an object without vector?
or is that what KdTree is used for ?
I have this code below and get different results when using
SplineLengthData / GetLength or SplineHelp / GetSplineLength.
is there a know reason for this ?
sld = c4d.utils.SplineLengthData()
length = sld.GetLength()
# --> length = 114.149518217
sh = c4d.utils.SplineHelp()
length = sh.GetSplineLength()
# --> length = 0.0