Thank you.. It's Solved.
@fwilleke80 @ferdinand and @kbar
def PluginMessage(_id, data):
if _id == c4d.C4DPL_PROGRAM_STARTED:
Thank you.. It's Solved.
@fwilleke80 @ferdinand and @kbar
def PluginMessage(_id, data):
if _id == c4d.C4DPL_PROGRAM_STARTED:
@ferdinand, Is it possible to VertexColor, WeightMap(character rig) in the same way?
Some games use VertexColor, so marking can always be useful.
I tried to convert your code to VertexColor, but I lack knowledge. Please help us.
Added one more for... zip to remove the invisible points.
@i_mazlov said in hud depth buffer?:
As a workaround you might consider only drawing HUDs for those points that are exposed to the editor camera.
Thanks for your answer. The code above is my limit.
would you give me a hint? thank you.
@i_mazlov
Here is code. Thank You.
def draw(bd: c4d.BaseDraw) -> bool:
obj=op.GetObject()
points = obj.GetAllPoints()
objMg = obj.GetMg()
newpointpos = []
for o in points:
newmg = objMg * o
newpointpos.append(newmg)
scrpos = []
for p in points:
newpos = bd.WS(p)
scrpos.append(newpos)
textval = []
for i, pos in enumerate(zip(newpointpos, scrpos)):
data = {"_txt":str(i), "_position":pos[1]}
textval.append(data)
bd.SetDepth(False)
bd.DrawMultipleHUDText(textval)
bd.SetDepth(True)
return True
What is the correct code "HUD depth buffer" in R19 and R2023?
As shown, in R2023 the HUD is not obscured by objects. (R19 is inverted)
Thank You.
bd.SetDepth(False)
bd.DrawMultipleHUDText(data)
bd.SetDepth(True)
@ferdinand
I am sorry for the confusion.
Display Tag - Visibility creates Opacity when rendering.
(without depending on the material-alpha channel)
I wanted to know if there is a function in Python that has the same effect as Display Tag - Visibility %. (not viewport)
Thank You.
Hello Dear Dev.
Is it possible to animate the transparency of an object in Python without using "Display Tag - Visibility"?
I searched in the SDK but couldn't see anything similar.
I'm looking for a way not to use Display Tag. Thank You.
@chuanzhen said in Calculate third point position aligned with two points(edge dir):
Here is one of the calculations:
In world coordinates, get ab vector and the length of bc vector
Then normalize the ab vector , then use the length of the bc vector to scale the length of the has normalized ab vector , use point b world position to offset the ab vector (that is, add the world position of the point b vector) to get the position of point Cfile use Xpresso to calculate C Position
test.c4d
Thanks for the quick reply.
How do I change this to run in the local coordinate system?
I'm not familiar with the matrix. Thank you.
ah... sorry forget it. remove * mg
There are three points. In the picture, I want to straighten the third point while keeping the edge length. What are the correct methods for vector and matrix arithmetic (Python/R2023)? Thank You.