Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi Kent,
thanks for your feedback.
Actually merging C++ and Python categories was an outcome of our beta phase, where some were of the opinion too many categories would not be desirable. But there's another reason we did so: Our C++ and Python APIs are actually so similar, that many answers hold for both languages. And lastly, if it were just for the C++ and Python tags, we probably wouldn't even ask for the tags. It's rather tags about version or API in use, we are interested in most. Oh, and by the way, although I have to admit it was less frequent in the old forum, but instead of asking for tags we were asking to post into the right category. Which by the way still happens with just the four we have here. Oh, oh... Kent, can you please consider using tags? See About This Forum. Thanks! Just kidding.
But anyway, these are our reasons, maybe others have different ones and agree with yours. Then please, provide us with your arguments and opinions. It's not that we wouldn't care. We have taken notes of all feedback we received so far and will evaluate this hopefully during November. So, it's actually a good time to provide such feedback.
Maybe we can also address your aversion of "oversized" text. We'll look into providing themes. But we also need to see, what we can actually achieve and maintain in a certain amount of time. After all we think, support work is more important than induldging in web design. One thing I can say for sure, though. It's not your age. Because with my age increasing I definitely need larger and larger text...
Now, for the community aspect. I'm really sorry to hear this. I can only say, no, it was not our intention to kill the community in Plugin Café. Believe me, quite the opposite. I'd be really interested in more opinions and suggestions on this topic. Here's how I see it:
For example @mp5gosu told us, how much he likes working in this new forum. And we can see him actively discussing and contributing.
Please, everybody, come in, join this thread and provide us with your feedback. Tell us what you want and need. Kent mentioned some good points here. One especially worries me. Help us make this forum the place you want to be supported in. Help us to make this the place you want to discuss your plugin development related topics in.
Cheers, Andreas
Hi,
thanks for the additional information and setting the tags.
The BitmapButton needs to be added to the dialog via AddCustomGui(). For example like so:
# Prepare a red bitmap for the button. w = 50 h = 50 bmpRed = c4d.bitmaps.BaseBitmap() bmpRed.Init(w, h) for y in xrange(w): for x in xrange(h): bmpRed.SetPixel(x, y, 255, 0, 0) # BitmapButton configuration bcBitmapButton = c4d.BaseContainer() bcBitmapButton[c4d.BITMAPBUTTON_BUTTON] = True # Add a BitmapButton to the dialog. # _bitmapButton is a member variable of the dialog class buttonId = 2000 _bitmapButton = self.AddCustomGui(buttonId, c4d.CUSTOMGUI_BITMAPBUTTON, "", c4d.BFH_CENTER|c4d.BFV_CENTER, w, h, bcBitmapButton) if _bitmapButton is None: print "Handle this error!" # Assign the image to the button. # Note: Let it create an internal copy as the created bitmap will be free'd, when scope is left. _bitmapButton.SetImage(bmpRed, True)
Thanks to everybody in this thread for all your kind words.
@C4DS said in Good Bye and Thanks for the Fish:
As mentioned earlier, this place won't be the same without you.
You may overestimate my contribution. Silently watching from the side line, my feeling is, Riccardo, Sebastian, Maxime and Manuel, though being handicapped by a little loss of man power, not only managed to continue to do a great job in here, but even managed to further improve. Just let the dust of change settle a bit and they'll excel even more.
And with the recent unraveling of the plot, this "ending of your novel" has sure taken a new twist.
I'm not quite sure where you are heading and which plot recently unraveled. But please believe me, my departure was not so much related to Maxon and certainly not connected to any announcements on Maxon's strategy of the recent past. I left a group of friends behind, mostly for private and to a certain extent selfish reasons, which I won't discuss in public. Yet, please, try not to read between the lines and do not interpret my silence against Maxon or the SDK Team. I really enjoyed being part of the ride. Having had the chance to meet all of you in here was really great. It's just sometimes you need to stop eating, when it tastes best. I'm pretty sure Forest Gump also said some fitting words, I just can't remember...
no worries, we'll get you there.
One recommendation: When doing Python development, have the Cinema 4D Console window open (Menu Script -> Console...). There you will be presented with errors.
I think, your problem will be, that you try to access op, probably intending to change parameters of the active object. In Script Manager doc and op are global variables predefined for convenience. In a plugin, you have to get these yourself using GetActiveDocument() and GetActiveObject().
op
doc
Bye, Andreas
Dear fellow developers,
my seasonal greetings to the entire community.
But I'd also like to take the chance to say thanks to "our" SDK Team, who served us so well during the entire year. Patiently answering even my most stupid questions, as if they had nothing else to do (which of course they most likely have)...
So, please, everybody in this community join me in saying:
Thanks for supporting us so well, Riccardo, Sebastian, Maxime and Manuel!
Everybody hopefully gets some well deserved days of rest.
Hi Andre,
you can simply use SetLink(), the opposite of GetLink().
SetLink()
GetLink()
In order to clear a link box, you'd call: self.linkBox.SetLink(None)
self.linkBox.SetLink(None)
The type you do in your code snippet is a bit unconventional in terms of Cinema 4D's API (not wrong though), but usually we recommend to stay in our API for example with CheckType() or IsInstanceOf(). But in the end, I think, you don't even need the type check, if you simply restrict the types accepted by the link box. For example like so:
CheckType()
IsInstanceOf()
bcAcceptedObjects = c4d.BaseContainer() bcAcceptedObjects.InsData(c4d.TakeBase, "") # only allow BaseTakes to be accepted bcLinkBox = c4d.BaseContainer() bcLinkBox.SetData(c4d.DESC_ACCEPT, bcAcceptedObjects) self.linkBox = self.AddCustomGui(2001, c4d.CUSTOMGUI_LINKBOX, "My Link", c4d.BFH_SCALEFIT | c4d.BFV_CENTER, 0, 0, bcLinkBox)
I turned this thread into a question.
no your script is not wrong. There's just a bit more to it.
NodeData
BaseContainer
GetParameter()
tool.GetParameter(2108, c4d.DESCFLAGS_GET_0)
you can also use the Description.
Description
With a small loop, you can get information about a tool's parameters and their type:
toolID = doc.GetAction() tool = c4d.plugins.FindPlugin(toolID, c4d.PLUGINTYPE_TOOL) desc = tool.GetDescription(c4d.DESCFLAGS_DESC_0) for bc, paramid, groupid in desc: # Iterate over the parameters of the description print bc[c4d.DESC_NAME], paramid[0].dtype # Print the current parameter name and type
It sounds a bit, as if you try to create some kind of undo system for tools. Something Cinema 4D does not have currently. The standard undo system for example works by cloning instances, something that is not possible with tools. But of course the cloning automatically takes care of the entire instance's state, regardless, if parameters are stored in the BaseContainer or if the complete state is really defined by parameters. So, just be aware, even with the above approach, there might still be information stored inside of a tool, which may not be reflected by the Description, either. I have no examples for this, it is more a word of a warning, something like this might come up.
no, you are not! Really there are no stupid questions and please do not delete such posts. Especially not, if you already invested time in posting the correct answer. We'd rather see this as knowledge others might benefit from in the future.
Sorry for joining in so late. And I think, all relevant points have already brought up. I just wanted to add one twist or slightly different point of view:
c4dpy is a so to say "standalone python interpreter" with access to Cineama 4D's api.
Actually c4dpy is a full headless Cinema 4D, which can be used as a Python interpreter in IDEs.
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.
@FSS Thanks for your looking into it and your explanation.
I'd be pretty concerned, if it's possible to destroy the C4D via the Python API (as long as I do not do any explicit file access on any installation files). If you can somehow reproduce it or at least have an idea, in which area of the API to look out for such dangers, I'd be grateful.
There is no single function to accomplish this. You will need to add a track, a curve and aa keyframe.
Kudos to Google Translator, did a pretty good job then. If you are willing to pay a few bucks, I could also talk you through in German while sharing screen. You could find me as MighT over on Core4D forum and DM me there. Or you can mail to job AT andreasblock DOT de.
Whut? I'm starting to doubt, we are communicating with a human. Maybe the account got hijacked? Looking at the other thread, the English was way better than the actual German in here. Maybe it's a language barrier. Then I'd suggest to tell us, which language could work better. Maybe we can find somebody to help with translation. Obviously the answers in the other thread did not help and it won't help either, to simply ask again in a different language with even less details.
I think, the only German speaking person in SDK Team is currently on vacation. So, I'll try to jump in:
Benötige den Python Script Befehl für Sichtbarkeit im Editor und Sichbarkeit beim Rendern, habe keinen Python Script Befehl gefunden können Sie mir bitte weiterhelfen? Red Button
Question is, how to set the Visibility parameters from a Python script. mogh already answered. I may add, the Script Log can be equally of help here.
German translation of mogh's answer: Ziehe einfach die "Sichtbarkeit..." Parameter in die Python Konsole, da hast Du alles was Du brauchst. Alternativ öffne das Skript Log und verändere danach die Sichtbarkeit von Hand. Daraufhin tauchen die nötigen Code Zeilen im Skript Log auf.
Wenn ich ein Python Funktion mit einen Objekt ausführe funktioniert Sie ganz normal wenn ich jedoch mehrere Objekte Auswähle funktioniert die Funktion nicht gibt es da vielleicht ein Script dafür?
Question is, why a Python function works with a single object and not with multiple selected?
The question is so broad and general, it simply can not be answered. We'd need at least some code sample or at the very least some description of what is actually intended.
Answer in German: Die Frage lässt sich so allgemein schlicht nicht beantworten. Ohne irgendein Code-Beispiel oder wenigstens eine Beschreibung dessen, was Du tun möchtest, ist Hilfe unmöglich.
Some final words:
Lastly, you should really open one thread per topic/question. Furthermore at least try provide some details, so it is easier to help you. Usually people in this forum (and especially Maxon's SDK team) are really helpful and invest a lot of effort to get people going. It's a matter of respect to at least try to make their job not harder than need be. Also thread topics should be meaningful!
And in German: Letztlich solltest Du wirklich einen Thread pro Thema/Frage eröffnen. Außerdem solltest Du zumindest versuchen, einige Details zu liefern. Damit wäre es einfacher, Dir zu helfen. Normalerweise sind die Leute in diesem Forum (und vor allem das SDK-Team von Maxon) sehr hilfsbereit und geben sich viel Mühe, um den Leuten weiterzuhelfen. Es ist eine Frage des Respekts, zumindest zu versuchen, ihnen die Arbeit nicht schwerer zu machen als nötig. Auch die Überschrift eines Threads sollte einen Sinn ergeben.
I tend to use GeExecuteFile() to open directories in Explorer/Finder. This seems to work for me regardless of OS. Are there any advantages of using ShowInFinder() instead? Or any disadvantages of using GeExecuteFile().
GeExecuteFile()
ShowInFinder()
Cheers
I have a very tiny request: Could the Python SDK examples be changed, so that the licensing example is not automatically active. I find it a bit distracting and tedious to deactivate it after every fresh installation. Maybe a small additional CommandData example to explicitly arm it?
Off topic note: In forum/posting tags S26 still seems to be missing.
Also I'd like to publicly express my gratitude to the entire SDK Team for all the small and big changes done in S26 for us developers! Keep up the good work, thanks!
sorry, for bumping this thread.
With the new S26 I have again problems installing pip in C4D's python on MacOS (Big Sur, x86). Funnily so, it works in c4dpy, but then the modules are only available in c4dpy, not inside C4D (probably expected).
But when trying to do the same with C4D's python, regardless, if I try to use get-pip.py or .../python --ensure-pip -default-pip I end up with "Defaulting to user installation because normal site-packages is not writeable" as the main error and then in the following something along the lines "User base directory is not specified". The latter sounds a bit like, I could maybe simply specify a user base directory somehow?
get-pip.py
.../python --ensure-pip -default-pip
In R25 for example it worked nicely.
Sorry, if this a stupid question. Pretty sure, I overlooked something in the docs somewhere.
Cheers and thanks for any help in advance, Andreas