@m_adam that is unfortunate.

Posts made by kbar
-
RE: How to handle AddDependence hh deprecation in 2024 onwards
-
RE: Continuously refresh the render result to the view port
@freeze I wrote this a few years back which might give you a good starting point.
https://plugins4d.com/Product/FunRay
https://github.com/kentbarber/rtow4dCheers,
Kent -
How to handle AddDependence hh deprecation in 2024 onwards
I have an ObjectPlugin written in Python.
It implements def GetVirtualObjects(self, op, hierarchyhelp)
Inside I am calling AddDependence
The following code produces an warning in 2024 and 2025: PendingDeprecationWarning: The 'hh' argument is not used since 2024.0 and will be removed in 2025.0. Since it is happening in GetVirtualObjects this error gets printed out 100's of thousands of times currently, leading to an eventual lockup.
for obj in ObjList: op.AddDependence(hierarchyhelp, obj)
It seems that I can't simply remove hierarchyhelp since that causes another error.
I can't seem to find any documentation on this other than to say that hh is deprecated, but no additional info saying what we should do to fix it. Since the help docs still contain hierarchyhelp as the first input to the method.
Thanks,
Kent -
How to correctly get maxon::NimbusInterface?
I noticed a new function in 2025 called FindOrCreateCorrespondingBaseList.
I went looking to see if I can find the corresponding function that works in 2023/2024 and it seems to be NbmFindOrCreateCorrespondingBaseList.
The code below seems to work, but I just want to make sure that casting from maxon::NimbusBaseRef to maxon::NimbusInterface* is actually correct.
(maxon::NimbusInterface*)nbmBase
I can't seem to find any documentation about this anywhere.
Thanks,
Kentmaxon::NimbusForwardRef nimbusRef = material->GetNimbusRef(maxon::Id("com.autodesk.arnold.nodespace")); maxon::NimbusBaseRef &nimbusBaseRef = nimbusRef.GetBase(); // This is in 2025 an up // BaseList2D* imageNodeBaseObject = nimbusBaseRef.FindOrCreateCorrespondingBaseList(imageNode.GetPath()) iferr_ignore(""_s); // This is for 2023 and 2024 maxon::NimbusBaseInterface* nbmBase = nimbusBaseRef.GetPointer(); const maxon::CString& nodePath = imageNode.GetPath().ToCString() iferr_ignore(""_s); BaseList2D* imageNodeBaseObject = NbmFindOrCreateCorrespondingBaseList((maxon::NimbusInterface*)nbmBase, nodePath) iferr_ignore(""_s); DescID texturePathID; // This is in 2025 and up //nimbusBaseRef.GetDescID(filenamePort.GetPath(), texturePathID); // This is for 2023 and 2024 NbmPortToDescID((maxon::NimbusInterface*)nbmBase, imageNode, filenamePort, texturePathID);
-
RE: BaseBitmap Save TIF with LZW and save EXR using ZIP
Great! That makes it so much easier. I will give this a try today.
With the classic BaseBitmap API I also had to pass in that I wanted it to be INITBITMAPFLAGS::GRAYSCALE when saving a greyscale image. And I also passed in the SAVEBIT settings such as SAVEBIT::USE16BITCHANNELS. Does this still need to be done when using the Maxon API? I had a quick look at the docs page but couldn't find anything that relates directly to this, will have a closer look later today.
Thanks @ferdinand !
-
BaseBitmap Save TIF with LZW and save EXR using ZIP
Hi team!
Is it possible to using any of the compression algorithms with the classic BaseBitmap->Save, where we pass in a BaseContainer with settings? I would like to save out TIF files with LZW and also EXR with ZIP.
I do see that these compression algorithms are available in the new Maxon API. So perhaps an alternative question would be how can I use the Maxon API ImageSaverClasses to save a file with compression if I have a BaseBitmap as the source?
I will also outline what I want to actually achieve, and that is to downsize images from 8k to 4k, which is working fine, but I would just like to keep the original compression that we are using when saving the 4k versions. So a third alternative to solve my problem may actually be to use the Maxon API for everything, loading, resizing and then saving (with a specified compression).
I am open to using whatever is the easiest solution out of the above. If I can somehow tell the BaseBitmap saver to do what is needed then that is all I really need.
Thanks,
Kent -
RE: How to use GetAllNimbusRefs in 2023
Thanks @ferdinand! Appreciate everything you do. Also what the rest of the sdk support and docs team are doing! Not an easy job keeping on top of all these changes.
-
RE: How to use GetAllNimbusRefs in 2023
Thanks @ferdinand,
I thought it must have been a missing framework, my eyes just didn't see nodespace.framework in the frameworks folder otherwise I would have tried that.
Adding the nodespace.framework and including "maxon/nimbusbase.h" is what did the trick.
Sharing my full code wouldn't have helped, since the issue was that I didn't have the framework, otherwise I would have found the header file during my searches.
It would be great if the documentation samples could somehow also mention what frameworks they require to get them to run.
Unfortunately I won't be able to use it due to the use of the nodespace.framework, since I am still providing supporting back to R20 and it gets messy altering/swapping out projectdefinition.txt files to support additional frameworks.
Also thanks for the tip on the MaterialNodeSpaces registry, although I have no idea how to use that at all. But will keep it in mind for future.
My intention was not to write a diary. I was just trying to provide as much information as I could. Since it seemed simple, and it was... ie missing framework.
I sometimes forget that this site is no longer a community and is really just a support system. I am still used to the old days of being able to provide info and have discussions with other developers. I will refrain from doing this from now on.
Thanks again!
Kent -
How to use GetAllNimbusRefs in 2023
Hi,
I am trying to call the following code in 2023. From this page.// Print all the NodeSpace ID from the selected material. In practice we should // test if mat is a nullptr before proceeding. BaseMaterial* mat = doc->GetActiveMaterial(); // The error handling needs to have an error context defined with either iferr_scope or iffer_handler. const maxon::HashMap<maxon::Id, maxon::NimbusForwardRef> hashNimbusRefs = mat->GetAllNimbusRefs() iferr_return; for (const auto& e : hashNimbusRefs) { const maxon::Id& key = e.GetKey(); const maxon::NimbusBaseRef nimbusRef = e.GetValue().GetBase(); ApplicationOutput("NodeSpace ID: @"_s, key); }
I get the following errors in my code.
Error C2079 'nimbusRef' uses undefined class 'maxon::NimbusBaseRef' Error C2027 use of undefined type 'maxon::NimbusBaseRef'
I have the nodes.framework and the graph framework installed (and actually use it in places as well). But looking through the maxon code I can't find where NimbusBaseRef is supposed to be defined.
I see the following in operatingsystem.hclass NimbusBaseRef; using NimbusForwardRef = ForwardRefWithExtraBase<NimbusRef, NimbusBaseRef>;
Is there some other framework that I am supposed to use so that this code will compile?
I tend to find this a lot with the documentation, where it will have the code I need, but not tell me the header file to include, or the required framework to use it.Thanks.
edited by @ferdinand:
@kbar wrote:
Actually looks like I don't have the graph.framework for this project. I will add that and see if it fixes the issue.
Unfortunately adding graph.framework did not fix the issue.
I case anyone is reading this I went back to using the following alternative, checking for an exact node space to see if it is what I am looking for, in this case redshift.
BaseMaterial *pMat = //the passed in material Int32 matID = pMat->GetType(); Bool isRSNode = false; // Documentation states this is always safe to cast NodeMaterial* pNodeMat = static_cast<NodeMaterial*>(pMat); if (matID == Mmaterial) { if (pNodeMat->HasSpace(maxon::Id("com.redshift3d.redshift4c4d.class.nodespace"))) isRSNode = true; }
-
Plugin Developer Job opening at Greyscalegorilla
Hey everyone,
We have a job opening at Greyscalegorilla for a plugin developer. Come and work with me on some fun projects.
https://greyscalegorilla.com/jobs/jobs-3d-plugin-developer/
Cheers,
Kent -
Message on "Quit and Free License"
Is there some way to receive a message, and run a function, when a users presses "Quit and Free License"?
-
How to set options when saving TIF file
Is it possible to set the Byte Order and Compression values when saving a TIF?
BaseContainer bc; //What do we set here? bmp->Save(tiffFile, FILTER_TIF, &bc, SAVEBIT::USE16BITCHANNELS);
-
"maxon::GenericData &extraData" is not documented
Is it supposed to be the data returned from calling DirectInitSampling?
-
RE: How to find and delete a node in a NodeGraph?
@ferdinand said in How to find and delete a node in a NodeGraph?:
Fig. I: The two IDs are displayed in the node editor info panel for the selected node. Make sure to have Preferences\Node Editor\Ids enabled to also see the node ID in addition to the asset ID.
I didn't know about this! I have been copying and pasting the selected nodes into a text editor up until now, which in itself is a very cool feature.
-
RE: How to find and delete a node in a NodeGraph?
Thanks @ferdinand and @Dunhou! Using FindNodesByAssetId has done the trick.
Unfortunately I can't jump to using the latest frameworks for everything just yet, but I will make sure to use the new methods for anything in 2024 onwards.
-
How to find and delete a node in a NodeGraph?
I have a redshift material node graph. I would like to delete the default Material (com.redshift3d.redshift4c4d.nodes.core.material) within that graph. I can't figure out how to find this node or how to delete it once I find it.
BaseMaterial* pMat = BaseMaterial::Alloc(Mmaterial); NodeMaterial* pNodeMat = static_cast<NodeMaterial*>(pMat); pNodeMat->AddGraph(RedshiftNodeSpaceIds::nodespace) iferr_return; const maxon::nodes::NodesGraphModelRef& nodeGraph = pNodeMat->GetGraph(nodeSpaceID) iferr_return; const maxon::GraphNode rootNode = nodeGraph.GetRoot(); maxon::NodePath materialNodePath; pNodeMat->GetMaterialNodePath(nodeSpaceID, materialNodePath) iferr_return; materialNode = nodeGraph.GetNode(materialNodePath);
materialNode now contains a node with the id "com.redshift3d.redshift4c4d.nodes.core.material". I only know this because I can see it in the NodeGraph editor in C4D. How do I find this node and how can I delete it?
Thanks!
Kent -
RE: How many C++ and Python devs do we have here?
Like this post if you are using the new Node System to create features.
-
RE: How many C++ and Python devs do we have here?
Like this post if you are a Python Developer.
-
How many C++ and Python devs do we have here?
I am just curious to know how many C++ developers we have here.
Since we don't have polls on this forum can you do the following...
Like this post if you are a C++ Developer.