Posts made by aturtur
-
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_xThe 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 -
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.
c4d.CallCommand(170150) # Fill Layer
c4d.CallCommand(170151) # Fill Polygons
c4d.CallCommand(170152) # Outline PolygonsBut 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 -
Change Bodypaint Active Channel Color
Hi, is it possible to change Bodypaint Active Channel Color with Python code?
Cheers,
Arttu -
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 -
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?
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 -
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!
-
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 itselfMacOS 12.3.1 (2018 MBP) and R26.013 -> Opens parent folder
MacOS 12.3.1 (2018 MBP) and R21.207 -> Opens parent folderI'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!
-
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.
-
RE: R25 - Modal dialog's Color Chooser issue
Hi, thanks for the information. Hopefully it will get fixed in the future updates.
Cheers,
Arttu -
R25 - Modal dialog's Color Chooser issue
Hello. I recently hopped from R21 to R25 and noticed some weird behaviors with R25.
If I create a modal dialog with a color field in it and try to open the color picker window by clicking the color field, it doens't open in R25. This works in R21.
Code for the modal dialog setup:
import c4d from c4d import gui from c4d.gui import GeDialog # Classes class Dialog(GeDialog): def __init__(self): super(Dialog, self).__init__() self.res = c4d.BaseContainer() # Create Dialog def CreateLayout(self): self.SetTitle("Dialog") self.GroupBegin(1000, c4d.BFH_CENTER, cols=1, rows=1, groupflags=1, initw=125, inith=0) self.GroupBorderSpace(5, 5, 5, 5) self.AddColorField(2002, c4d.BFH_FIT, initw=70, inith=13, colorflags=c4d.DR_COLORFIELD_POPUP) self.SetColorField(2003, c4d.Vector(0,0,0), 1, 1, c4d.DR_COLORFIELD_ENABLE_COLORWHEEL) self.GroupEnd() return True # Functions def main(): dlg = Dialog() # Create dialog object dlg.Open(c4d.DLG_TYPE_MODAL, 0, -1, -1, 0, 0) # Open dialog # Execute main() if __name__=='__main__': main()
When creating an asynchronous dialog, the color chooser window will pop up correctly.
Code for the async dialog setup:
import c4d from c4d import gui from c4d.gui import GeDialog # Classes class Dialog(GeDialog): def __init__(self): super(Dialog, self).__init__() self.res = c4d.BaseContainer() # Create Dialog def CreateLayout(self): self.SetTitle("Dialog") self.GroupBegin(1000, c4d.BFH_CENTER, cols=1, rows=1, groupflags=1, initw=125, inith=0) self.GroupBorderSpace(5, 5, 5, 5) self.AddColorField(2002, c4d.BFH_FIT, initw=70, inith=13, colorflags=c4d.DR_COLORFIELD_POPUP) self.SetColorField(2003, c4d.Vector(0,0,0), 1, 1, c4d.DR_COLORFIELD_ENABLE_COLORWHEEL) self.GroupEnd() return True # Open async dialog dlg = Dialog() # Create dialog object dlg.Open(c4d.DLG_TYPE_ASYNC, 0, -1, -1, 0, 0) # Open dialog
Is this a known bug or is something changed in the SDK that I should accomplish this an another way?
Btw, also the color picker doesn't work in the R25's color chooser window.
I'm running
Cinema 4D R25.010
Windows 10 (21H1)Cheers,
Arttu -
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.
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)