@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.
Posts made by ymoon
-
RE: Force VertexMap display
-
RE: hud depth buffer?
Added one more for... zip to remove the invisible points.
-
RE: hud depth buffer?
@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. -
RE: hud depth buffer?
@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
-
hud depth buffer?
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)
-
RE: Object Opacity Animation by Python Tag
@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. -
Object Opacity Animation by Python Tag
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. -
RE: Calculate third point position aligned with two points(edge dir)
@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.c4dThanks 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 -
Calculate third point position aligned with two points(edge dir)
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.
-
RE: Use the tab name and open the that window?
@ferdinand
There is no command to invoke the viewport window, so I was looking for an alternative. I will tagging the version in the next post. (R2023) Thank You. -
Use the tab name and open the that window?
Use the tab name, Open that window?
Can I use the tab name and open that window?
I want to switch the Viewports and Project Settings windows to Python.
Access to tabs in the SDK is rarely written.
Asking for help. Thank You. -
RE: Can I select only the edge of an inner hole?
@ferdinand
Yes I understood. -
Can I select only the edge of an inner hole?
Can I select only the edge of an inner hole?
I've tried modifying the conditions, but I haven't been able to get the results I want. Please help me.for i, pol in enumerate(polys) : eab = n.GetNeighbor(pol.a, pol.b, i) ebc = n.GetNeighbor(pol.b, pol.c, i) ecd = n.GetNeighbor(pol.c, pol.d, i) eda = n.GetNeighbor(pol.d, pol.a, i) cotes = n.GetPolyInfo(i)["edge"] if eab == -1 : bs.Select(cotes[0]) if ebc == -1 : bs.Select(cotes[1]) if ecd == -1 : if pol.c != pol.d: bs.Select(cotes[2]) if eda == -1 : bs.Select(cotes[3])
-
RE: Can get Point-Index under the mouse pointer? (Py)
The mouse position is obtained as follows.
msg[c4d.BFM_INPUT_X] --> GetEditorWindow() --> editor_x = win.Global2Local() --> mouse_x-abs(Editor_x)
The problem of overlapping selection in GetNearestPoint() was solved by making a list of selected object.
Thank you. -
Can get Point-Index under the mouse pointer? (Py)
Can get Point-Index under the mouse pointer? (Py)
I found a useful post.
But I'm a beginner so I'm asking for help. Thank you. -
RE: Can I get the index of the last selected point among the selected points?
@ferdinand
As expected, it's too difficult. And some of the code doesn't seem to work properly. Could you please upload the scene. thank you It has been resolved.