Navigation

    • Register
    • Login
    • Search
    1. Home
    2. chuanzhen
    3. Posts
    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    Posts made by chuanzhen

    RE: 2024 c4d python doc link error

    @ferdinand Great job!👍

    posted in Cinema 4D SDK •
    2024 c4d python doc link error

    Hi,
    online and offline 2024 c4d python doc link error, not find file
    0ba012b1-0e2e-453a-8370-fad6b0fcda06-image.png

    posted in Cinema 4D SDK •
    RE: c4d 2024 "MENURESOURCE_SEPERATOR"

    @ferdinand Thanks,hope to fix spelling in c4dpython doc in future versions

    posted in Cinema 4D SDK •
    RE: How to get OutLine of Polygon object

    @fwilleke80 Thanks

    posted in General Talk •
    RE: c4d 2024 "MENURESOURCE_SEPERATOR"

    @Dunhou Thanks!

    posted in Cinema 4D SDK •
    c4d 2024 "MENURESOURCE_SEPERATOR"

    Hi,
    Previously, my plugin worked normally in 2023, but in 2024, the console prompted:
    5fd03555-f7de-4441-b349-4da688635ee0-image.png
    but,there have been no changes in the sample code for this section in the Python doc for 2024
    7064842a-d900-4692-b649-ec51f5134443-image.png
    I can only replace it with the number 2. “ menu.InsData(2, True) ”.Has there been any change in 2024?

    posted in Cinema 4D SDK •
    RE: How to get OutLine of Polygon object

    @ferdinand Thanks for your detailed reply, it is helpful!

    posted in General Talk •
    How to get OutLine of Polygon object

    Hi,
    How to get the Outlines of polygon objects, just like in the image.
    e58b0cb4-7c46-47c1-aa39-3632a97537aa-image.png
    Thanks for any help!

    posted in General Talk •
    RE: DescID() python doc issue

    @i_mazlov Thanks:+1:

    posted in Cinema 4D SDK •
    RE: Cursor in gui element Show different text info

    @ferdinand The code works very well :+1:

    posted in Cinema 4D SDK •
    RE: Cursor in gui element Show different text info

    @ferdinand When I change the size of the dialog, the code will have problems in this area.

    b6bd6782-39d2-4664-8945-7dd22c788cdf-image.png

    Modifying this part of the code ensures that even if the dialog size changes, there will be no issues

    if self.CheckDropArea(gid, msg, True, True):
        result.SetId(c4d.BFM_GETCURSORINFO)
        result.SetString(c4d.RESULT_BUBBLEHELP, bubbleMsg)
        break
    
    
    posted in Cinema 4D SDK •
    RE: Cursor in gui element Show different text info

    @ferdinand Thank you for your detailed reply!

    posted in Cinema 4D SDK •
    RE: Cursor in gui element Show different text info

    @ferdinand Your code works well, but I have another question to ask, why does open dialog in main() result in this effect(failed to create layout)

    5e688a7c-7b15-45ed-97a1-b998399971e6-image.png

    posted in Cinema 4D SDK •
    RE: Cursor in gui element Show different text info

    @ferdinand Thank you, this is exactly the effect I want because I couldn't find a method (GetDragPosition() and CheckDropArea()) to query whether the mouse position is on a gui element.

    posted in Cinema 4D SDK •
    Cursor in gui element Show different text info

    Hi,
    i want to show text something when cursor in gui element.

    But I can only display some text when the mouse is stopped, I hope different GUI elements display different text. (For example, if there are different buttons in a window, when the mouse is stopped, the information of the current button will be displayed.)

    BitmapButtonCustomimGui can achieve this effect. How can button gui achieve this effect?

    example dialog:
    babe793e-f1eb-4eca-86ea-4c77e14a2d9e-image.png

    my code:

    def Message(self,msg,result):
        msg_id = msg.GetId()
        if msg_id == c4d.BFM_GETCURSORINFO:
            result.SetId(c4d.BFM_GETCURSORINFO)
            result.SetString(c4d.RESULT_BUBBLEHELP, "Show something")
            
        return c4d.gui.GeDialog.Message(self, msg, result)
    

    Thanks for any Help!

    posted in Cinema 4D SDK •
    DescID() python doc issue

    Hi,
    I tried to run the script using the code provided in the python document, but an error was reported.
    test.jpg
    9577843e-94be-4c54-a931-87cb39e22705-image.png

    posted in Cinema 4D SDK •
    RE: Get All Description of Object

    @ferdinand Thanks

    posted in Cinema 4D SDK •
    Get All Description of Object

    Hi,
    how to get position.x/y/z DescID of a vector
    i use this script to find Position DescID,but can‘t direct get position.x/y/z DescID,only indirectly create a new DescID to access Position. x/y/z.

    import c4d
    
    def main() -> None:
        description = op.GetDescription(c4d.DESCFLAGS_DESC_NONE)
        for bc, paramid, groupid in description:
            if paramid[0].dtype == c4d.DTYPE_VECTOR:
                for id in range(1000,1003):
                    paramid = c4d.DescID(paramid[0],c4d.DescLevel(id))
                    if op.FindKeyframeSelection(paramid):
                        print(paramid,op[paramid])
    
    
    if __name__ == '__main__':
        main()
    

    test.jpg

    Although the above script achieved its goal, it was not the expected method. Did I overlook something? I don't want to use the method of creating a new DescID.
    Thanks for any help!

    posted in Cinema 4D SDK •
    RE: 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 C

    file use Xpresso to calculate C Position
    test.c4d

    posted in Cinema 4D SDK •
    RE: Sliders in Python plugin

    @filipst example:

    REAL PYROUNDRECT_HEIGHT { UNIT METER; MIN 0.0; CUSTOMGUI REALSLIDER;}
    

    50f1b826-6663-4e81-91c7-796588ba56b3-image.png

    posted in Cinema 4D SDK •