Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. JH23
    JH23

    JH23

    @JH23

    0
    Reputation
    27
    Posts
    13
    Profile views
    0
    Followers
    1
    Following
    Joined Last Online

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

    Best posts made by JH23

    This user hasn't posted anything yet.

    Latest posts made by JH23

    RE: Is it possible to change the mode of the Viewport without callcommands?

    Hello @ferdinand
    Thank you very much, I had no idea about that, I did know that Mpoints or Mpolygons existed, but it always related to me with ViewportSelect, this answers my question, I will investigate more about this.

    posted in Cinema 4D SDK •
    RE: Is it possible to change the mode of the Viewport without callcommands?

    Hello @ferdinand ,
    Thanks for the explanation, but in my case I meant this:
    ae8d5e77-639c-4352-a081-609a672165dd-image.png
    I need to make changes to these options, although it is true that they can be done by callcomands, I am interested in knowing if it is possible to avoid their use, I did some research, but didn't find much, I guess it's possible, and I probably didn't understand.
    still thank you very much for your contribution

    posted in Cinema 4D SDK •
    Is it possible to change the mode of the Viewport without callcommands?

    It required to make a change of the mode type of the Viewport, when doing it I wondered if there was any way to do the same function without using callcomands.
    Is it possible?

    posted in Cinema 4D SDK •
    RE: import presets and be reversible

    Hello @ferdinand,
    Thank you! His proposal was the best way to solve my problem.
    Greetings,
    JH23

    posted in Cinema 4D SDK •
    RE: import presets and be reversible

    To be honest, I don't even know what happens, the line of code that I put is all the code there is, even so, I admit that I could not explain myself well.
    I tried what you proposed and didn't see much of a difference, but trying a few things I solved my problem as follows

    Code before correcting

    import c4d
    from c4d import gui
    def main():
        c4d.documents.MergeDocument(doc,'preset://name',c4d.SCENEFILTER_MATERIALS | c4d.SCENEFILTER_OBJECTS))
    if __name__=='__main__':
        main()
    

    Corrected code

    import c4d
    from c4d import gui
    def main():
        doc.StartUndo()
        doc.AddUndo(c4d.UNDOTYPE_NEW, c4d.documents.MergeDocument(doc,'preset://name',c4d.SCENEFILTER_MATERIALS | c4d.SCENEFILTER_OBJECTS))
        doc.EndUndo()
        c4d.EventAdd()
    if __name__=='__main__':
        main()
    

    Even so, I would like to investigate your proposal and I really appreciate your help.

    posted in Cinema 4D SDK •
    import presets and be reversible

    I have been using commonly what is

    c4d.documents.MergeDocument(doc,'preset://direction',c4d.SCENEFILTER_OBJECTS | c4d.SCENEFILTER_MATERIALS)
    

    that does not present errors when reversing its action, but an error that I realized is that if I try to return to when I had the preset (for this the preset had texture) it doesn't load its texture or if it does load I had to go back several times, does anyone know why this happens?

    posted in Cinema 4D SDK •
    RE: preset children of objects?

    Hi
    Thank you for solving my question, and thank you very much also for the advice.

    posted in Cinema 4D SDK •
    RE: preset children of objects?

    @m_magalhaes

    Hi

    in itself the problem is that when performing the complete action when going back the object is outside the father, since it was first created and later placed inside the father

    import c4d
    from c4d import documents, plugins
    
    def main():
        c4d.documents.MergeDocument(doc,"file location",7) #the preset has already been added
        doc.StartUndo()
        child = doc.GetActiveObjects(c4d.GETACTIVEOBJECTFLAGS_NONE)
        for A in child:
            doc.AddUndo(c4d.UNDOTYPE_CHANGE, A)
            A.InsertUnder(father)#the parent would be defined by a link
        doc.EndUndo()
        c4d.EventAdd()
    

    I did this since when adding the preset it is already selected, use this to place it inside another object

    posted in Cinema 4D SDK •
    preset children of objects?

    Hi
    I have been working on a userdata button that places a preset in the environment, I also wanted to put it inside the end of a joint, my problem is that when performing these steps, when going back the preset is outside the joint, the code generates the preset and then place it inside the board, is there a way to do it directly?

    posted in Cinema 4D SDK •
    RE: create a material with a set texture?

    Hi.
    Oh I understand, thanks for your answer, it has helped me a lot.

    posted in General Talk •