Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi @indexofrefraction, sorry, I had a look at it and this is unfortunately not possible to add a CUSTOMGUI_TEXBOX in a GeDialog.
Technically this is possible and you will be able to use it as a Link field. However, the creation of shader will not work since it requires a Description to work and you can't have a Description object in a GeDialog.
This was the original post I wrote, but while writing it I had an idea to maybe make it work, it will be a bit clunky but I need to find time to implement and experiment it. But please don't get wrong expectation, due to the fact that this is not something that work out of the box, I'm not sure we will consider my workaround good enough to release it and we may prefer to decide to not release it. And I'm not 100% sure that my workaround will work, so I need to try first. But this is a very very low priority thing so this is the current status.
Cheers, Maxime.
Well with this crash report I can't say more, it's most likely Corona is doing some stuff in the background. If you really want it to be solved, the best way is to share the crash report and your script to Corona Render team. This way they could reproduce and they will contact us if this is something related to Cinema 4D, but looking at the exception I seriously doubt as the crash occurs in the Corona code base that does not make use of the Cinema 4D API.
This is a Corona Render crash, unfortunately nothing we can help you solve, better ask the Corona Render team if they can reproduce it.
And sorry for the late reply, but yes this fix will not be backported to R25 but it is fixed with the S26 SDK.
Hi @kbar, the CodeEditor_Open function is for the Expression Manager, explanation and example can be found in the Using CodeEditor_Open() topic.
CodeEditor_Open
To open the ScriptManager, the only possible way is to use CallCommand(1001084).
CallCommand(1001084)
Since S26 LoadPythonScript and SetActiveScriptObject have been added. The first one will load an existing script and set it as active while the second will set a script already loaded as active. Before S26, this is not possible, even if the GeListHead containing all BaseList2D representing a script is public (via GetScriptHead) the BaseList2D object representing a script did not expose any way to get/set its script content or even if it is active.
Finally you can find an example in load_python_script.py, it's in Python but porting it to C++ is straightforward.
Hi Jesse, thanks for the report those issue have been fixed and will be up in the next update of the documentation. Thanks a lot for reporting them and if you see other one please report them !
Hi @InterfaceGuy I also do have this error, message but I don't think this cause any issue for this purpose.
The -m argument is telling to the c4dpy to execute a module, but in your case you are executing a file. So you should just give the full filepath of this file and this should work.
So the good way to setup pip is to either call c4dpy -m ensurepip or c4dpy {FullPathToGetPip}\get-pip.py
c4dpy -m ensurepip
c4dpy {FullPathToGetPip}\get-pip.py
And take into consideration that in some case pip could fail in S26, as reported in Cinema 4D R23 / macOS - pip install broken we were not able to reproduce, making hard to provide a workaround but we are still on it.
Hi the macOS 12.3 update removed the python previously shipped with the OS.
So you have to link for example from /usr/local/bin to a python installation, I personally have Python 3.8.9. Xcode itself ships with a python version you could link to (its in Contents/Developer/usr/bin of the application package).
So with that path you can call call sudo ln -s PATH_TO_PYTHON /usr/local/bin/python in terminal.
sudo ln -s PATH_TO_PYTHON /usr/local/bin/python
In future we'll probably do the same as for Windows and ship a python binary with the frameworks to avoid this issue. Cheers, Maxime.
Thanks a lot for doing it and providing it as an open source project!
Hi @user168462, sorry for the late reply, I was away last week to the MAXON company meeting.
Regarding your request sadly there is no builtin way for doing something like that, you will need to iterate each menus and submenu. For hard-coded menu you can find them in resource\modules\c4dplugin\menus, but this will not cover all menus and if you want to address one in particular, it's better to ask here so we can look into the code.
Hi @user168462, first of all welcome to plugincafe!
To obtain the full list of Command which are implemented by a CommandData, you can call FilterPluginList. This function will return you a list of plugin in an AtomArray. Each entry within this AtomArray can safetly be casted to a BasePlugin.
Correct if there is an icon supplied for a Command, the Command ID is the same than the Icon ID. If you want to retrieve the icon of an Command ID, you can use the GetIcon function to retrive it.
Sadly we are not able to reproduce your issue, 3 dev tested and we all not able to reproduce. SO being not reproducible on our end, it's pretty hard to find a solution. Would it be possible for you to re-install Cinema 4D in a new empty directory, and try to reproduce your issue and report here every steps if you still can reproduce your issue with this fresh install.
Regarding your last message, right for multiple object this is not possible to Open/Close only for a subset of the initial selection.
Can you try using bc.SetInt32(c4d.DESC_DEFAULT, True) instead.
bc.SetInt32(c4d.DESC_DEFAULT, True)
Hi @chuanzhen, while there is DESC_GUIOPEN this one is more to be used with CustomGUI like Color that can be extended, in your case you want to use DESC_DEFAULT, so this give us:
DESC_GUIOPEN
DESC_DEFAULT
import c4d def main() -> None: obj = op bc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_GROUP) bc[c4d.DESC_NAME] = "group_test1" bc[c4d.DESC_SHORT_NAME] = "group_test1" bc[c4d.DESC_DEFAULT] = True bc[c4d.DESC_TITLEBAR] = True group_did = obj.AddUserData(bc) bc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_STRING) bc[c4d.DESC_NAME] = "test" bc[c4d.DESC_PARENTGROUP] = group_did did = obj.AddUserData(bc) c4d.EventAdd() if __name__ == '__main__': main()
Hi @chuanzhen, you should define the UI to use for the user data like so:
bc = c4d.GetCustomDataTypeDefault(c4d.DTYPE_STRING) bc[c4d.DESC_NAME] = "test" bc[c4d.DESC_CUSTOMGUI] = c4d.CUSTOMGUI_STRINGMULTI did = obj.AddUserData(bc)
Hi @JohnSmith, we have separated your topic from Drag & Drop to Reorder in GUI since this is a new question. However for future reader, the code shown is a part of a code posted on the other topic.
There is the GeUserArea.HandleMouseDrag to start a drag operation, you can find an example in Drag&Drop an image in a gui field. However this is a drag operation handled by Cinema 4D so this is not possible to pass Python Object with it and there is nothing visible while the drag operation occurs.
GeUserArea.HandleMouseDrag
So if you want to share python data from 2 GeUserArea the best way is through messages. The first GeUserArea 1 send a message to the dialog and then the dialog to forward the message to the GeUserArea2. Then in this message it is up to you to pass the correct data. You can pass a BaseContainer containing all your data. An example about message usage can be found in geuserarea_basic.
Hi thanks for the report, there is sadly a bug in the python layer, nothing you can fix.
The fix will be available in the next Cinema 4D update. Cheers, Maxime.
H @tim97 , if you read the previous answers from Manuel, we were not able to reproduce the behavior, since you are looking for the solution I guess you have the same issue. Would it be possible for you to share a scene and a script?
Thanks in advance, Cheers, Maxime.
Hi you are right, this is a mistake, and you can fix it yourself by adding from c4d import bitmaps
from c4d import bitmaps
This is going to be fixed in the next Cinema 4D version. Thanks for the report