• Sample Code for Connecting Ports/Nodes?

    Cinema 4D SDK r25 python
    4
    1
    0 Votes
    4 Posts
    497 Views
    ManuelM
    hi, There are no particular reasons. Muting a connection is less intuitive than connect two nodes. If there was a function like Connect to mute the connexion, we would not have created that example neither. Cheers, Manuel
  • older documentation links?

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    366 Views
    B
    @fwilleke80 Gotcha thanks for the confirmation. So I guess they don't host it online? But man they are already using sphinx. They can easily have a button to switch to previous versions. But oh well.
  • create_nodematerial.py from Github not working

    Cinema 4D SDK r25
    5
    0 Votes
    5 Posts
    647 Views
    M
    Hi @bentraje I think there was a small misscommunication what was fixed on Github was the fact that the file does not contain the information of which Cinema 4D version they are working. We are not going to adapt our GitHub script to make it work for R25. If you want code that is going to work for R25, the only solution is to download the python SDK for R25. Cheers, Maxime.
  • 0 Votes
    7 Posts
    1k Views
    M
    Hello @fwilleke80, without further questions or postings, we will consider this topic as solved by Thursday 01/06/2023 and flag it accordingly. Thank you for your understanding, Maxime.
  • Updating my r20 C++ plugins to r21 and up

    Cinema 4D SDK
    9
    0 Votes
    9 Posts
    2k Views
    R
    @kbar, thank SO MUCH. I will look into it.
  • Development versions

    Moved Bugs
    3
    0 Votes
    3 Posts
    998 Views
    C4DSC
    Thanks for the link to the updated page on the dev blog.
  • 0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hey @everyone, Yes, the Script Log can be quite handy, especially in cases like these where no symbols do exist. But one should also keep in mind that integer identifiers can sometimes change, and we do not publish such information then. It is therefore best to use the symbols when they exist, as doing so will avoid that problem. Cheers, Ferdinand
  • Plugin causes Render Region to turn black

    Cinema 4D SDK c++ r25 r23 r21
    3
    0 Votes
    3 Posts
    804 Views
    Danchyg1337D
    Hello! Sorry for not providing any specific info about the problem, it was not really aything to provide in fact. Your last guess about document related stuff is absolutely correct. There is a piece of code responsible for handling a license which was indeed using documents. Thanks!
  • Files and modules organization

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    865 Views
    R
    AWESOME! Thanks @ferdinand!!!
  • Get parameter value at given time.

    Cinema 4D SDK r25 windows c++
    8
    0 Votes
    8 Posts
    2k Views
    D
    Hi @ferdinand and @Cairyn, thanks for the answers. There may be a simpler way to achieve an effect similar to what we want (for example, by caching the world matrix at the time t) but I'm still thinking of alternate ways to be able to access the full mesh information at time t. Caching the full mesh is probably not a good option since we would have to update that cache every time the mesh is changed at any time before t (since this might change the mesh at t). A possible option is to restrict the usability a bit and always evaluate the mesh at time 0, I'm checking if this is something we can do. Feedback loops could be an issue, but it should never happen that (using the example @ferdinand wrote) P relies on T and T also relies on P in this specific plugin. Also, t should always be a time before the current time, although that might not alleviate this particular problem. In any case, I'm going to go ahead and mark this as solved, I think I got all the information I need to find a solution. Thank you both very much for helping me out, Daniel
  • Python writing to desktop

    Moved General Talk python r25
    4
    0 Votes
    4 Posts
    1k Views
    ferdinandF
    Hello @Peek, without any further questions or other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022. Thank you for your understanding, Ferdinand
  • 1 Votes
    10 Posts
    2k Views
    fwilleke80F
    @m_adam said in macOS Monterey - Can't run source processor anymore?: 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. Hi Adam! That is in deed what I tried, creating a symlink that points to Python 3. I didn't use the paths, though, but just linked the word "python" to "python3". I guess that was my mistake. Wouldn't it be easier for Maxon and everybody else, if you just changed the preprocessor call in the projects' PreBuild events to "python3", instead of having to go the symlink way and change things on users' computers (which, I guess, will have side effects when users later decide to install Python 2.7 for some reason)? Cheers, Frank
  • Add Database to the Asset Browser

    Cinema 4D SDK c++ r25 s26 sdk
    2
    0 Votes
    2 Posts
    525 Views
    ferdinandF
    Hey @kbar, thank you for reaching out to us. How to add asset databases and others things are all explained in the Asset API Handbook. Your specific case is dealt with in the example Add User Databases. You can technically also take a route via the Asset Browser preferences in the Cinema 4D Preferences dialog and the GUI gadget showing these database entries, completely ignoring the Asset API, but I would not recommend doing this. Cheers, Ferdinand
  • 0 Votes
    12 Posts
    2k Views
    ManuelM
    hi, Sorry for the late reply, but this needed investigation and test from my side and communication between me and the dev. You can create the NodeTemplate that way. I am using the class GradientWorkaround to create the template. NodesLib::BuildNodeFromDescription must be called with false set to not create the dependency wires. NodeTemplate t = NodesLib::CreateLazyTemplate(firstNodeId, [firstNodeId]() -> Result<NodeTemplate> { iferr_scope; maxon::nodes::NodeTemplate templ = maxon::nodes::NodesLib::BuildNodeFromDescription(firstNodeId, CoreNodesNodeSystemClass(), false) iferr_return; templ = GradientWorkaround::CreateInit(templ) iferr_return; return templ; }, CoreNodesNodeSystemClass()) iferr_return; The class itself look like this. We can create a gradient node inside the usernode itself and connect the ports. This is done inside the function InstantiateImpl. class GradientWorkaround : public maxon::Component<GradientWorkaround, maxon::nodes::NodeTemplateInterface> { MAXON_COMPONENT(NORMAL, maxon::nodes::NodeTemplateBaseClass); public: maxon::ResultOk<void> Init(const maxon::nodes::NodeTemplate& templ) { _wrapped = templ; return maxon::OK; } MAXON_METHOD maxon::Result<Bool> SupportsImpl(const maxon::nodes::NodeSystemClass& cls) const { return cls.IsSubclassOf(CoreNodesNodeSystemClass()); } MAXON_METHOD maxon::Result<maxon::nodes::NodeSystem> InstantiateImpl(const maxon::nodes::InstantiationTrace& parent, const maxon::nodes::TemplateArguments& args) const { iferr_scope; maxon::nodes::NodeSystem sys = _wrapped.Instantiate(parent, args) iferr_return; maxon::nodes::MutableRoot root = sys.BeginInstantiationModification(self) iferr_return; // Asset ID : net.maxon.pattern.node.generator.gradient const AssetRepositoryRef& repository = AssetInterface::GetBuiltinRepository(); nodes::NodeTemplate gradient = nodes::NodesLib::LoadTemplate(repository, Id("net.maxon.pattern.node.generator.gradient")) iferr_return; MutableNode gradientNode = root.AddChild(Id("Gradient"), gradient) iferr_return; const maxon::nodes::MutablePort output = root.GetOutputs().FindPort(maxon::Id("testoutput")) iferr_return; const maxon::nodes::MutablePort gradientPort = root.GetInputs().FindPort(maxon::Id("gradient")) iferr_return; const maxon::nodes::MutablePort gradientResult = gradientNode.GetOutputs().FindPort(maxon::Id("result")) iferr_return; const maxon::nodes::MutablePort gradientGradient = gradientNode.GetInputs().FindPort(maxon::Id("gradient")) iferr_return; gradientResult.Connect(output) iferr_return; gradientPort.Connect(gradientGradient) iferr_return; sys = root.EndModification() iferr_return; return sys; } private: maxon::nodes::NodeTemplate _wrapped; }; MAXON_COMPONENT_CLASS_REGISTER(GradientWorkaround, "net.maxonexample.nodes.class.gradientworkaround"); It is just like having a group of nodes and propagated ports. Cheers, Manuel
  • Get the Panel Type Under Cursor?

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    378 Views
    ferdinandF
    Hello @bentraje, without any further questions or other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022. Thank you for your understanding, Ferdinand
  • Accessing the World Grid Options in R25+?

    Cinema 4D SDK r25 python
    3
    1
    0 Votes
    3 Posts
    669 Views
    ManuelM
    hi, i confirm this is the right way of doing it. Be aware that the legacy mode has been removed now from the UI but is still accessible from python. If you define the legacy mode, the user will not be able to get back to normal mode. Cheers, Manuel
  • Call plugin by python script with arguments

    Cinema 4D SDK r25 python
    3
    0 Votes
    3 Posts
    687 Views
    kosmos3dK
    @m_magalhaes Thank you very much for your reply. Target was to let user run my plugin in pyton script without open its gui, but set options by some command. Meanwhile I came to solution by implementing ExecuteOptionID method. In this way user first sets options in gui and after can CallCommand anywhere he wants in scripts. Again thank you for your time.
  • 0 Votes
    4 Posts
    768 Views
    M
    Hi this bug was fixed with release 2023.0 of Cinema 4D. Cheers, Maxime.
  • 0 Votes
    7 Posts
    829 Views
    ferdinandF
    Hello @thecomishy, without any further questions and other postings, we will consider this topic as solved and flag it as such by Friday, 17/06/2022. Thank you for your understanding, Ferdinand
  • Add values for enum data type (node graph)

    Cinema 4D SDK c++ r25
    9
    0 Votes
    9 Posts
    2k Views
    O
    Hello, Thanks for the code. Regarding the second one, I have tried it and also mentioned in the first message that the data does not get added and the array size still stays 0. I had forgotten to put iferr_return and now with your example, I am getting a critical error when trying to append those data. RefMemberType<S> CritStop() { CriticalOutput(static_cast<const typename S::ReferenceClass*>(this)->ToString()); return this->PrivateGetRefMember(); }