Navigation

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

    delizade

    @delizade

    Freelance UI Designer

    0
    Reputation
    23
    Posts
    41
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online
    Website behance.net/delizade

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

    Best posts made by delizade

    This user hasn't posted anything yet.

    Latest posts made by delizade

    How can I make a simple input form for my Python script?

    Hello,
    I'm new about Python and Cinema 4D scripting. I've done many part of my script but I could not achieve to make a simple form that will get

    1. 3 string values
    2. 2 check box values.
    3. a directory path (I need to get a target folder path)

    could anyone help me about making this form please?

    thank you

    posted in Cinema 4D SDK •
    RE: How can I get a Layer's objects with Python?

    Thank you so much for your time and help.

    posted in Cinema 4D SDK •
    How can I get a Layer's objects with Python?

    Hello,
    I have 450 takes. Every take activates only one layer (make editor and render visibility true) of the document. (Other layers are disabled by default)

    I want to modify objects that belongs to that layer which is activated by a take.

    After getting Layer, I need to get list of objects of that Layer by Python.

    Simply I want to make:
    after I activated a take I will execute a script. That script will make some modifications about objects and their materials. After that it will updates take overrides. To make those actions I need to find Active Take > Layer > Objects

    how can I make this? could anyone help me about this please?

    thank you

    posted in Cinema 4D SDK •
    Content Browser modifications via Python?

    Hi,
    I need some information about:

    1. save preview images or assign new preview images via Python
    2. How can I stop "render preview image" process in preset library? In the settings there is a check box "Render scene" but I guess it is not related to this. After I create previews for my materials by "Create Preview" if my texture library is not active and I open this preset library everything seems black. So I have to activate or add texture path in the preferences. But I really need them to browse without make any modification. SO I need to fix their preview images. Is it possible to do that via Python?

    thank you

    posted in General Talk •
    RE: How to make a GUI for getting user inputs for my python script?

    thank you @Cairyn @m_adam

    posted in General Talk •
    How to make a GUI for getting user inputs for my python script?

    Hello,
    I realized that I have 5 different "change name" scripts for special needs. I need an interface that I can get some inputs from that and use it in a single script. For example suffix text, prefix text, and some checkboxes in a single panel.

    how can I do that? As far as I learned there are some gui functions for only one input type like:

    inputString=gui.InputDialog()
    
    

    I need a panel that will contain different type of multiple inputs. Is it possible?

    posted in General Talk •
    A GetClone problem about takes

    GetClone creates a take from a source take but its overrides are linked to source take. if I remove overrides from cloned take, original take's overrides also deleted. Is this a bug or GetClone produces a kind of instance object with linking to source object? How can I fix this? How can I break them from the source take?

    1. open attached c4d doc
    2. select Sphere take
    3. run this script
    4. script will clone sphare take under main take. Newly cloned take have 2 overrides: 1) for X location and 2) for layer properties.
    5. activate newly cloned Sphere take
    6. activate AutoTake and Lock Override buttons
    7. change Sphere's X location and/or sphare layer visibility values
    8. you will see that c4d will add another override lines under already existent overrides
    import c4d
    # Script clones selected take to under Main Take
    
    # AliasTrans did not work
        #trans = c4d.AliasTrans()
        #if trans is None or trans.Init(doc) is False:
        #    return False
        #clonedTake=selectedTake[0].GetClone(c4d.COPYFLAGS_0)
        #trans.Translate(False)
    
    def main():
        takeData = doc.GetTakeData()
        mainTake=takeData.GetMainTake()
        selectedTake=takeData.GetTakeSelection(0)
        doc.StartUndo()
        doc.AddUndo(c4d.UNDOTYPE_CHANGE, mainTake)
    
        clonedTake=selectedTake[0].GetClone(c4d.COPYFLAGS_0)
        clonedTake.InsertUnder(mainTake)
        doc.EndUndo()
        c4d.EventAdd()    
        #gui.MessageDialog('Hello World!')
    
    # Execute main()
    if __name__=='__main__':
        main()
    

    test.c4d

    posted in General Talk •
    RE: A problem about getting an object width value with python

    @a_block I tried your suggestion and it is working.

    First tag setting instance links. Tag priority: Generator and index: -1
    Second tag is getting width value and sets cube position with it. priority: Generator index:0

    I moved user data to null object instead of using it on python tag. (Some one have suggested this before for another issue but I don't understand why we should use user data on python tag instead of object)

    By the way after @zipit reply I tried to research about priority but could not find them in 3d4 doc. if you know a good page I would want to know it.

    thank you both again.

    posted in Cinema 4D SDK •
    RE: A problem about getting an object width value with python

    @a_block hi,
    thank you for the suggestion. I really did not think that using 2 tags instead of one. This may be work and thank you so much for this I hope it works (probably will work I'm guessing)

    posted in Cinema 4D SDK •
    RE: A problem about getting an object width value with python

    @zipit hi,
    thank you for your help. I tested it but in this case it can't get currently assigned linked object. Old shape assignment is staying after new shape assignment. if you have time you can see this by assigning different shape objects.

    posted in Cinema 4D SDK •