Thanks for the offer. much appreciated. But your explanations were good and plenty as usual.
I think, I know exactly what is going on.
Posts made by a_block
-
RE: CRITICAL: Stop when calling SetWorldPluginData
-
RE: CRITICAL: Stop when calling SetWorldPluginData
Thanks so much, Ferdinand.
This helped me a lot and also this message being changed in 2023.2 explains a lot for me.Unfortunately at the current point I am not in a position to make any of our code public. In consequence there is little to learn here for other readers. Sorry!
-
CRITICAL: Stop when calling SetWorldPluginData
Hi,
I'm developing a Python plugin on Win with C4D 2023.2.0 / 2023.CL399467.5638.
The question is, what does it mean, if i get "CRITICAL: Stop [btree_container.cpp(2551)]" in debug console, when calling
c4d.plugins.SetWorldPluginData()
?At first I thought, it was related to me stupidly trying to call
c4d.plugins.SetWorldPluginData()
from a thread. But after fixing this, I now get this on the main thread, too. I double checked, that the types when accessing the containers are correct (I mean, when writing into or reading from my own plugin's "world container").
Pretty sure, I overlooked something stupid, therefore I hope any hint on what may cause above critical stop will point me into thee right direction.Thanks in advance,
Andreas -
RE: Quicktabs in dynamic prefs description
Hi Ferdinand,
always a pleasure to ask you something. Thanks, for the quick and thorough answer.
I am as stupid as a slice of bread (no insult to the bread).
I hadn't even considered including Fbase, as it is no "filter" plugin and I did not want the Presets group.
So, my actual question was more. how to create those tabs on top dynamically myself?
But of course I can simply hide the preset group. Bam, working nicely. Forget the original question.Thanks again for your effort!
Cheers,
Andreas -
Quicktabs in dynamic prefs description
Hi,
I am aware of this thread (and even gave the answer there myself): https://developers.maxon.net/forum/topic/8853/11700_quicktabcustomgui-inside-getddescriptionsolved
I just want to ask if anything has changed in this regard. So:
I'd like to achieve a "tabbed group" switching, as seen below in Im-/Exporter preferences. In my plugin I would need to be able to provide this with a dynamic description inside of a PrefData. Is it still true, that I have no means to setup and configure a CUSTOMGUI_QUICKTAB from code in a description? Or are there other widgets by now, which could serve the same purpose?
A QUICKTABSRADIO widget doesn't quite cut it, as it is lacking the multi selection.I tagged the post as R23 as ideally this would be the minimal version, I'd need such functionality.
Any ideas would be much appreciated.
Cheers,
Andreas -
RE: Asset Browser: Add Watch Folder
Thanks, Ferdinand. I'll take a closer look as soon as I find the time.
-
Asset Browser: Add Watch Folder
Hi,
I was pretty excited, when the Watch Folders for the Asset Browser got introduced.
But trying to find a function or command to add a Watch Folder from Python API, I have to admit, I'm a bit lost. Is this possible?
Cheers,
Andreas -
RE: Drag and Drop from GeUserArea in Python
Hi Maxime,
that's a bummer.Just a few additions:
is done by calling HandleMouseDrag. Your code is paused until the drag operation ended
Yes, no objection. But it should be said, during this "pause" one does still receive messages, among them BFM_DRAGRECEIVE_START and BFM_DRAGRECEIVE. Just not BFM_DRAGEND. Which makes me think, if only the receiver would not "consume" this message, it could already work...
From a pure implementation point of view, it also does make sense since it would make no sense if each drag operation have to support all possible managers
I wouldn't want it differently. But I still think, the initiator of an action deserves result information. after all these years, I'm still wondering, what's this obsession with not delivering feedback to a caller. Yes, I'm looking at you CallCommand()...
Finally it is not possible to drag objects directly to the viewport
I didn't even consider, drag and drop could work differently for materials and objects, or objects not working at all. So, thanks for the info and avoiding even more headache on my end.
I guess, we are back to the drawing board then.
Anyway, greetings to the team.
Cheers,
Andreas -
Drag and Drop from GeUserArea in Python
Hi,
I know, this is a topic that got discussed several times in the past. Nevertheless I can not get it to work properly.
The goal: Being able to drag a yet to be created object or material from my GeUserArea into C4D (desired targets: view port, Material Manager, Object Manager,...).
I said "yet to be created". By this I mean, it is an asset from some library, which is not yet part of the document.
I have two options:- Create and insert the asset before the drag and then remove it again, if the drag fails (either being escaped or dropped onto some forbidden place).
- Or I do insert the asset into the document on successful drop.
The beginning looked promising, HandleMouseDrag() seems to be the function for this scenario and at first it seemed to work as expected.
But how on earth do I find out about the outcome of the drop?
I do receive BFM_DRAGRECEIVE, but I do never get BFM_DRAG_FINISHED or BFM_DRAG_ESC to be true. Only BFM_DRAG_LOST seems to hold information. It is always jumps from false to true, when the user ends the drag in whatever way (escaped, dropped successfully, dropped on forbidden area, it doesn't matter).
Yes, I do return the return value of SetDragDestination() from my Message() function, while in drag, as I found in this forum, that it's needed to notify C4D about my interest in the drag (which I started in the first place... Not being interested in the outcome of something I started feels a bit strange to me... a bit like firing a rocket and not being interested, if it actually started, exploded on the pad or actually reached its destination. Anyway...).And then there's an additional issue with dragged materials:
The result is different, if the user drops it onto an object in viewport or Object Manager or onto the Material Manager. In the first case it works as expected (as long as I insert the material into the document), but in the latter case I end up with two material being created in the MM. So, when dropping onto an object C4D seems to assume, the material is already part of the document and only assigns it (but I am responsible for making it available in the document), while when dropping onto the MM, then C4D seems to automatically create a copy (so I should not insert it into the document myself).
But how am I to decide, what to do and what to expect?
Even if I had a way to find out about the success of the drop operation, I would still be lacking the information about the drop target.Any help would be much appreciated.
Cheers,
Andreas -
RE: CommandData Plugin with Submenu
Thanks, Manuel
I do not mean to stress anybody.
But I'd say, this is quiet basic plugin functionality, which by now is not working for more than two years. So, i thought, I'd ask, if there's a chance for a fix. -
RE: CommandData Plugin with Submenu
Hi,
are there any chances this will ever get fixed?
Cheers,
Andreas -
RE: DirectSample doc
Not philosophical at all.
a) Why would we need to pass a list of point positions (or would have an option for it), if the information is taken from an object only. Is it only to restrict the sampled points? Why wouldn't we pass point indices instead of vectors, then?
b) FieldInfo.Create() docs clearly state the callers to be optional.As a Python developer I do not tend to look into the C++ docs, if Python docs are existing.
And Maxime's example above does not insert the temporary poly object, does it?
-
RE: DirectSample doc
Sorry to bump this thread.
But I'm also wondering, why the temporary poly object is needed.
I'm currently in R21 (as my customer) and there I also get sample values only if such poly object is passed. The pure list of positions is not enough in results in sampled values always being zero. -
RE: SaveWorldPreferences() in Python
Hi Ferdinand,
thanks a lot!
No ETA needed, I'm grateful it will be added eventually.
Cheers,
Andreas -
RE: SaveWorldPreferences() in Python
I had pretty mixed results with latest releases and use of
RestartMe()
. Somethings rings in the back of my head its use beeing discouraged.
And I think, a restart shouldn't be necessary at all. I'm even of the opinion restarting anything is almost neverr a good solution. Not even with "Be-ba-boop: Rebooting Cinema 4D...". I'd rather hope, to be able to simply save the prefs just like it is possible in the C++ SDK. So, I'll keep my fingers crossed and wait for the result of your discussion. -
SaveWorldPreferences() in Python
Hi,
is there a chance, we could get
SaveWorldPreferences()
in Python.I store some licensing info inside the prefs container. If a user now manages to crash C4D after having entered the license information for my plugin, the licensing info is lost and user needs to enter it again. I would have never imagined this to get an issue. But unfortunately I was wrong...
Would be cool to be able to save the prefs manually.
Cheers,
Andreas -
SDK docs do not reflect changes to dialog borders in S26
Hi,
I'm afraid, the SDK docs (C++ and Python) could need some updating to reflect the latest changes done to dialog borders in S26. It seems most flags are pretty useless, now. BORDER_ROUND doesn't seem to do anything anymore, for example.
Of course, I'd prefer to get back the old border behavior, but I'm not naive and think, this could be an options. But at least the changed behavior should be documented.
Cheers,
Andreas -
RE: How to Set UserData Group fold/unfold
Maybe the misunderstanding here comes from the normal behavior of the Attribute Manager.
One can not force a group open with this flag. The flag does only influence the open state, when the group for a given entity type (be it an object, tag or material of a certain type) gets shown first. As soon as the user touches the group (either opening or closing it), the Attribute Manager will use user's choice instead for all entities of this type.