Jump to content

MighT

Regular Member
  • Content Count

    26
  • Joined

  • Last visited

  • Days Won

    1

MighT last won the day on December 3

MighT had the most liked content!

Community Reputation

13 Noble Beginner

About MighT

  • Rank
    Cafe Ronin

Profile Information

  • First Name
    Andreas
  • Last Name
    Block
  • C4D Version
    R21
  • Website URL
    http://www.andreasblock.de
  • CPU/GPU
    Intel Core i7-3930K, nvidia GTTX1070
  • Location
    Hannover, Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Is this more of a practice on how to accomplish this? Otherwise I'd suggest the use of the Convert Selection command.This can also be used via Python (MCOMMAND_CONVERTSELECTION) with SendModelingCommand(). By the way, are you aware of Plugin Café? There MAXON pays a team to answer questions like these and often the answer can already be found there right away. Having said this, we (sorry, I didn't mean to MoClone myself, I was thinking of the community of this forum) could certainly also talk you through this here. The thing is, C4D doesn't really know the concept of an edge, there are only points/vertices and polygons. Edges are implicitly defined due to the order of points which form a polygon. The Neighbor class you are already using provides some helpers to make this a little easier. Yet, it's no one liner. Actually the docs of the Neighbor class already contain roughly the code you need in the description of GetPolygonInfo(). So, if this is more a learning thing, I'd suggest to start there. Cheers
  2. I think, this has safety reasons. After a User Data parameter got defined, it's respective data is stored in a BaseContainer of the entity. And this value may now be used in a gazillion ways all over C4D, Xpresso, Animation,... I wouldn't take for granted, something expecting data of a certain type behaving gracefully when the data type suddenly changes. I'd call this defensive design. What is actually the issue? I do use User Data a lot, e.g. for UI prototyping, and it was never a real issue for me. If I need to change the datatype, I simply create a new parameter as you described and done. Why would I need to worry about the new ID (except changing it in one define in my code). Although I admit (and maybe this is also your main issue), it's a bit sub-optimal, to say the least, one can not see the new ID before closing and re-opening the dialog. In situations with already cluttered IDs (due to a lot of addition and removal of user data) it can get tedious. Which probably also answers my initial question... yet, I don't think, I would need the option to change an existing ID, but rather an option to see the ID of freshly created user data.
  3. Oh, sorry, you misunderstood. Please send them just your own issues and thoughts. I wouldn't want mine to falsely multiply. Seeing this thread we'll overlap anyway. At least for the Script Manager maybe we could get an option to autosave the script on pressing the Execute button. At least users wouldn't loose any scripts by stupid mistakes anymore. If we then could get the option to have external scripts also in Python Generator and Tag (and so on), this autosaving could help there as well. Is probably an easier change than asking MAXON to tackle Pyhon's global lock (which is the real problem behind those lockups), which may not even be technically possible or feasible. Regarding c4dpy: At least if you are Windows, it's well worth taking a look at Visual Studio Code. It's more an editor, than an IDE, yet with nice features. In PluginCafe Donovan also demonstrates the use of PyCharm with c4dpy.
  4. Please don't hit me, you probably check it already twice. Anyway, did you check Minimum Time and Preview Min time haven't been accidentally set to a fraction? And is this behavior constant? I mean, does it persist in a new scene after a restart? Or is it just with one scene? In the latter case, could you maybe provide us with a small example?
  5. Could it be, frame rate in project settings differs from frame rate in render settings. Just a guess...
  6. Being a bit old school, I don't actually need an IDE for Python, yet an external editor adds an extra level of security. But please enlighten me, which modern text editor is not able to change and adapt to a text encoding? My personal editor of choice: Certainly Sublime Text 3 (at least on Win and Mac). To which I switched shortly after buying a lifetime license of Ultra Edit. Doh! UE itself is not bad, but nowadays it grew too big and feels sluggish, yet it would be my alternative if you are a more visual, UI focused person. It's certainly one of the most powerful editors, feature-wise. On the other hand Sublime feels so fast (as long as you don't work on multi Megabyte files, in which case Ultra Edit is probably better, and so is its hex mode) and focuses on the important stuff. On Linux I have to admit, I'm still the Xemacs and vim dino. But I tend to use Xemacs really only for text editing, neither web browsing nor playing minesweeper...
  7. Hi, mostly valid points, I agree with. Did you forward these to MAXON? I'm working on my own list and maybe it raises awareness, if enough share the same complaints. The only point I do not completely agree is the Command Line. It's still in R21 and you can add it to your layout as you like. Yet, for me it got redundant, as I have way more power in the Console (e.g. the possibility to quickly test multi line statements in there, I like a lot). In the end I guess, that's a matter of taste and I agree the Command Line should stay for those who prefer it. For the editor... well, lets ignore its flaws for a moment, because you mentioned the external editor option (which currently unfortunately works only for the Script Manager). I wouldn't just see this as a workaround for the internal editor, but also and more importantly as a workaround for another problem. C4D has no watchdog built in, so whenever your Python (your script) runs into an infinite loop (come on, we have all been there...), C4D freezes without any possibility to get it back nor to save your last edits. Not so with an external editor. And since C4D senses changed scripts, the use of an external editor is just one additional click ("file changed, do you want to reload?") as a trade off for lost code. Leaving aside all the other convenience functions you get from a modern editor. I say this over and over and especially for Python beginners (not talking about you Intenditore) this can avoid a lot of frustration. Your post made me think, if I should come up with a plugin, allowing something similar in Python Generators or Tags. Maybe I'll come back to this... By the way, at least for me here on Win10 (no screen scaling, no HiDPI) for long lines even the scrolling and cursor positioning is off. It doesn't follow, if the cursor leaves on the right side. And when you click there, the cursor gets positioned a centimeter off. Sometimes not even with the scrollbar I can reach the end... Yet, for me remain the positive changes. While (or rather because) no longer synchronized (e.g. multithreaded output can get mixed up), the Console Output got way faster, which makes it much more usable. And also the possibility to arbitrarily copy&paste from the console is a big plus for me. So, my feelings are really a bit mixed here.ö Cheers
  8. Are there any plugins involved? If not, I'd say, this could be something to ask MAXON's support. If you hadn't 64GB RAM, I had probably also asked for the settings of the Picture Viewer and stuff related to it. If you'd be low on RAM, than those rendered images, cached in Picture Viewer might push the system over the edge (make it swap RAM to disk). The number of cached images can be configured. But with 64GB I really doubt that's an issue. By the way, you are asking this for R18 (in which case MAXON's support might not be of too much help)?
  9. How would you like this to work? Would it be convenient, if a script created keyframes on a selected material, with one image of a chosen folder per keyframe? Would it be safe to assume, the HDRI is always in the same material chanel? Is it safe to assume, it's not stacked into a shader hierarchy (like layer shader, whatever shader,...)? Or would it be better to leave aside any keyframing and animations, but instead save a scene file with every HDRI, so you can throw them as a bunch onto a render farm? Or would Takes be more convenient? Maybe one Take per HDRI? Is a folder enough to chose? Or do you need file/folder lists? Would the content of the folder need to be filtered (like *_HDRI.hdr or MumboJumbo_*.tif) or would certain filetypes need to be excluded (e.g. only tif, but never gif)? Of course it could also simply run through all files and render an image each. But this sounds least controllable to me, compared to keyframes and Takes.
  10. Actually the help system works on almost everything, also for buttons with commands. And menus, while behaving/feeling a bit different, are no different in this regard. Use the bar on top of the menu to rip it off, it turns into a normal button bar. Now, you can right click and call for help. And this also works inside the commander (Shift-C). There you can search for commands and directly call the help (again via right click context menu). One thing I'm not sure about, how this behaves in R21 on Mac, where the menus turned into the standard system menu bar. I'm pretty sure, if the MAXON developers had any chance to preserve this behavior, they have. But I have no Mac so I can't be sure. Cheers
  11. Oh, sorry, I'm no longer at MAXON. I somehow missed that part.
  12. Here, with this change it will rename all Null objects which name starts with "Null". If there's a numeric suffix and the index can be found in the name list, the respective name is used, in all other cases the first name (index zero) is used. Here, it's only the renaming section. Simply replace the block with this one: # Rename Null objects doc.StartUndo() obj = doc.GetFirstObject() # TODO only searching top-level of object hierarchy for Nulls to rename while obj is not None: if obj.CheckType(c4d.Onull): nameParts = obj.GetName().rsplit(NAME_INDEX_SEPARATOR) if nameParts[0] == 'Null': doc.AddUndo(c4d.UNDOTYPE_CHANGE, obj) if len(nameParts) > 1 and nameParts[1].isdigit() and \ int(nameParts[1]) >= 0 and int(nameParts[1]) < len(names): obj.SetName(names[int(nameParts[1])]) else: obj.SetName(names[0]) obj = obj.GetNext() doc.EndUndo() c4d.EventAdd()
  13. Ah, I missed your question on the first Null without digit. Actually that's why it's always good to post a scene How are the Nulls to be renamed identified? All Nulls on the topmost hierarchy level? Or just Nulls which begin with Null? I assumed it to be potentially dangerous, if the script simply renamed all Nulls, so I deliberately made it so that it only renames those named like this "Null.n" (with n a number). How is the logic then? If there is only "Null" it will be the name with index zero?
  14. You are welcome, glad it helped. Well, C4D has always been a hobby of mine since its Amiga times. Really just a hobby. I was fascinated by computer generated imagery and simulated physics. Yet, have never been able to produce anything anybody with a clear conscious would call art, because... probably because my brain doesn't work this way. I studied electrical engineering and worked as a system design engineer for almost 15 years (mainly C and VHDL programming). Around that time I decided to shift my focus onto something I like better and to try to hire at MAXON. Therefore I thought, it wouldn't hurt to have developed a plugin before. I took my year's vacation, MAXON's SDK documentation and the SDK examples and worked myself into it. Not that it helped with getting hired by MAXON (it took three more years to get into there), but for a reasonably experienced developer it was certainly possible to learn enough to get three plugins working (of which I released only two to the public and their functionality got redundant with MAXON's next major releases...). Only after I got hired by MAXON and worked inside the SDK Team I then also started familiarizing with the Python side. I doubt, you wanted to hear my life's story, but at least that's how I got into developing plugins. And you asked how I got into plugin development... Please, don't get me wrong, I certainly do not want to say, you need to study programming to get into it. Far from it. Actually I think it's more important to understand certain principles of C4D. Then, if you are able to program in Python, the SDK documentation and examples should get you going quite a bit. And finally, I think MAXON is quite generous in this regard, there's MAXON's SDK Team (and I'm not mentioning this, because I was in there) who provide free support to everybody in the Plugin Cafe forum. These guys usually get your problems solved quite quickly and nicely. Nowadays there are also other nice resources. Did you see @Cairyn's spoonfed series? Recommended. The links somewhere here in the forum. If you are planning to reach an age of 150, you may also wait for me to release my long planned YT tutorials on C4D Python development. Unfortunately there's too much in the pipe to get to these. Last note: I do also teach C++ and/or Python plugin programming for C4D to interested people (and also to not interested people who are forced by their boss to do it nevertheless). Maybe you are interested. While I usually do not do this for free, it is on a pay-what-you-want,-are-able-to-afford-and-deem-worthy basis. No strings attached. PM me, if you are interested. If enough people in here are interested, we can also do a Q&A chat session.
×
×
  • Create New...