Jump to content

Cairyn

Regular Member
  • Content Count

    134
  • Joined

  • Last visited

  • Days Won

    5

Cairyn last won the day on February 12

Cairyn had the most liked content!

Community Reputation

79 Noble Beginner

About Cairyn

  • Rank
    Cafe Ronin

Profile Information

  • First Name
    Ronald
  • Last Name
    Klemp
  • Location
    Germany
  • Website URL
    https://www.patreon.com/cairyn

Cinema 4D Information

  • C4D Version
    R21

Recent Profile Visitors

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

  1. Hi; sure, that's possible. If you can identify the parts by name (or path... if names are duplicate, it may be necessary to identify them by assembly), a CSV format file can be read into C4D and control the visibility. If your models contain repetitive sub-assemblies, maybe there could even be an interactive solution. A script would be easiest (and cheapest) I guess... Drop me a note if you want to discuss a solution.
  2. The question remains though: How do you select the tag that you want? It's a fact that there are dozens of tags in my system, including stuff from plugins and stuff I programmed myself, so any kind of selection would either be a very long list, or a hierarchical list (as the tag menu currently offers), or a text box where you type the name, or... so many possibilities. I guess it depends on taste how you want to select it. (I admit I have the same issue with some tags - I don't find them immediately in the menu hierarchy!) Then there are the special functions - like "Set Selection" which creates or overwrites a selection tag, depending on the mode and whether a tag is already selected. These are specific to the tag type and require special handling. In some cases (like X-Particles) it absolutely makes sense to have functions which set up a full object/tag hierarchy with one click. And finally there is the fact that not all functionalities that you listed make sense for all the tags available, or that some functionalities exist in one form or the other (creating a tag on a multi-selection does create the tag for all selected objects; a function "copy tag to children" does exist, etc.). Personally, I found that it makes most sense to have a few selected scripts (like the one from my previous post, sometimes enhanced by additional functionality - for example a SetSelection variant that does not overwrite an existing selection, or a popup menu to activate point selections) to cover often-needed usecases, and just live with the tag menu structure otherwise...
  3. You can simply use scripts like this: import c4d from c4d import gui def main(): wc = c4d.GetWorldContainer() wc[c4d.WPREF_UNITS_BASIC] = c4d.DOCUMENT_UNIT_M # use units: # DOCUMENT_UNIT_UNDEF - Undefined. # DOCUMENT_UNIT_KM - Kilometer. # DOCUMENT_UNIT_M - Meter. # DOCUMENT_UNIT_CM - Centimeter. # DOCUMENT_UNIT_MM - Millimeter. # DOCUMENT_UNIT_MICRO - Micrometer. # DOCUMENT_UNIT_MILE - Mile. # DOCUMENT_UNIT_YARD - Yard. # DOCUMENT_UNIT_FOOT - Foot. # DOCUMENT_UNIT_INCH - Inch. c4d.SetWorldContainer(wc) c4d.EventAdd() if __name__=='__main__': main() Change the unit accordingly and put a copy of the script on any button you like.
  4. is it convoluted? The code is really short... here for a Protection tag... import c4d def main(): if op == None: return op.InsertTag(c4d.BaseTag(c4d.Tprotection)) c4d.EventAdd() if __name__=='__main__': main() For other tags you just need to replace Tprotection with another tag type, a list of which you can find here: https://developers.MAXON.net/docs/Cinema4DPythonSDK/html/types/tags.html The problem with writing a plugin to select tags is still that you need to do the selection... which would probably be no better conceptually than the current menu choices. If you want a different solution, the big question is how it's supposed to work. Having just a button for a single special tag... well, use/modify the script above, no need to bother with a plugin unless you have a novel idea how to make the selection easier for the user.
  5. I'm afraid you're attempting something that is conceptually not planned. (I had similar issues a long while back; I do not think that anything has changed in that respect but if it did, someone will probably correct me.) Remember that ASYNC dialogs are dockable. If your dialog is docked, the user controls the size of the dialog by modifying the layout (the surrounding elements, the window separator bars). In that state, resetting your dialog's size would simply ruin the user's layout. Therefore, the current size (as set from the outside, either through the window frame handles or by the layout pattern) needs to be flexible and is calculated from the outer frame to the inner layout, with internal minima and sizes only being applied when the dialog's initial minimum dimensions are calculated. I also do not recommend that you force sizes by opening and closing the dialog, as this too would influence the current docking/Layout situation.
  6. "to subscribers" means owners of a Perpetual will not be able to access their old version (which is already installed)? So if I update to R22, I cannot open my R21 from that day on? Not to mention re-installing the R21 anywhere...? Please note that there are many reasons to switch back to an older installation temporarily (from compatibility issues, to customer needs, to transfer of GUI or other settings).
  7. mySpline[c4d.SPLINEOBJECT_CLOSED] = True While the API suggests that each segment can be closed or not closed separately, that is actually an error. None of the functions that control the segment's closing state works. You can only close the complete spline.
  8. Turn your whole scene by 180° around z for the render, and turn it back in post. Unfortunately, the axonometric projections are quite special with properties that can not be achieved through parallel projection. (Edit: Except for isometric and mayyyyybe dimetric, but don't quote me on that.)
  9. Note that the Del key is overloaded for many windows, so you need to be aware of where the mouse pointer hovers all the time.
  10. Where is your mouse pointer? If it's in the viewport, your polys will be deleted (provided you are in the proper mode). If it's in the Object Manager, the selected object will be deleted.
  11. There is a C++ sample for many things: https://github.com/PluginCafe/cinema4d_cpp_sdk/blob/master/source/gui/gedialog_gadgets.cpp flagSubgroupClosed is not used in the initialization in CreateLayout, so obviously it doesn't have any effect. If you want to have the subdialog closed, you need to do it (again) manually by adding the lines self.HideElement(130, flagSubgroupClosed) subgroup.Select(0,flagSubgroupClosed) at the end of CreateLayout. As for using ASYNC dialogs (nonmodal), that is not a problem of the tab group but of the lifetime of the objects within a script. If your dialog is modal, the Open command will not return before the dialog is closed; the class Fold will keep existing, and all is fine with the world. The execution loop in C4D will handle nothing else but your dialog. -- If you use an ASYNC dialog, the Open command will happily open your dialog and then return, which returns control to the C4D main message loop, which ends the script, which kills the Python execution context including your class. You can just try to change the DLG_TYPE; you will see that all the dialog content disappears as soon as you try to click something or even resize the dialog. Because your dialog class is kaputt. If you want nonmodal dialogs, you need a different approach (use a plugin that makes your dialog class permanently accessable for the C4D main message loop and allows C4D to restore the dialog layout if it gets embedded in some user layout. (Not going into that topic here - maybe one day I will get to it in my Python: Spoonfed tutorial series.)
  12. The screenshot looks as if it would suffice to select one point per loop, and then use "Select Connected" as Cerbera mentioned. For other selection usecases, you may play with Grow Selection or Shrink Selection or even Invert. Unfortunately, these methods do not allow to add to an existing selection (so they are not equivalent to loop selection in polygon objects), as they would affect all already selected point sets too. In those cases, it may be the easiest course of action to select partwise (deselect after each part), store the parts with Set Selection in point selection tags, and then finally add it all together with the tags' Select Points button.
  13. The Quicktab is a gadget, not a group. You are using the same ID for the gadget and the group that's folded with it. C4D doesn't do that automatically. import c4d from c4d import gui class Fold(gui.GeDialog): def CreateLayout(self): self.SetTitle('') # create a quicktab self.GroupBegin(1011, c4d.BFV_SCALEFIT, 0, rows=3, title = '') bc = c4d.BaseContainer() bc.SetBool(c4d.QUICKTAB_BAR, True) bc.SetString(c4d.QUICKTAB_BARTITLE, 'title') bc.SetBool(c4d.QUICKTAB_BARSUBGROUP, True) subgroup = self.AddCustomGui(122, c4d.CUSTOMGUI_QUICKTAB, '', c4d.BFH_SCALEFIT | c4d.BFV_TOP, 0, 0, bc) global flagSubgroupClosed flagSubgroupClosed = False self.GroupBegin(130, flags=c4d.BFH_SCALEFIT | c4d.BFV_TOP, cols=1, rows=2, title='', groupflags=0) self.GroupBorderSpace(10, 0, 10, 0) self.AddButton(123, c4d.BFH_LEFT, 0, 0, 'Button') self.GroupEnd() self.AddButton(124, c4d.BFH_LEFT, 0, 0, 'Also a Button') return True def Command(self, id, msg): global flagSubgroupClosed if id == 122: flagSubgroupClosed = not flagSubgroupClosed self.HideElement(130, flagSubgroupClosed) self.LayoutChanged(1011) return True def main(): dlg = Fold() dlg.Open(c4d.DLG_TYPE_MODAL) if __name__=='__main__': main() c4d.EventAdd()
  14. Interesting thread, all in all. I do believe, however, that C4D users are exceptionally happy with the program. Why? Because I see no evidence for the collective needs of the users, beyond everyday questions that do not require programming but can be solved with onboard tools. The category "Plugins Requests" on this very forum contains three entries, the newest being more than two months already. Let me repeat, three entries, on an international forum (which, I think, is one of the largest if not the largest for Cinema 4D). The category "Python/C++" is better off, but I am under the impression it is mostly used by people who are already programming by themselves and need a specific solution, not so much by end users who have an issue/request/need/suggestion. In the category "Market & Job Offers", I just went back ten pages (until 2018) without finding a single request for a programmer. Shouldn't there be a lively discussion on all those ideas which MAXON supposedly gets daily? If people have the impression that MAXON's forms are a black hole, why is nobody trying to involve the community? Sure, there are things only MAXON can solve (practically, or in an efficient way) - if a user needs to have a different behavior for a built-in function, then it might be impossible for a non-MAXON developer to provide a solution without re-inventing that tool from scratch. But very often a little code goes a long way. There are even programmers here on this forum who often will provide a little scripting solution for free (if reasonable) or for a nominal fee. And larger requests could be handled too, if users could agree on some financing system that would allow an independent non-MAXON programmer to create a new feature (something like plugins, but with less overhead and administrative stuff). True, programming is expensive (solving other people's problems is a job, after all), and as someone said in an earlier post, resources are limited, so it will generate extra expenses beyond the naked C4D, but for all those professional users who make a living with C4D (not necessarily hobbyists, for whom time and productivity is not so much of an issue), shouldn't the time and effort savings justify the money? Hey, couldn't several users with similar/the same needs band together and conspire to hire a programmer to alleviate their pains? I've yet to see that happen. All of that suggests that these needs are not that great, after all (the huge discussion on offline help seems more of an exception). Or the needs are so specific and task-oriented that there is only one user for it, or one job, which makes it really unlikely that MAXON will ever spend resources on it. Or, are they? It's hard to judge ideas if they stay hidden away in someone's brain. It's difficult to gauge interest without a discussion. It is pretty much impossible to estimate effort if the parameters of the desired functionality are unknown. So, summa summarum: Talk, people! Don't just put suggestions to MAXON, put them here as well. Discuss them extensively. Chat with a programmer. Propose a course of action. Make these ideas known! Don't be afraid of silly thoughts and seemingly impossible features. -- Maybe they will not be picked up; maybe they will not find enough support (yes, always that nasty money business); but if they do get out in the open, who knows what may happen.
  15. The Python console doubles as command line - you can type there, drag attributes there, and have Python react interactively.
×
×
  • Create New...