Like this post if you are using the new Node System to create features.
Posts made by kbar
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!
@rui_mac said in Updating my r20 C++ plugins to r21 and up:
However, is there a description on how to start clean?
My first tutorial goes through from having absolutely nothing to being able to compile the sample SDK. It takes you through every step required without assuming any prior experience.
https://www.youtube.com/playlist?list=PLEPTxkpDVvX0r292yn8xL39Cm3Wi3E69i
Hi @ferdinand,
I will see if I can get a URL to you next week to debug on your end.
I went with C++ because that suited me better for the project. I compile libCurl already for every version of C4D from R20 to S26 so it is not a problem to keep using it. It works well. But I try to use the maxon API when I can if it works for my needs.
I know python has all of this nailed down. But I do all my development in C++ for a variety of reasons so I am sticking with that for now. I deal with Gigabytes of data transfer daily so there is a lot of complexity that I know how to deal with in C++, but in python I have only scratched the surface of it in regards to C4D integration. So threading and fine grained control over memory was always a worry if I was to jump ship.
@indexofrefraction said in Insert a shader into a shader hierarchy:
this "Active Object Dialog" plugin looks very interesting
if it would be understandably described how to compile it / the c++ sdk, we could check it out
but sadly this got so complicated that you need a degree in IT to do it. .-)
The first video in my tutorial series shows you how to compile the SDK example plugins.
Just had a look at maxon::FileUtilities::ReadFileToMemory and I can't use that unfortunately, since I am downloading large files and need to chunk download them to disk to show progress information. It looks like ReadFileToMemory downloads the full file in one go, so only useful for very small files. So I will have to go back to libCurl.
Hi @ferdinand,
Thanks for looking into it.
I can't share a URL since it is a file on Cloudflare. I could send one directly via email with a longer expiry time for people to test. But if there is no desire to fix the Maxon API then it may not be worth it? And since I also need it to work in R20 onwards a fix wouldn't help me anyway in this case.
I will try your suggestion of maxon::FileUtilities::ReadFileToMemory and see if that helps, but it feels like I may have to remove all my code that uses the Maxon API and go back to libCurl instead. The maxon API works fine for AWS S3, but seems unreliable for other providers.
Cheers,
Kent
I am trying to download a file and maxon::Url::OpenInputStream() returns an error with the message "partial get response (206) missing".
Does maxon::Url support partial content?
The same url when pasted into a webbrowser downloads the file just fine. So it seems to me that maxon::Url is not yet fully complete.
maxon::Url webFile("https:://myurltoafile");
iferr(maxon::InputStreamRef inputStream = webFile.OpenInputStream())
{
LogMessage(err.GetMessage(), MAXON_SOURCE_LOCATION);
return;
}
@lasselauch said in How to find the CallCommand id for Redshift 'Convert and Replace with Nodes':
AFK currently, but I think you can open the "Script Log..." from the Extensions Menu to check the ID's right!?
Wow. Can't believe I have never seen this before. I have been digging through the command manager for years like a cave man.
I am trying to figure out the id for the command "Convert and Replace with Nodes'.
This can be found from the Redshift menu here:
But if you look for this in the Command Manager it can not be found. But the one above it 'Convert to Nodes' can be found.
If you undock that panel it ends up looking like the following image, notice how 'Convert and Replace with Nodes' is now gone.
The 'Convert and Replace with Nodes' only appears if you hold down your mouse on the 'Convert to Nodes' entry.
What is this menu? How can we located the id for this 'special' menu entry? What does it mean when you have to hold down your mouse on a button and this popup appears? Is this something new in R25 onwards? I don't recall ever seeing something like this before.
Was just searching for something related and came across this post and thought I would also point out my site that also displays all the data from the resource files.
https://plugins4d.com/Description/Nodes
Here is the page for GVSpline: https://plugins4d.com/Description/Node?containerName=GVspline
It is similar to the documentation now supplied in the official maxon docs.
Is it possible to programmatically create a palette with commands that I specify? I would like to be able to create palettes on demand with certain commands so that a user can dock them.
I would like to open up the Script Manager and make it display a specific script.
Is this possible in C++ for R20 to S26?
I saw the CodeEditor_Open function, but that seems built for a completely different purpose.
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