Like this post if you are a Python Developer.
Best posts made by kbar
I created a short series of getting started videos for anyone just starting out developing C++ plugins for Cinema 4D. I hope you find them useful.
https://www.youtube.com/playlist?list=PLEPTxkpDVvX0r292yn8xL39Cm3Wi3E69i
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.
Hi everyone,
I have released a plugin I use to create documentation for my plugins.
The plugin is free. Currently available for R20 for Windows. I will add an OSX version if people ask for it.
https://www.plugins4d.com/docs
If you use it for anything let me know. Also if you have any features requests then send them my way.
Cheers,
Kent
I have posted my source code for the integration of Peter Shirleys Ray Tracing In One Weekend series to github.
https://github.com/kentbarber/rtow4d
This might be of interest to anyone wanting to play around with writing their own ray tracer.
You can also download a compiled version from here: https://plugins4d.com/Product/FunRay
Cheers,
Kent
Like this post if you are using the new Node System to create features.
Try using the absolute path to where your sdk is: /Users/YourName/Documents/C4D/sdk
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/page_maxonapi_projecttool.html
g_updateproject: Defines the folder the tool should work on. Currently the tool only accepts absolute paths. This is typically the location of the SDK including frameworks and plugins. See SDK Overview.
You can use SetPluginPriority to tell your plugins to load in a specific order. IE tell some plugins to load after others have been loaded. Useful in cases where one of your plugins may register a library that your other plugins need to access as they start up.
Yesterday I helped someone out with a question. Now they have marked it as deleted. The only reason I would help out on this forum is to help everyone and add to the knowledge pool here in this forum.
So please... do NOT delete your post if you received the answer you were looking for.
I just found that in S22 they have inverted the behaviour of a flag for GetAllAssets.
In R21 there existed a flag ASSETDATA_FLAG::MISSING.
From S22 onwards the functionality of this flag has been inverted and it is now called ASSETDATA_FLAG::NOMISSING.
The problem is that it sets the exact same bit.
So if you have a plugin that is compiled against R21 and your users use it in S22 then your code will not be getting the missing assets anymore, since this bit is set (if you use the MISSING flag) and it will now mean DO NOT get missing assets.
Compiling against the S22 SDK and removing the MISSING flag will fix your bugs if you have any.
Just something to watch out for if anyone is hearing of problems from your users relating to gather up assets. Mainly applies to people writing renderers and dealing with textures and materials.
Cheers,
Kent
Latest posts made by kbar
@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.
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.
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
Like this post if you are using the new Node System to create features.
Like this post if you are a Python Developer.
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.
Here is the link x_nerve mentioned for my tutorials. The first one compiles the SDK examples.
I was reading through this to see if you used a Debug build. Glad you finally found it. I assume what you were doing was compiling on one machine in Debug mode and then just copying the plugin to your second machine to try it out. That second machine wouldn't have had Visual Studio installed so it wouldn't have had the debug runtime dlls, so your plugin wouldn't have loaded. Always compile in Release mode if you are going to test your plugin on another machine, or if you are giving the plugin to someone to test out.
I am trying to figure out how to display ObjectData information when the object itself it is not directly in the Object Manager.
I have an ObjectData node that contains a GeListHead, which is parented to it. This object is actually in the scene and shows in the Object Manager list.
The GeListHead contains other ObjectData nodes.
I would like to be able to display the data for the child nodes of the GeListHead in the Attribute Manager. But I am finding that if I call ActiveObjectManager_SetObject then the nodes descriptions are only visable in the Attribute Manager until the next EventAdd is called, then it reverts back to whatever is selected in the Object Manager itself.
class MyObject : public ObjectData
{
public:
virtual Bool Init(GeListNode *node)
{
_objects->SetParent(node);
}
void ShowData()
{
BaseObject* pObj = (BaseObject* )_objects->GetFirst();
ActiveObjectManager_SetObject(ACTIVEOBJECTMODE::OBJECT, pObj, ACTIVEOBJECTMANAGER_SETOBJECTS_OPEN);
EventAdd();
}
private:
AutoAlloc<GeListHead> _objects;
};
Is ActiveObjectManager_SetObject able to be used this way?
Alternatively how does the Xpresso editor work? How does it ensure the selected Xpresso nodes data gets displayed in the Attribute Manager? Would it work if I used the same approach as above but instead used a TagData plugin that contains the GeListHead?
Thanks,
Kent
I am trying to do what is described in this old thread.
https://plugincafe.maxon.net/topic/6844/7627_how-to-use-handlemousedrag?_=1664942133957
Basically I have a c4d file on disk that I have the Filename for, I then start a HandleMouseDrag from my GeUserArea and want to be able to drop it into the Viewport or Object Manager and have it load.
So far with my testing none of the following types work.
- DRAGTYPE_FILES
- DRAGTYPE_FILENAME_SCENE
- DRAGTYPE_FILENAME_OTHER
So I have instead tried doing it via a different approach. I am loading the document, grabbing some models from the scene, adding them to an AtomArray and then doing a HandleMouseDrag using the type DRAGTYPE_ATOMARRAY. But this only seems to work when dropping into the Object Manager. If you drop it over the viewport then nothing happens.
Is there anyway to be able initiate a drag drop from a GeUserArea and have C4D merge the file that is dropped? Or is there a way to manually do it an have the Viewport accepted the dropped content? Needs to work in R20 to 2023.
Thanks!