• 0 Votes
    3 Posts
    495 Views
    V
    @ferdinand Thank you for the hint and the superfast response! I was not aware that these symbols dissolve into these numbers, which of course makes it much easier to work with them now. I was able to solve it with CallUVCommand: settings = c4d.BaseContainer() settings[c4d.RELAXUV_KEEP_BORDER] = False settings[c4d.RELAXUV_KEEP_NEIGHBORS] = False settings[c4d.RELAXUV_KEEP_POINTSEL] = False settings[c4d.RELAXUV_CUT_EDGESEL] = True settings[c4d.RELAXUV_EDGESEL_POINTER] = edge_sellection settings[c4d.RELAXUV_MAX_ITERATIONS] = 1 settings[c4d.RELAXUV_MODE] = c4d.RELAXUV_MODE_ABF ret = c4d.modules.bodypaint.CallUVCommand(handle.GetPoints(), handle.GetPointCount(), handle.GetPolys(), handle.GetPolyCount(), uvw, handle.GetPolySel(), handle.GetUVPointSel(), obj, handle.GetMode(), c4d.UVCOMMAND_RELAX, settings)
  • 0 Votes
    3 Posts
    799 Views
    ThomasBT
    @ferdinand Many thanks for this detailed example, I'll try it out P.S. Oh my gosh, it's working perfectly. I decided to go the easiest way, just to check the dirtyness of the linked object. linkDirty: bool = link.IsDirty(c4d.DIRTYFLAGS_DATA) Many many thanks Thomas
  • 0 Votes
    4 Posts
    845 Views
    J
    Hello @ThomasB , without further questions or postings, we will consider this topic as solved by Friday, the 11th of august 2023 and flag it accordingly. Thank you for your understanding, Maxon SDK Group
  • How to add custom menu to take manager

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    609 Views
    H
    Hi @i_mazlov, thank you for your reply. Yes, I thought as much. Too bad the take manager menu is not publicy exposed. And while I understand that Maxon as well as the community are not big fans of every plugin messing around with menu insertions, it still is a pitty. One can e.g. insert plugins into the menu of the material manager as done so by "CV-Swim". IMHO it should pose no problem when done carefully with UX in mind while doing so. Especially when one "only" appends entries to a menu. Nethertheless thank you for confirmation. Cheers, Sebastian
  • 0 Votes
    5 Posts
    866 Views
    fwilleke80F
    @jana sorry, I forgot to flag it myself. All solved, thank you
  • 0 Votes
    3 Posts
    1k Views
    J
    Hello @saotome_rui , without further questions or postings, we will consider this topic as solved by Friday, the 11th of august 2023 and flag it accordingly. Thank you for your understanding, Maxon SDK Group
  • How to get a port data type?

    Moved Bugs sdk python windows 2023
    6
    1
    0 Votes
    6 Posts
    1k Views
    J
    Hello @Dunhou , you are correct, the issue is not fixed yet. As Ferdinand mentioned in the beginning he has flagged it as "to_fix", so it will be fixed as soon as possible. Thanks and Cheers Maxon SDK Group
  • 0 Votes
    11 Posts
    2k Views
    DunhouD
    Hi @m_adam , I have ask what are main functions in redshift do in redshift forum, but get no reply for week. and the help(redshift) also give me an ambiguous result. But anyway, I have something here, I will update it and publish when I have free times.
  • How to create ToolBox in C++.

    Cinema 4D SDK s26 c++ windows
    3
    2
    0 Votes
    3 Posts
    729 Views
    P
    @ferdinand Thank you
  • Need help with Bend-Deformer in Object-Plugin

    Moved Bugs r23 2023 python windows
    6
    0 Votes
    6 Posts
    2k Views
    M
    Hello @ThomasB, without further questions or postings, we will consider this topic as solved by Monday 05/06/2023 and flag it accordingly. Thank you for your understanding, Maxime.
  • description.SetParameter() Question

    Cinema 4D SDK r23 2023 python windows
    11
    0 Votes
    11 Posts
    2k Views
    ThomasBT
    @ferdinand At first I wanted to do it exactly like you recommended, but then I thought why, if you save 36 IDs, it's certainly more memory-efficient. And when you just rename it, you've already learned something again. Actually, I wanted to do it with separate IDs. But then I recognized that I need the exact same 3 parameters, just with other Labels. but since renaming was faster, I decided to do it. It's an update of the previous version of the plugin and it was easiest to just change the labels. I'll think about it, I've got time. Thank you because my English is not always the best, I sometimes find it difficult to read your texts. They are already very extensive in some cases. Good evening!
  • 0 Votes
    3 Posts
    546 Views
    ThomasBT
    @ferdinand thank you very much
  • CUSTOMGUI_QUICKTAB trigger twice when click

    Cinema 4D SDK sdk python 2023 windows
    3
    0 Votes
    3 Posts
    417 Views
    DunhouD
    @m_adam Thanks man! this @dataclasses.dataclass decorator is pretty handy , new knowledge incoming And maybe some similar bug I have seen before , but I don't remember what it is (and even didn't know it is a bug or my bad coding ) , if I met some similar bugs I will update the topic , but now let's hope it will be fixed next release . Thanks for your help again Cheers~
  • 0 Votes
    4 Posts
    668 Views
    M
    Hello @HerrMay, without further questions or postings, we will consider this topic as solved by Monday 05/06/2023 and flag it accordingly. Thank you for your understanding, Maxime.
  • 0 Votes
    3 Posts
    428 Views
    H
    Hi @m_adam, alrighty, good to know that this will be looked into and eventually get fixed. Yes, I remember I returned True in the past. In the python tag as well as in the TagData equivalent. As returning super didn't work. Thanks for the information anyway. Cheers, Sebastian
  • Python Tag how to hide a mogragh object

    Cinema 4D SDK python windows 2023
    7
    0 Votes
    7 Posts
    1k Views
    DunhouD
    @Manuel Oh, what a pitty! I know that I can dot it with a effector, but it is not a "all in one" solution for my convenient,but that's it , I will not spend times in it. Thanks for your research, and @HerrMay thanks for your enthusiastic answers ! Cheers~ DunHou
  • Crash when apply a Tag plugin.

    Cinema 4D SDK 2023 python windows
    7
    0 Votes
    7 Posts
    1k Views
    DunhouD
    Hey @ferdinand ,Thanks for your detailed explains forever. Now it is clear to read the res files , and you show me the Agent Ransack last year, I use this software for learn something , and the C++ document is also good for the res file, but some of the data is distribute anywhere , like BITMAPMUTTON , I remember that I search for no fading option for a long time, but in python document it has a user friendly position in sdk. Maybe a document improvement or more Github examples are both welcomed( seems lots of works ) Thanks for your patience! Cheers~ DunHou
  • 0 Votes
    3 Posts
    653 Views
    H
    Hi @m_adam, thanks for the explanation and your example code. That will absolutely suffice my needs. Good to know though that additional information may be available in the future. Cheers, Sebastian
  • 0 Votes
    4 Posts
    699 Views
    ferdinandF
    Hello @HerrMay, Funny enough DrawPoints seems to internally use the "same points" to draw, one gets to see when one edits the points of a polygon object. In S26 the points are round (thats probably why I was thinking of circles) while in R20 they are squares. No question here, just an observation. As you can see, in the script I retrieve the cache of the object we are going to draw. # Get the cache of the object representing the plugin in the object manager, i.e., more or # less what we returned in GetContour, Cinema 4D has however exhausted the cache for us, and # the cache is not a SplineObject but a LineObject (i.e, the cache of a SplineObject). cache: c4d.LineObject = op.GetDeformCache() or op.GetCache() if not isinstance(cache, c4d.LineObject): return c4d.DRAWRESULT_O This not only enables us to deal with splines affected by a deformer correctly, but also and more importantly with spline generators as for example the Circle spline generator. Such generators do not have any control points one could retrieve, their cache will always contain LineObject instances and not SplineObject instances (when they have been implemented correctly). This is also what I was referring to in my comment, because OffsetYSpline returns a SplineObject as its cache in GetContour, but Cinema 4D will 'exhaust' that cache for us by returning the cache of the cache, the LineObject. A LineObject represents a SplineObject over its current interpolation settings. What is actually weird though is that the color gradient you used here to color the points doesn't work in R20. The points are simply drawn black there. Possibly a Python 2/3 issue caused by integer/float division differences? Yes, this is Python 3 code. In Python 2 integers divide by default as integers. Simply wrap one of the numbers into a float, e.g., f: float = float(i)/float(count). Allow one follow up question. How can I draw only the control points of the spline? In your example you use a circle primitive which has - when made editable - exactly four points making up the shape via tangents. Where as the drawn points using the intermediate points of the circle as well. You can use BaseObject.GetRealSpline to get the underlying editable spline object for a spline. So, when you would replace the section quoted above with this: cache: c4d.SplineObject = op.GetRealSpline() if not isinstance(cache, c4d.SplineObject): return c4d.DRAWRESULT_OK You would now draw the control points of the SplineObject representing the spline generator rather than the vertices of its underlying LineObject. The problem in this case is that the plugin you have chosen is calling 'Current State to Object' (CSTO) on the input object which it is cloning and returning offset-ed (see line 130 in your code listing). CSTO is of course just replacing an object with its cache state. So, when you put a circle spline below the offset spline, it will still be drawn as in the LineObject cache version because the cache and the BaseObject.GetRealSpline representation are in this case identical. Cheers, Ferdinand
  • 0 Votes
    6 Posts
    630 Views
    ferdinandF
    Hello @dunhou, ah that was the critical bit of information for me, that is you plugin at work there Well, as always without code it is hard to say what is going wrong there. the main code about this function is like : SetBit() doc.InsertMaterial() c4d.CallCommand(12252) # Render Materials doc.GetActiveMaterial() textag.SetMaterial() and some undo and call the Node Editor for certain renderer or rules for the function ... Out of this selection, I would put my money on CallCommand and undo handling. Setting bits and calling the mentioned methods are far less likely candidates. But that is pure guess work. actually, I checked the c4d.IsCommandChecked(id) The first thing I would do, is search for the command ID of the Material Manager (12159) in your code and add a print statement to each place where either this command ID is invoked with CallCommand or places where an ID determined at runtime is invoked (silly example : CallCommand(random.randint(1000, 1000000))) Then run your plugin again. When you see 12159 being printed when the undesired behaviour happens, you know it must be your plugin which misfiring. When not, it might be a bug in Cinama 4D or one of its APIs. Cheers, Ferdinand