Navigation

    • Register
    • Login
    • Search
    1. Home
    2. aturtur
    A

    aturtur

    @aturtur

    1
    Reputation
    12
    Posts
    92
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

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

    Best posts made by aturtur

    Removing color picker from ColorField

    Hello!

    I'm creating simple GeDialog and I'm wondering is it possible to remove color picker that is now default in ColorField in C4D R20?

    For my use what I'm trying to achieve there is no need for color picker and it is taking too much space from my dialog.

    alt text

    Script:

    import c4d
    from c4d.gui import GeDialog
    
    class Dialog(GeDialog): 
        def __init__(self):
            super(Dialog, self).__init__()
     
        def CreateLayout(self):
            self.SetTitle("Dialog")
            self.GroupBegin(1000, c4d.BFH_LEFT, 0, 0)
            self.AddColorField(1001, c4d.BFH_CENTER)
            self.GroupEnd()
            return True
      
    dlg = Dialog()
    dlg.Open(c4d.DLG_TYPE_ASYNC, 0, -2, -2)
    
    posted in Cinema 4D SDK •

    Latest posts made by aturtur

    RE: Purpose of different preference folders

    Hi @ferdinand,

    Thank you for the quick reply. This answers all my questions!

    Cheers,
    Arttu

    posted in Cinema 4D SDK •
    Purpose of different preference folders

    Hi, I have noticed that sometimes there's multiple different preferences folders under AppData/Roaming/MAXON folder.

    For example:
    Maxon Cinema 4D 2023_BCDB4759
    Maxon Cinema 4D 2023_BCDB4759_p
    Maxon Cinema 4D 2023_BCDB4759_w
    Maxon Cinema 4D 2023_BCDB4759_x

    The folder without any suffix is certainly what the stand-alone Cinema 4D software uses. But what are the others, what are their purpose and is there even more different options?

    I guess that "_p" is made by c4dpy.exe, since it appeared when I installed some 3rd party Python libraries with it.

    "_x" might have popped out when using "Commandline.exe" version of Cinema 4D. Not sure, just assuming.

    No idea where "_w" came from.

    I would appreciate if someone would explain these for me.

    Cheers,
    Arttu

    posted in Cinema 4D SDK •
    RE: Change Bodypaint Active Channel Color

    Hi @m_adam. Thanks for the information!

    I needed this feature to generate UV texture, where polygon selection tags colorizes the texture with different colors. And since "Fill Layer, Fill Polygons and Outline Polygons" commands uses color from current "Channel Color" I needed option to change the color with a script.

    G89cotIeVO.png

    c4d.CallCommand(170150) # Fill Layer
    c4d.CallCommand(170151) # Fill Polygons
    c4d.CallCommand(170152) # Outline Polygons

    But if this is not possible, one workaround that come to mind is to use "UV to Mesh" Scene Nodes Deformer/Capsule and render actual mesh with aligned camera.

    Cheers,
    Arttu

    posted in Cinema 4D SDK •
    Change Bodypaint Active Channel Color

    Hi, is it possible to change Bodypaint Active Channel Color with Python code?

    bodypaint_color.jpg

    Cheers,
    Arttu

    posted in Cinema 4D SDK •
    RE: Changing the Color field's color mode

    Hi @ferdinand,

    Thanks for the reply and the information. Ok, it is an UX/UI thing.

    I know that the color value is just a Vector and the original value doesn't change when toggling between modes (sRGB, Render, Display and Raw). It's just confusing for the end user that by default C4D is displaying colors in sRGB mode (when using OCIO), especially when the given vector for the color is anyways in raw format.

    But as you said, it's UX/UI thing and I should do a feature request in Maxon's Support Center that it would be nice to be able to change the default mode for the color field.

    Thanks for the link to the OCIO article, really useful information!

    Cheers,
    Arttu

    posted in Cinema 4D SDK •
    Changing the Color field's color mode

    Hi! Is it possible to change with a Python script the color field's color mode option (sRGB, Render, Display, Raw), when the project is set to use OpenColorIO color management?

    c4d_color_preview.jpg

    This would be a very beneficial feature. For example I have a Python plug-in that works like a color palette and it has 16 indiviual color field's. Cinema 4D sets color field to sRGB color mode by default and it is very cumbersome to change the color mode in every color field individually (from sRGB to Raw).

    Cheers,
    Arttu

    posted in Cinema 4D SDK •
    RE: ShowInFinder function in Cinema 4D S26

    Hi, not sure how I missed the solution from your first post. I need to be more careful. Thanks and sorry for the confusion.

    storage.ShowInFinder(folder, True)
    

    Works prefectly. Cheers!

    posted in Cinema 4D SDK •
    RE: ShowInFinder function in Cinema 4D S26

    Hi, sorry I totally forgot to tell the system specs. I did just a couple tests. Looks like it just was a Windows - Mac difference before.

    Windows 11 and Cinema 4D R26.013 -> Opens parent folder
    Windows 11 and Cinema 4D R25.117 -> Opens folder itself
    Windows 11 and Cinema 4D R21.207 -> Opens folder itself

    MacOS 12.3.1 (2018 MBP) and R26.013 -> Opens parent folder
    MacOS 12.3.1 (2018 MBP) and R21.207 -> Opens parent folder

    I'm gonna use following code to open straight to the folder location

    import os
    import c4d
    from c4d import storage
    
    def main():
    
        f = storage.GeGetC4DPath(c4d.C4D_PATH_PREFS) # Get preference folder path
        f = os.path.dirname(r''+f+'') # Go up
        f = os.path.join(f, '_bugreports') # Bug reports folder
        storage.ShowInFinder(f) # Open folder
    
        if c4d.GeGetCurrentOS() == c4d.OPERATINGSYSTEM_WIN: # If operating system is Windows
            os.startfile(folder)
        else: # If operating system is Mac
            os.system('open "%s"' % folder)
            
    if __name__=='__main__':
        main()
    

    Thanks for pointing out!

    posted in Cinema 4D SDK •
    ShowInFinder function in Cinema 4D S26

    Hi, just noticed that ShowInFinder function in Cinema 4D S26 opens the parent directory instead of the given directory, like in previous C4D versions. Is this a known change or a bug?

    Here is an example script that should open the _bugreports folder

    import os
    import c4d
    from c4d import storage
    
    def main():
        folder = storage.GeGetC4DPath(c4d.C4D_PATH_PREFS)
        folder = os.path.dirname(folder)
        folder = os.path.join(folder, '_bugreports')     
        storage.ShowInFinder(folder)
    
    if __name__=='__main__':
        main()
    

    It works in Cinema 4D R25 (and older versions) but in S26 it opens the parent directory of _bugreports instead.

    posted in Cinema 4D SDK •
    RE: R25 - Modal dialog's Color Chooser issue

    Hi, thanks for the information. Hopefully it will get fixed in the future updates.

    Cheers,
    Arttu

    posted in Cinema 4D SDK •