Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. LingZA
    L

    LingZA

    @LingZA

    1
    Reputation
    8
    Posts
    2
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    LingZA Follow

    Best posts made by LingZA

    Is there a successful example of c4d.gui.SplineCustomGui?

    I need a simple and successful example of c4d.gui.SplineCustomGui which has same params as the picture below.
    d2946599-5784-4459-a8c4-53cf1a7d03f0-image.png

    I have tried directly code below. But it can not have the full control of c4d.gui.SplineCustomGui by bc[c4d.constant], and it is without the gui elements, such as "Point X", "Point Y" and so on.
    class Dialog(c4d.gui.GeDialog):

    def __init__(self):
    
        compoId = 1000
        i = 1
    
        compoId += i
        self.groId_0 = compoId
    
        compoId += i
        self.spliId_0 = compoId
    
    def CreateLayout(self):
        bc = c4d.BaseContainer()  
        # bc[c4d.SPLINECONTROL_GRID_H] = True
        # bc[c4d.SPLINECONTROL_GRID_V] = True
        # bc[c4d.SPLINECONTROL_VALUE_LABELS_H_LEGACY] = True
        # bc[c4d.SPLINECONTROL_VALUE_LABELS_V_LEGACY] = True
        bc[c4d.SPLINECONTROL_X_MIN] = 0
        bc[c4d.SPLINECONTROL_X_MAX] = 1
        # bc[c4d.SPLINECONTROL_X_STEPS] = 0.1
        bc[c4d.SPLINECONTROL_Y_MIN] = 0
        bc[c4d.SPLINECONTROL_Y_MAX] = 1
        # bc[c4d.SPLINECONTROL_Y_STEPS] = 0.1
        # bc[c4d.SPLINECONTROL_PRESET_BTN_LEGACY] = True
        # bc[c4d.SPLINECONTROL_ROUND_SLIDER_LEGACY] = True
        # bc[c4d.SPLINECONTROL_GRIDLINES_H_LEGACY] = 10
        # bc[c4d.SPLINECONTROL_GRIDLINES_V_LEGACY] = 10
        # bc[c4d.SPLINECONTROL_MINSIZE_H] = 0.1
        # bc[c4d.SPLINECONTROL_MINSIZE_V] = 0.1
        # bc[c4d.SPLINECONTROL_X_MIN_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_X_MAX_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_Y_MIN_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_Y_MAX_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_X_TEXT] = "Density"
        # bc[c4d.SPLINECONTROL_Y_TEXT] = "Vertex Weight"
        # bc[c4d.SPLINECONTROL_NEW_NO_HORIZ_LEGACY] = False
        # bc[c4d.SPLINECONTROL_NEW_NO_VERT_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_GRID_H_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_GRID_V_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_PRESET_BTN_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_ROUND_SLIDER_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_EDIT_H_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_EDIT_V_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_LABELS_H_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_LABELS_V_LEGACY] = False
        # bc[c4d.SPLINECONTROL_ALLOW_HORIZ_SCALE_MOVE] = True
        # bc[c4d.SPLINECONTROL_ALLOW_VERT_SCALE_MOVE] = True
        # bc[c4d.SPLINECONTROL_OPTIMAL] = True
        # bc[c4d.SPLINECONTROL_OPTIMAL_X_MIN] = 0.01
        # bc[c4d.SPLINECONTROL_OPTIMAL_Y_MIN] = 0.01
        # bc[c4d.SPLINECONTROL_OPTIMAL_X_MAX] = 0.01
        # bc[c4d.SPLINECONTROL_OPTIMAL_Y_MAX] = 0.01
        # bc[c4d.SPLINECONTROL_SQUARE] = False
        # bc[c4d.SPLINECONTROL_CUSTOMCOLOR_SET] = True
        # bc[c4d.SPLINECONTROL_CUSTOMCOLOR_COL] = c4d.Vector(1,1,1)
        bc[c4d.SPLINECONTROL_NO_FLOATING_WINDOW] = True
        # bc[c4d.SPLINECONTROL_NO_PRESETS] = False
    
        self.spli = self.AddCustomGui(self.spliId_0, c4d.CUSTOMGUI_SPLINE, "", c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, 0, 0, bc)
    
        return True
    

    The second way with description files, I also have tried
    https://plugincafe.maxon.net/topic/13499/splinecustomgui-settings-issue/10?_=1653814204664.
    But I failed.
    If it can have all params like the picture in the second way, I want a successful and simple example including its description files(.res and .h).

    posted in Cinema 4D SDK •

    Latest posts made by LingZA

    Is there a fixed Manager ID like c4d.CONSTANT?

    Does Manager ID change between different c4d versions such as R24, R25 and R26 If Manager ID is based on the options in "Restrict to" in Command Manager.

    744d299e-a173-4c7f-ad8f-34439451cc3e-image.png
    85956201-0980-4ff2-89d6-22ccac5c132b-image.png
    The Manager ID is explained here.
    https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d.gui/index.html#c4d.gui.AddShortcut.

    posted in Cinema 4D SDK •
    RE: Is there a successful example of c4d.gui.SplineCustomGui?

    @m_adam
    Thanks so much!
    You are a very professional guy!!!

    posted in Cinema 4D SDK •
    Is there a successful example of c4d.gui.SplineCustomGui?

    I need a simple and successful example of c4d.gui.SplineCustomGui which has same params as the picture below.
    d2946599-5784-4459-a8c4-53cf1a7d03f0-image.png

    I have tried directly code below. But it can not have the full control of c4d.gui.SplineCustomGui by bc[c4d.constant], and it is without the gui elements, such as "Point X", "Point Y" and so on.
    class Dialog(c4d.gui.GeDialog):

    def __init__(self):
    
        compoId = 1000
        i = 1
    
        compoId += i
        self.groId_0 = compoId
    
        compoId += i
        self.spliId_0 = compoId
    
    def CreateLayout(self):
        bc = c4d.BaseContainer()  
        # bc[c4d.SPLINECONTROL_GRID_H] = True
        # bc[c4d.SPLINECONTROL_GRID_V] = True
        # bc[c4d.SPLINECONTROL_VALUE_LABELS_H_LEGACY] = True
        # bc[c4d.SPLINECONTROL_VALUE_LABELS_V_LEGACY] = True
        bc[c4d.SPLINECONTROL_X_MIN] = 0
        bc[c4d.SPLINECONTROL_X_MAX] = 1
        # bc[c4d.SPLINECONTROL_X_STEPS] = 0.1
        bc[c4d.SPLINECONTROL_Y_MIN] = 0
        bc[c4d.SPLINECONTROL_Y_MAX] = 1
        # bc[c4d.SPLINECONTROL_Y_STEPS] = 0.1
        # bc[c4d.SPLINECONTROL_PRESET_BTN_LEGACY] = True
        # bc[c4d.SPLINECONTROL_ROUND_SLIDER_LEGACY] = True
        # bc[c4d.SPLINECONTROL_GRIDLINES_H_LEGACY] = 10
        # bc[c4d.SPLINECONTROL_GRIDLINES_V_LEGACY] = 10
        # bc[c4d.SPLINECONTROL_MINSIZE_H] = 0.1
        # bc[c4d.SPLINECONTROL_MINSIZE_V] = 0.1
        # bc[c4d.SPLINECONTROL_X_MIN_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_X_MAX_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_Y_MIN_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_Y_MAX_TEXT_LEGACY] = "True"
        # bc[c4d.SPLINECONTROL_X_TEXT] = "Density"
        # bc[c4d.SPLINECONTROL_Y_TEXT] = "Vertex Weight"
        # bc[c4d.SPLINECONTROL_NEW_NO_HORIZ_LEGACY] = False
        # bc[c4d.SPLINECONTROL_NEW_NO_VERT_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_GRID_H_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_GRID_V_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_PRESET_BTN_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_ROUND_SLIDER_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_EDIT_H_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_EDIT_V_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_LABELS_H_LEGACY] = False
        # bc[c4d.SPLINECONTROL_HIDE_VALUE_LABELS_V_LEGACY] = False
        # bc[c4d.SPLINECONTROL_ALLOW_HORIZ_SCALE_MOVE] = True
        # bc[c4d.SPLINECONTROL_ALLOW_VERT_SCALE_MOVE] = True
        # bc[c4d.SPLINECONTROL_OPTIMAL] = True
        # bc[c4d.SPLINECONTROL_OPTIMAL_X_MIN] = 0.01
        # bc[c4d.SPLINECONTROL_OPTIMAL_Y_MIN] = 0.01
        # bc[c4d.SPLINECONTROL_OPTIMAL_X_MAX] = 0.01
        # bc[c4d.SPLINECONTROL_OPTIMAL_Y_MAX] = 0.01
        # bc[c4d.SPLINECONTROL_SQUARE] = False
        # bc[c4d.SPLINECONTROL_CUSTOMCOLOR_SET] = True
        # bc[c4d.SPLINECONTROL_CUSTOMCOLOR_COL] = c4d.Vector(1,1,1)
        bc[c4d.SPLINECONTROL_NO_FLOATING_WINDOW] = True
        # bc[c4d.SPLINECONTROL_NO_PRESETS] = False
    
        self.spli = self.AddCustomGui(self.spliId_0, c4d.CUSTOMGUI_SPLINE, "", c4d.BFH_SCALEFIT|c4d.BFV_SCALEFIT, 0, 0, bc)
    
        return True
    

    The second way with description files, I also have tried
    https://plugincafe.maxon.net/topic/13499/splinecustomgui-settings-issue/10?_=1653814204664.
    But I failed.
    If it can have all params like the picture in the second way, I want a successful and simple example including its description files(.res and .h).

    posted in Cinema 4D SDK •
    How can I set a selection after I create a selection tag?

    edited by [ @ferdinand ]:

    How can I set the selection state the underlying c4d.BaseSelectof a c4d.SelectionTag?

    @LingZA said:

    For an exmaple like op.MakeTag(c4d.Tedgeselection).

    BaseSelect1.CopyTo(BaseSelect2)
    BaseSelect2 is of selection tag.

    posted in Cinema 4D SDK •
    RE: How can I create a tag which has same outputs as Vertex Map tag?

    @ferdinand Thank you so much!
    I am not professional in c++.

    I optimze my workflow with Density Map in ZRemesher in Remesh generator.
    ZRemesher uses vertex weights from the vertex map as density map after I put a vertex map into Density Map linkbox.

    Actually, I mean that I want to create a tag which contains the vertex weights, then vertex weights are used by ZRemesher after I put the tag into Density Map linkbox.
    So I don't need a "vertex map" indeed, but I need a tag I describe above.

    posted in Cinema 4D SDK •
    How can I create a tag which has same outputs as Vertex Map tag?

    I want to create a tag with the outputs(vertex weights) same as Vertex Map.
    I know I can generate Vertex Map directly, but I don't want do that.
    I want a simple example.
    Please!

    posted in Cinema 4D SDK •
    RE: How can get the visibility of the every point/edge/face?

    Thanks so much!!!

    Your answer makes me understand that PolygonObject.GetPolygonS(self) and PolygonObject.GetPolygonH(self) respectively represent selection states in a list from BaseSelect and visibility states in a list from BaseSelect.

    posted in Cinema 4D SDK •
    How can get the visibility of the every point/edge/face?

    How can get the visibility of the every point/edge/face in python api?

    posted in Cinema 4D SDK •