• Access to the coordinate manager.

    2023 python windows
    3
    1
    0 Votes
    3 Posts
    688 Views
    S
    @ferdinand Thank you very much for the expanded object.
  • Send/Receive Messages in TagData/ObjectData plugins

    python
    5
    0 Votes
    5 Posts
    733 Views
    bacaB
    @ferdinand Thanks again I'll have time to check it later today. But it seems clear.
  • VC_FLAGS

    2024 python 2023
    2
    0 Votes
    2 Posts
    389 Views
    M
    Hi @baca VC_SAFETY has been removed in 2023.1, you do not need it anymore, since the message can't fail anymore. You should keep it for old code but for new code, just leave the vc_flags empty will be enough. Cheers, Maxime.
  • 0 Votes
    4 Posts
    730 Views
    K
    I found the AddPorts() Method,Sorry I missed it before. from typing import Optional import c4d import maxon doc: c4d.documents.BaseDocument # The active document op: Optional[c4d.BaseObject] # The active object, None if unselected def main() -> None: material = doc.GetActiveMaterial() nodeMaterial = material.GetNodeMaterialReference() graph: maxon.GraphModelInterface = nodeMaterial.GetGraph(c4d.GetActiveNodeSpaceId()) with graph.BeginTransaction() as transaction: layered_node = graph.AddChild(maxon.Id(),"com.chaos.vray_node.texlayeredmax") layers = layered_node.GetInputs().FindChild("com.chaos.vray_node.texlayeredmax.texture_layers") #The Layers portbundle layers.AddPorts(2, 1) #Add layers transaction.Commit() #Layer in Layers portbundle layers_list = [] layers.GetChildren(layers_list,maxon.NODE_KIND.INPORT) #Textureports and BlendMode_ports in Layers portbundle layers_texport_list = [tport for port in layers_list if (tport := port.FindChild("com.chaos.vray.portbundle.texture_layer.texture"))] layers_mode_list = [mport for port in layers_list if (mport := port.FindChild("com.chaos.vray.portbundle.texture_layer.blend_mode"))] print(layered_node) print(layers) print(layers_list) print(layers_texport_list) print(layers_mode_list) if __name__ == '__main__': main()
  • HideElement in Cinema 4D 2024

    2024 python
    4
    2
    0 Votes
    4 Posts
    770 Views
    DunhouD
    Yes @simonator420 , it worked in 2023, and not worked any more in 2024, I also found that strange behavior in HideElement() and confused me for a while.
  • Plugins limitation count

    9
    0 Votes
    9 Posts
    2k Views
    M
    This is a bit more complex than that, python is loaded after plugins are registered, therefor for each one we need to have a c++ one that act as a placeholder that will be replaced later by a python one. I can't guarantee anything but I will see what I can do (probably not for the next release.) Cheers, Maxime
  • Is there any way to get MMB wheel scrolling in viewport?

    c++ python
    2
    0 Votes
    2 Posts
    572 Views
    ferdinandF
    Hey @LingZA, Thank you for reaching out to us. There are multiple questions in this topic, which always makes things tricky to answer. Is there any way to stop MMB wheel to zoom the camera? I need to scroll the MMB wheel in the viewport to change my tool's params? Is there any way to get MMB wheel scrolling in viewport? In general, Cinema 4D has no input device control & emulation layer, so you cannot intercept an input device from sending (stop the mouse wheel to zoom) or emulate inputs (get the mouse wheel scrolling). You can get the state of an input device. For MMB that would be the GUI message BFM_INPUT with BFM_INPUT_DEVICE being BFM_INPUT_MOUSE and BFM_INPUT_CHANNEL being BFM_INPUT_MOUSEMIDDLE. When you fail to read BFM_INPUT_MOUSEMIDDLE in your plugin, please share executable code, so that we can reproduce the problem. When necessary, you can send code confidentially to us via sdk_support(at)maxon(dot)net. Cheers, Ferdinand
  • How to install pip and numpy for Cinema 4D 2024 on MacOS?

    python macos
    6
    0 Votes
    6 Posts
    3k Views
    G
    I apologize for posting repeatedly. I think I succeeded in installing numpy and other libraries as well. In case for someone in same situation, I would like to share my own case resolution. After installing pip, not from c4dpy, but using the python below worked: /Applications/Maxon Cinema 4D 2024/resource/modules/python/libs/python311.macos.framework/python and executed the command like python -m pip install numpy normally. And worked inside C4D properly. If there are any inaccuracies or clear errors, I would appreciate it if you could point them out. Thank you in advance.
  • How to change the color of shaded wire in C++

    s26 c++
    3
    1
    0 Votes
    3 Posts
    653 Views
    P
    @i_mazlov Thank you for your reply
  • Get & Set Active Camera for a specific viewport

    python
    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hey @Thodos, without the console output of your browser, I cannot say much. I suspect that a DNS is failing. In the meantime, here are the offline docs. Cheers, Ferdinand
  • How to dynamically change the "STEP"of "REAL" tool description in c++?

    c++
    2
    0 Votes
    2 Posts
    411 Views
    i_mazlovI
    Hi @LingZA , To achieve this in C++ you need to set DESC_STEP parameter of the corresponding BaseContainer, e.g. bc->SetFloat(DESC_STEP, 1.0f);. For getting the editable BaseContainer you need to use GetParameterI() function on your description, please refer to the Description Manual. Cheers, Ilia
  • Frame All command on Spline User Data

    python 2023
    8
    1
    0 Votes
    8 Posts
    2k Views
    i_mazlovI
    Hi Gabriel, Sorry for the delay in this thread. Unfortunately you cannot control this folding GUI functionality as it is sealed to the non-public GUI implementation. That would not be the case when using custom GUI implementations. Cheers, Ilia
  • Which DisplayFilter affects ToolData.draw

    2023 2024 s26 python
    3
    0 Votes
    3 Posts
    566 Views
    gheyretG
    Hi @ferdinand , I'm sorry that my title and description may be a little confused, maybe I misunderstood something and thought a little complicated. And thank you very much for your answer, you always help me when my thinking is confused. Cheers! Gheyret
  • Any examples of how c4d.gui.BaseCustomGui works?

    python 2023 2024
    3
    0 Votes
    3 Posts
    868 Views
    G
    This is an excellent explanation , thank you.
  • Print Custom User data to text doc

    python
    6
    1
    0 Votes
    6 Posts
    956 Views
    ferdinandF
    Hey @apetownart, Thank you for sharing your solution, much appreciated! I have fenced in your code with a code block so that it is a bit more readable and has a copy button. Find out how to do that yourself in our Forum Markup documenation. Cheers, Ferdinand
  • Get value of texture node filepath port?

    2024 python
    3
    1
    0 Votes
    3 Posts
    893 Views
    B
    Oh wow! Thank you so much! Yes I'm a beginner with python cinema 4D so I really appreciate your support and this definitly gives me a better understanding of the node structure.
  • SendModelingCommand causing Memory Leak

    2024 c++
    11
    0 Votes
    11 Posts
    2k Views
    ferdinandF
    Hey @d_schmidt, The project files you sent me clearly had been compiled on MacOS, all the Xcode build fragments are still there and so are the MacOS plugin binaries. [image: 1700144525927-af5816db-1df0-444d-9723-89095081c4ed-image.png] That aside, since you said that you are compiling on PC, I tried there again. I had to provide a missing projectdefintion.txt in your solution and provide the missing frameworks, I chose again the 2024.0.0 frameworks. I also again debugged against 2024.1.0. I also had to fix the main.cpp as waiting for the resources being loaded had been removed on C4DPL_INIT_SYS being emitted. What then had the effect that the resources of the plugin were not being found. Other than that, I still had no memory leaks. If you want any further help, you should try to explain more precisely what you are doing: OS, hardware, with which SDK version are you building, with which Cinema 4D are you debugging, what is your VS/Xcode version, are you compiling for debug or release, any customizations, etc. An ongoing problem is also that I must fix/invent things before I can compile and run your code - which is not ideal in such cases. Cheers, Ferdinand Fixed main.cpp: #include "main.h" // must be included when removing the other includes from the SDK #include "c4d_resource.h" Bool PluginStart() { if (!RegisterOptimizeObject()) return true; return true; } void PluginEnd(){} Bool PluginMessage(Int32 id, void* data) { switch (id) { case C4DPL_INIT_SYS: // The following two lines are required for a plugin to function properly. if (!g_resource.Init()) return false; return true; case C4DMSG_PRIORITY: return true; case C4DPL_EDITIMAGE: return false; } return false; } My VS output console dump. This is from before I fixed your main.cpp, and even there I had no leaks: // Boot Sequence Messages [...] // I instantiated an ooptimizeobject, these errors are caused by the butchered main.cpp, it does not wait for the resources being loaded. Symbol resource error: Couldn't open file. (file:///C:/Program Files/Maxon/2024.1.0/resource/modules/c4d_base/description/ooptimizeobject.h) [iofilehandler_impl.cpp(427)] Cause: Errno #2: No such file or directory [iofilehandler_impl.cpp(427)] Following string resource does not exist:...\2024.1.0\resource\modules\c4d_base\strings_en-US\description\ooptimizeobject.str [...] // Shutdown Sequence Messages 15:01:06 DEBUG: PreviewScheduler: Flush/Clear Context 15:01:06 DEBUG: PreviewScheduler: End 15:01:06 DEBUG: Context: Locked:Highest 15:01:06 DEBUG: Context: Unlocked:Highest 15:01:06 DEBUG: PreviewScheduler: Flush completed The thread 0x4014 has exited with code 0 (0x0). 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\motiontracker\lpsolve55_64.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\d3d10core.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\d3d10.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_substance\libs\win64\substance_d3d10pc_blend.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_substance\libs\win64\substance_d3d11pc_blend.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_substance\libs\win64\substance_sse2_blend.dll' 15:01:07 DEBUG: PostFX: Shut down The thread 0x2d74 has exited with code 0 (0x0). The thread 0x5d98 has exited with code 0 (0x0). The thread 0x3fcc has exited with code 0 (0x0). 15:01:07 DEBUG: Shutdown GPU Devices... The thread 0x4694 has exited with code 0 (0x0). The thread 0x7b4 has exited with code 0 (0x0). The thread 0x1f60 has exited with code 0 (0x0). The thread 0x2f38 has exited with code 0 (0x0). The thread 0x4c9c has exited with code 0 (0x0). The thread 0x40f4 has exited with code 0 (0x0). The thread 0x145c has exited with code 0 (0x0). The thread 0x672c has exited with code 0 (0x0). The thread 0x305c has exited with code 0 (0x0). The thread 0x53d0 has exited with code 0 (0x0). The thread 0x3420 has exited with code 0 (0x0). The thread 0x46c0 has exited with code 0 (0x0). The thread 0x16a8 has exited with code 0 (0x0). The thread 0x4968 has exited with code 0 (0x0). The thread 0x1f7c has exited with code 0 (0x0). The thread 0x4d48 has exited with code 0 (0x0). The thread 0x2eec has exited with code 0 (0x0). The thread 0x4d14 has exited with code 0 (0x0). The thread 0x4808 has exited with code 0 (0x0). The thread 0x34ac has exited with code 0 (0x0). The thread 0x3cb0 has exited with code 0 (0x0). The thread 0x75f0 has exited with code 0 (0x0). The thread 0x331c has exited with code 0 (0x0). The thread 0x2fcc has exited with code 0 (0x0). The thread 0x3130 has exited with code 0 (0x0). The thread 0x6dbc has exited with code 0 (0x0). 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\Redshift\res\libs\win64\nvrtc-builtins64_112.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\Redshift\res\libs\win64\embree4redshift.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\Redshift\res\libs\win64\redshift-core-cpu-vc140.dll' 15:01:07 DEBUG: Devices shut down ok 15:01:07 DEBUG: Shutdown Rendering Sub-Systems... The thread 0x3714 has exited with code 0 (0x0). The thread 0x4174 has exited with code 0 (0x0). The thread 0x4be4 has exited with code 0 (0x0). The thread 0x5974 has exited with code 0 (0x0). The thread 0x398c has exited with code 0 (0x0). The thread 0xa30 has exited with code 0 (0x0). The thread 0x4d40 has exited with code 0 (0x0). The thread 0xc48 has exited with code 0 (0x0). The thread 0x241c has exited with code 0 (0x0). The thread 0x35cc has exited with code 0 (0x0). 15:01:08 DEBUG: Finished Shutting down Rendering Sub-Systems The thread 0x5810 has exited with code 0 (0x0). The thread 0x1e94 has exited with code 0 (0x0). The thread 0x6d20 has exited with code 0 (0x0). The thread 0x5cc4 has exited with code 0 (0x0). The thread 0x70d4 has exited with code 0 (0x0). The thread 0x3d94 has exited with code 0 (0x0). The thread 0x1a50 has exited with code 0 (0x0). The thread 0x8a8 has exited with code 0 (0x0). The thread 0x6d84 has exited with code 0 (0x0). The thread 0x5df4 has exited with code 0 (0x0). The thread 0x1998 has exited with code 0 (0x0). The thread 0x6e8 has exited with code 0 (0x0). The thread 0x3f10 has exited with code 0 (0x0). The thread 0x4e94 has exited with code 0 (0x0). The thread 0x5274 has exited with code 0 (0x0). The thread 0x4438 has exited with code 0 (0x0). The thread 0x6c0c has exited with code 0 (0x0). The thread 0x56e4 has exited with code 0 (0x0). The thread 0x14d8 has exited with code 0 (0x0). The thread 0x4588 has exited with code 0 (0x0). The thread 0x6edc has exited with code 0 (0x0). The thread 0x2fa0 has exited with code 0 (0x0). The thread 0x2a08 has exited with code 0 (0x0). The thread 0x1054 has exited with code 0 (0x0). The thread 0x72e8 has exited with code 0 (0x0). The thread 0xfc4 has exited with code 0 (0x0). The thread 0x7404 has exited with code 0 (0x0). The thread 0x6984 has exited with code 0 (0x0). The thread 0x1e80 has exited with code 0 (0x0). The thread 0x61bc has exited with code 0 (0x0). The thread 0x6164 has exited with code 0 (0x0). The thread 0x504 has exited with code 0 (0x0). The thread 0x6ef8 has exited with code 0 (0x0). The thread 0x569c has exited with code 0 (0x0). 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\dciman32.dll' The thread 0x3924 has exited with code 1 (0x1). The thread 0x5040 has exited with code 0 (0x0). The thread 0x6a8c has exited with code 0 (0x0). The thread 0x2558 has exited with code 0 (0x0). The thread 0x4c30 has exited with code 0 (0x0). The thread 0x65ac has exited with code 0 (0x0). The thread 0x5ae8 has exited with code 0 (0x0). The thread 0x66b8 has exited with code 0 (0x0). The thread 0x673c has exited with code 0 (0x0). The thread 0x4334 has exited with code 0 (0x0). The thread 0xe34 has exited with code 0 (0x0). The thread 0x196c has exited with code 0 (0x0). The thread 0x6124 has exited with code 0 (0x0). The thread 0x509c has exited with code 0 (0x0). The thread 0x50ec has exited with code 0 (0x0). The thread 0x2b28 has exited with code 0 (0x0). The thread 0x3afc has exited with code 0 (0x0). The thread 0x6b04 has exited with code 0 (0x0). The thread 0x742c has exited with code 0 (0x0). The thread 0x42b4 has exited with code 0 (0x0). The thread 0x1868 has exited with code 0 (0x0). The thread 0x50b4 has exited with code 0 (0x0). The thread 0x6680 has exited with code 0 (0x0). The thread 0x5950 has exited with code 0 (0x0). 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvgbdsi.inf_amd64_3658df21346d526f\nvwgf2umx.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\DriverStore\FileRepository\nvgbdsi.inf_amd64_3658df21346d526f\nvldumdx.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\drawport_directx.module\libs\win64\dxil.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\drawport_directx.module\libs\win64\dxcompiler.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\xpressocore.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\volumes\libs\win64\openvdb.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\volumes.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\uvviewport.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\tool_system_hybrid.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\thinking_particles.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\teamrender.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\sla.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\sky.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\sketch.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\shader.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\sculpt.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\redshift.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\python.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\pbd_simulations.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\motiontracker.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\motioncam.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\mograph.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\mocca.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_usd.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_substance\libs\win64\substance_linker.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_substance.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_skp\libs\win64\SketchUpCommonPreferences.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_skp\libs\win64\SketchUpAPI.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_skp.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_obj.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_goz.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_gltf.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_forger.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_fbx.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_compositing.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_collada15.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_collada14.xdl64' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\wsock32.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_cadexchange\libs\win64\kernel_io.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_cadexchange.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_alembic.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\interop_moves.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\interop_misc.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\interop_forger.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\interop_bpexchange.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\hair.xdl64' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\vcruntime140d.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\ucrtbased.dll' 'Cinema 4D.exe' (Win32): Unloaded 'E:\plugins\2024.0\sdk2\plugins\example.main\example.main.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\dynamics.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\clothilde.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\ca.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_xtensions.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_viewport_render.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_simulation.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\c4d_objects\libs\win64\ChSolver.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\c4d_objects\libs\win64\xremeshlib2.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_objects.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_nodes.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_nodeeditor.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_manager.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_bitmapfilter.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_assetbrowser.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\bugslife_client.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\archigrass.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\analytics.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\advanced_render.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\unittests_common.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\tool_system.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\tool_scene_abstraction.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\svg.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\shadernodes.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\retargetbase.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\render.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\reflection.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\pythonvm.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\presenter_nodes.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\presenter_nodegraph.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\presenter_base.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\post.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\physx.module\libs\win64\PhysX_64.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\physx.module\libs\win64\PhysXCommon_64.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\physx.module\libs\win64\PhysXCooking_64.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\physx.module\libs\win64\PhysXFoundation_64.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\physx.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\parallelprogram.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\opensubdiv.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\nodes_corenodes.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\nodes.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\neutron.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\network.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\modeling_mesh.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\modeling_geometry_abstraction.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\modeling_geom.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\misc.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\math.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\magicbulletlooks.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_usd.module\libs\win64\tbb.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\io_usd.module\libs\win64\usd_ms.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\io_usd.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\image_openexr.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\image_ocio_gpu.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\image_gpu.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\image_exif.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\gui_gluon.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\embree_classic.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\embree.module\libs\win64\embree3maxon.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\embree.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\drawport_selector.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\drawport_general.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\drawport_directx.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\drawport.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\denoiser.module\libs\win64\tbb12.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\modules\denoiser.module\libs\win64\OpenImageDenoise.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\denoiser.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\dbgcore.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\crashhandler.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\corenodes.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\command.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_viewport_nodegraph.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\c4d_base.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\asset.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\image_ocio.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\msacm32.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\avifil32.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\image.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\comdlg32.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\credui.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\d2d1.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\msimg32.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\WinSxS\amd64_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.22621.1778_none_57fe2016ce1542ec\GdiPlus.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\msvfw32.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\DWrite.dll' 'Cinema 4D.exe' (Win32): Unloaded 'C:\Windows\System32\usp10.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\corelibs\gui.module.xdl64' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\libs\win64\libmmd.dll' 'Cinema 4D.exe' (Win32): Unloaded '...\2024.1.0\resource\libs\win64\svml_dispmd.dll' The thread 0x75f4 has exited with code 0 (0x0). The thread 0x2370 has exited with code 0 (0x0). The thread 0x49b4 has exited with code 0 (0x0). The thread 0x2ba0 has exited with code 0 (0x0). The thread 0x6824 has exited with code 0 (0x0). The thread 0x2330 has exited with code 0 (0x0). The thread 0x3fbc has exited with code 0 (0x0). The thread 0x9c8 has exited with code 0 (0x0). The thread 0x7378 has exited with code 0 (0x0). The thread 0x7740 has exited with code 0 (0x0). The thread 0x5a8c has exited with code 0 (0x0). The thread 0x7334 has exited with code 0 (0x0). The thread 0x54e0 has exited with code 0 (0x0). The thread 0x4a08 has exited with code 0 (0x0). The thread 0x1dd8 has exited with code 0 (0x0). The thread 0x778c has exited with code 0 (0x0). The thread 0x24e8 has exited with code 0 (0x0). The thread 0x1720 has exited with code 0 (0x0). The thread 0x1990 has exited with code 0 (0x0). The thread 0x6d30 has exited with code 0 (0x0). The thread 0x670 has exited with code 0 (0x0). The thread 0x774c has exited with code 0 (0x0). The thread 0x6008 has exited with code 0 (0x0). The thread 0x4094 has exited with code 0 (0x0). The thread 0x60b0 has exited with code 0 (0x0). The thread 0x5124 has exited with code 0 (0x0). The thread 0xae8 has exited with code 0 (0x0). The thread 0x5484 has exited with code 0 (0x0). The thread 0x4ef0 has exited with code 0 (0x0). The thread 0x594c has exited with code 0 (0x0). The thread 0x578c has exited with code 0 (0x0). The thread 0x1fb4 has exited with code 0 (0x0). The thread 0x3058 has exited with code 0 (0x0). The thread 0x3a9c has exited with code 0 (0x0). The thread 0x5ee4 has exited with code 0 (0x0). The thread 0x6c04 has exited with code 0 (0x0). The thread 0x66bc has exited with code 0 (0x0). The thread 0x6234 has exited with code 0 (0x0). The thread 0xf84 has exited with code 0 (0x0). The thread 0x30e4 has exited with code 0 (0x0). The thread 0x766c has exited with code 0 (0x0). The thread 0x484 has exited with code 0 (0x0). The thread 0x38f8 has exited with code 0 (0x0). The thread 0x4068 has exited with code 0 (0x0). The thread 0x3628 has exited with code 0 (0x0). The thread 0x3010 has exited with code 0 (0x0). The thread 0x5eb8 has exited with code 0 (0x0). The thread 0x5df0 has exited with code 0 (0x0). The thread 0x2c44 has exited with code 0 (0x0). The thread 0x39dc has exited with code 0 (0x0). The thread 0x3edc has exited with code 0 (0x0). The thread 0x35f8 has exited with code 0 (0x0). The thread 0x4278 has exited with code 0 (0x0). The thread 0x3bb8 has exited with code 0 (0x0). The thread 0x5018 has exited with code 0 (0x0). The thread 0x1ecc has exited with code 0 (0x0). The thread 0x6450 has exited with code 0 (0x0). The thread 0x6214 has exited with code 0 (0x0). The thread 0x1ea0 has exited with code 0 (0x0). The thread 0x243c has exited with code 0 (0x0). The thread 0x2dd4 has exited with code 0 (0x0). The thread 0x2d68 has exited with code 0 (0x0). The thread 0x6aa4 has exited with code 0 (0x0). The thread 0x49c8 has exited with code 0 (0x0). The thread 0x3e84 has exited with code 0 (0x0). The thread 0x3348 has exited with code 0 (0x0). The thread 0x247c has exited with code 0 (0x0). The thread 0x2430 has exited with code 0 (0x0). The thread 0x2f90 has exited with code 0 (0x0). The thread 0x10c has exited with code 0 (0x0). The thread 0x6d14 has exited with code 0 (0x0). The thread 0x1ee4 has exited with code 0 (0x0). The program '[28656] Cinema 4D.exe' has exited with code 0 (0x0).
  • Access values of an RS material in Python?

    python
    2
    0 Votes
    2 Posts
    620 Views
    J
    Hello @ryanjp, Welcome to the Plugin Café forum and the Cinema 4D development 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 Guidelines, as they line out details about the Maxon SDK Group support procedures. Of special importance are: Support Procedures: Scope of Support: Lines out the things we will do and what we will not do. Support Procedures: Confidential Data: Most questions should be accompanied by code but code cannot always be shared publicly. This section explains how to share code confidentially with Maxon. Forum Structure and Features: Lines out how the forum works. Structure of a Question: Lines out how to ask a good technical question. It is not mandatory to follow this exactly, but you should follow the idea of keeping things short and mentioning your primary question in a clear manner. About your First Question We were not sure to which RS material type you are referring - Xpresso based RS material or the RS node material. Here are informations for both: Node API Python examples, mostly focusing on material nodes: https://github.com/PluginCafe/cinema4d_py_sdk_extended/tree/master/scripts/05_modules/node Example for a general pattern for writing an "material converter", here at the example of mapping material models in the RS Xpresso system to the standard material model space. https://developers.maxon.net/forum/topic/14753/script-that-converts-redshift-materials-back-to-c4d-standard-ones/20 Note: In 2024 Redshift renamed all attributes in its legacy material type RS C4D Shader, with the result that the MAPPINGS data defined in the script is incorrect now. While one can easily update the mappings, many ports are just named Color now. You either have to use IDs in the meantime or wait for the update which fixes this port naming issue. Cheers Jana
  • How to use GetChildren() in c++?

    c++
    3
    1
    0 Votes
    3 Posts
    664 Views
    L
    @ferdinand That is great! Thanks!
  • c4d.documents.SaveProject() preventing future save commands

    2023 python
    2
    0 Votes
    2 Posts
    616 Views
    ferdinandF
    Hello @Aeoll-0, Thank you for reaching out to us. You should be a bit more specific about the circumstances and which you are using the command. As declared in our Support Guidelines, you should always post executable code, as we are otherwise are guessing what you are doing. The self.filedir implies that this happens in a method, which in turn could mean that you are trying to do this off-main-thread. This is not allowed. I also gave it a spin myself, and for me it works. Note that after the operation, the opened file is not the old file anymore. So, when you had a \data\a\myfile.c4d and saved to backup\a\, the opened file will be backup\a\myfile.c4d and not \data\a\myfile.c4d. Because of that, such newly "exported" documents will also induce thumbnail rendering. When you are trying to save many documents at once in this manner, the thumbnail rendering could make Cinema unresponsive. The path into which you want to dump things must also exist, Cinema 4D cannot create it for you. I have tested this in 2023.2.2 and 2024.1.0 and found no problems in both versions. Cheers, Ferdinand Result: [image: 1699977932661-34f18c02-cc1d-42ef-94ac-d50f2ad57195-image.png] Successfully saved project to: 'e:\projects\foo\', exporting the assets: [{'filename': 'e:\\projects\\foo\\myfile.c4d', 'assetname': 'myfile.c4d', 'channelId': 0, 'netRequestOnDemand': False}, {'filename': 'e:\\projects\\foo\\tex\\Maxon-Computer-Logo.jpg', 'assetname': 'E:\\temp\\Maxon-Computer-Logo.jpg', 'channelId': 0, 'netRequestOnDemand': True}]. Code: import c4d import os doc: c4d.documents.BaseDocument # The active document def main() -> None: """ """ # Cinema 4D cannot create the directory path for us, we must ensure that #path does exist. path: str = "e:\\projects\\foo\\" if not os.path.exists(path): os.makedirs(path) # Your settings. flags: int = (c4d.SAVEPROJECT_ASSETS | c4d.SAVEPROJECT_SCENEFILE | c4d.SAVEPROJECT_USEDOCUMENTNAMEASFILENAME) data: list = [doc, flags, path, [], []] # Invoke the command and raise errors on failure or missing assets. if not c4d.documents.SaveProject(*data): raise IOError(f"Could not save project to: '{path}'.") if data[4]: raise IOError(f"Failed to export the following assets: {data[4]}") # Success :) print (f"Successfully saved project to: '{path}', exporting the assets: {data[3]}.") if __name__ == '__main__': main()