• Drag Object in GeDialog.AddEditText

    windows 2024 python
    4
    0 Votes
    4 Posts
    702 Views
    ferdinandF
    Hey @pyxelrigger, sure you can use the string custom GUI. You could also use a base link or a filename field which be the more natural solutions for this. But you asked for AddEditText and that is what I answered. Cheers, Ferdinand
  • Post build event settings on windows and mac

    c++ windows macos
    3
    0 Votes
    3 Posts
    670 Views
    B
    Thank you, @ferdinand
  • How to store BaseShader to HyperFile

    windows python 2024
    7
    0 Votes
    7 Posts
    1k Views
    gheyretG
    Hi @ferdinand , Yeah! I'm actually considering saving the shader to .c4d file as well. But it would be great if posible to store BaseList2D in Hyperfile. Thank you! Cheers!
  • How to access the "root" Scene Nodes graph

    python 2024
    3
    0 Votes
    3 Posts
    588 Views
    K
    Hi @ferdinand , Thanks as always for your clear answers, It solved the problem for me!
  • UuidInterface.ToString() raise a TypeError.

    windows python 2024
    3
    0 Votes
    3 Posts
    541 Views
    DunhouD
    Wow @ferdinand! What a super detailed and super useful information ! Always learning great things from your super user-friendly answers for rookies like me Memory Management is very useful to understand what happened here, I will read it again tomorrow after work, hope I can have a deeper understanding then About the Interfaces/References/Ref class name, super useful information, I always confused them and thought it was an inheritance relationship or something like that, it is much cleaner now! Thanks for your typing tips here, I had learn this by testing your answers and codes (In fact, most of my programming skills are learned through studying your code, and I am truly grateful to you) Last, thanks or your times during the meeting time! Cheers~ DunHou
  • FBX does not export

    windows 2024 python
    2
    0 Votes
    2 Posts
    440 Views
    ferdinandF
    Hey @pyxelrigger, Thank you for reaching out to us. It is always difficult for me in these cases to find the right words. Generally speaking, what you ask us to do here, is out of scope of support: Either debug your code or finish the script for you. What I see here is primarily a user who is overwhelmed by his or her own code. Especially when you are less experienced: Just break up things into manageable pieces where you know what they do and you can confirm that they do what you mean them to do. And when I run into troubles, the first thing I would also remove is all UI fluff. You could for example define your paths just at the top of the script. Finally, NEVER do this c4dpath = '{}\{}'.format(c4dfilesfolder, file), this is just bound to go wrong. Use os.path.join instead. You will have to debug your script yourself. Cheers, Ferdinand Result: Exported /Users/f_hoppe/Desktop/test/Untitled 2.fbx Exported /Users/f_hoppe/Desktop/test/Untitled 1.fbx Code (mostly AI generated): import c4d import os def SetFbxExportSettings() -> None: """Set the FBX export settings. """ plugin: c4d.plugins.BasePlugin = c4d.plugins.FindPlugin(c4d.FORMAT_FBX_EXPORT, c4d.PLUGINTYPE_SCENESAVER) data: dict = {} plugin.Message(c4d.MSG_RETRIEVEPRIVATEDATA, data) settings = data.get("imexporter", None) if settings is None: raise ValueError("Could not retrieve the FBX export settings.") settings[c4d.FBXEXPORT_FBX_VERSION] = False settings[c4d.FBXEXPORT_ASCII] = False settings[c4d.FBXEXPORT_CAMERAS] = False settings[c4d.FBXEXPORT_LIGHTS] = False settings[c4d.FBXEXPORT_SPLINES] = False settings[c4d.FBXEXPORT_INSTANCES] = False settings[c4d.FBXEXPORT_SELECTION_ONLY] = True settings[c4d.FBXEXPORT_GLOBAL_MATRIX] = False settings[c4d.FBXEXPORT_SDS] = c4d.FBXEXPORT_SDS_GENERATOR settings[c4d.FBXEXPORT_TRIANGULATE] = False settings[c4d.FBXEXPORT_SAVE_NORMALS] = True settings[c4d.FBXEXPORT_SAVE_VERTEX_COLORS] = False settings[c4d.FBXEXPORT_SAVE_VERTEX_MAPS_AS_COLORS] = False settings[c4d.FBXEXPORT_UP_AXIS] = c4d.FBXEXPORT_UP_AXIS_Y settings[c4d.FBXEXPORT_TRACKS] = True settings[c4d.FBXEXPORT_BAKE_ALL_FRAMES] = False settings[c4d.FBXEXPORT_PLA_TO_VERTEXCACHE] = False settings[c4d.FBXEXPORT_BOUND_JOINTS_ONLY] = False settings[c4d.FBXEXPORT_TAKE_MODE] = c4d.FBXEXPORT_TAKE_TAKES settings[c4d.FBXEXPORT_MATERIALS] = True settings[c4d.FBXEXPORT_EMBED_TEXTURES] = False settings[c4d.FBXEXPORT_SUBSTANCES] = True settings[c4d.FBXEXPORT_BAKE_MATERIALS] = True settings[c4d.FBXEXPORT_BAKEDTEXTURE_WIDTH] = 1024 settings[c4d.FBXEXPORT_BAKEDTEXTURE_HEIGHT] = 1024 def GetInputDocumentPaths() -> list[str]: """Opens a directory dialog to select a folder and returns a list of Cinema 4D documents that are in the selected folder or its subfolders. """ path: str = c4d.storage.LoadDialog( c4d.FILESELECTTYPE_ANYTHING, "Animations", c4d.FILESELECT_DIRECTORY) if not os.path.isdir(path): raise ValueError("The given path is not a directory.") files: list[str] = [] for root, _, filenames in os.walk(path): for filename in filenames: if filename.endswith('.c4d'): files.append(os.path.join(root, filename)) return files def main() -> None: """Main function. """ # Set the settings and get the inputs. SetFbxExportSettings() filePaths: list[str] = GetInputDocumentPaths() # Export the documents in the list to FBX. for path in filePaths: # Load the document. doc: c4d.documents.BaseDocument = c4d.documents.LoadDocument(path, c4d.SCENEFILTER_OBJECTS) if not doc: raise ValueError(f"Could not load the document at {path}.") # Get the first object in the document and set it as the selection so that it is exported. obj: c4d.BaseObject = doc.GetFirstObject() if not obj: raise ValueError(f"The document at {path} does not contain any objects.") doc.SetSelection(obj, c4d.SELECTION_NEW) # Export the document to FBX and close it. fbxPath: str = path.replace('.c4d', '.fbx') c4d.documents.SaveDocument(doc, fbxPath, c4d.SAVEDOCUMENTFLAGS_DONTADDTORECENTLIST, c4d.FORMAT_FBX_EXPORT) c4d.documents.KillDocument(doc) print(f"Exported {fbxPath}") if __name__ == '__main__': main()
  • Nothing happen when runing generate_solution_win.bat

    windows c++ 2024
    9
    0 Votes
    9 Posts
    1k Views
    gheyretG
    Yeah, it's a little bit anoying, but the problem's solve! Ready for rocking with C++! wohoo~
  • Error compiling R23 framework

    r23 c++
    2
    0 Votes
    2 Posts
    600 Views
    i_mazlovI
    Hi @dgould, Welcome to the Maxon developers forum and its community, it is great to have you with us! Getting Started Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules. Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment. Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support. Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads. It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions. About your First Question You are completely right with finding the thread with the answer: Manuel posted in a separate thread the solution for this issue: Building R23 SDK with Visual Studio 16.9. As he states there inside the R23.107 sdk you need to find the file frameworks/core.framework/source/maxon/objectbase.h and make there two changes. This will allow your solution to build without errors. The issue was later resolved in S24 and onwards, so there's no need in changing this file there. Cheers, Ilia
  • Download Cinema 4D 2023.2.0 link doesn't work

    2023 macos
    4
    0 Votes
    4 Posts
    714 Views
    ferdinandF
    Hey @BruceC, you are not expected to. In fact you cannot delete any topic as a user here once it is older than 60 minutes (no replies or not). Postings, a reply in a topic, can be deleted without restrictions. But deleting is not really deleting in NodeBB anyway, true deletion, NodeBB calls its purging, is not available for users at all. Long story short: We do not want users to delete topics as they tend to delete valuable information for others with that, even when they consider the topic failed or obsolete. Cheers, Ferdinand
  • Error compiling R25 framework on MacOS

    r25 macos
    3
    0 Votes
    3 Posts
    621 Views
    B
    Thank you, @ferdinand. I modified sourceprocessor.py for now, and it works.
  • Can I get the typing (input) event in cinema 4d?

    windows python 2024
    3
    0 Votes
    3 Posts
    598 Views
    gheyretG
    Hi @ferdinand, Thank you for your reply. And I will try it later today.
  • Stop projecttool asking for return to exit

    windows
    3
    1
    0 Votes
    3 Posts
    508 Views
    B
    @i_mazlov Thank you very much! This works!
  • Adding a Morph Deformer Causes Pose Morph Tag to Stop Working

    python
    6
    1
    0 Votes
    6 Posts
    1k Views
    kangddanK
    Thank u @i_mazlov I appreciate you pointing me in the right direction. I will try to understand the workings behind the posemorph tag!
  • Plugin in the top bar with Python

    2024 python windows
    2
    1
    0 Votes
    2 Posts
    462 Views
    ferdinandF
    Hey @pyxelrigger, Thank you for reaching out to us. You will have to overwrite PluginMessage in your plugin to do that. You might want to have a look at this thread. Cheers, Ferdinand
  • GetCache Does Not Work Inside the Python Generator

    r21 r25 python
    10
    0 Votes
    10 Posts
    2k Views
    ferdinandF
    Hey @bentraje, I am glad that you found your solution, and yes, you are absolutely right, it should be GeGetCurrentThread . I fixed that in my pseudo-code. Cheers, Ferdiand
  • Best guess at active user selection

    c++ 2023
    4
    0 Votes
    4 Posts
    647 Views
    i_mazlovI
    Hi Andy, Welcome to the Maxon developers forum and its community, it is great to have you with us! Getting Started Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules. Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment. Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support. Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads. It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions. About your First Question Yes, unfortunately it's not possible to catch the "hover" event as there's no such event. So yes, you're right, you can somehow emulate the desired behavior. The suggestion for that would be to work with Core Messages, namely do your stuff (i.e. change the mode) as a reaction on catching the EVMSG_CHANGE message. For checking the selections part, you can refer to the DunHou's pointer to the Ferdinand's script. Cheers, Ilia
  • BitmapButton in Resource file

    2024 c++
    8
    0 Votes
    8 Posts
    2k Views
    i_mazlovI
    Hi @JohnThomas, sorry again for a long delay in the answer. Now I see that in this specific setup when the bitmap button is used inside the field layer plugin, the message MSG_DESCRIPTION_COMMAND is not propagated to the field layer plugin, which sounds like a bug to me. I've checked the code and it's likely due to the field layer data object being somewhat special comparing to others. I will double check this with a corresponding developer, once he's back from parental leave, and create a bug report for this to be fixed. Unfortunately, I cannot offer you any workaround for this before it's fixed. Cheers, Ilia
  • Easier Way to Offset an Animation of an Object?

    python r25 windows r21
    4
    0 Votes
    4 Posts
    1k Views
    B
    @ferdinand yea python is much more forgiving than C++. i was just wondering if there was an already existing API for such task.
  • Projecting Points from Object/World Space into Texture Space

    2024 python
    1
    1
    4 Votes
    1 Posts
    687 Views
    No one has replied
  • In the UV Manager,cubic's c4d.CallCommand()

    python 2024
    4
    1
    0 Votes
    4 Posts
    659 Views
    1
    Okay, thank you!