• Python Documentation - Icon Color

    2024 python
    4
    0 Votes
    4 Posts
    1k Views
    i_mazlovI
    Hi @del, It's hard to predict future changes. It's likely the c4d.ID_BASELIST_ICON_COLORIZE_MODE_CUSTOM + 1 approach would stay untouched for the compatibility reasons, but who knows if there'd be any change requests that'd break this. Cheers, Ilia
  • How to create Tabs with Python?

    2024 python
    4
    0 Votes
    4 Posts
    664 Views
    M
    @Dunhou @i_mazlov Thank you guys!
  • Sound effector - Volume

    python
    2
    0 Votes
    2 Posts
    514 Views
    ferdinandF
    Hello @merkvilson, Thank you for reaching out to us. Please put more effort into making yourself understood. While we prefer short and precise questions we do not want to guess what users mean. I assume you are talking here about the "Sound group" of the Sound Effector. But it has no "Volume" parameter, neither in this "Sound group", nor somewhere else in the object. The catch is here that "Sound" is not just a foldable group. Because we can select it (see screen below), we know it must be data type. [image: 1709284570444-25f548d1-cc2a-40c8-9e26-af1b080e8da2-image.png] Being set is here a c4d.SoundEffectorData instance, with it you can control the details in this sound section. To discover parameter values, please follow our Python Console: Parameter Drag & Drop manual. Cheers, Ferdinand
  • Change Dialog Text color

    2024 python
    4
    0 Votes
    4 Posts
    669 Views
    i_mazlovI
    Hello @momoko , Welcome to the Maxon developers forum and its community, it is great to have you with us! Getting Started Before creating your next postings, we would recommend making yourself accustomed with our forum and support procedures. You did not do anything wrong, we point all new users to these rules. Forum Overview: Provides a broad overview of the fundamental structure and rules of this forum, such as the purpose of the different sub-forums or the fact that we will ban users who engage in hate speech or harassment. Support Procedures: Provides a more in detail overview of how we provide technical support for APIs here. This topic will tell you how to ask good questions and limits of our technical support. Forum Features: Provides an overview of the technical features of this forum, such as Markdown markup or file uploads. It is strongly recommended to read the first two topics carefully, especially the section Support Procedures: Asking Questions. About your First Question Thanks to @Dunhou for providing correct solution! Cheers, Ilia
  • Can we handle drag document from treeview?

    windows python 2024
    3
    0 Votes
    3 Posts
    578 Views
    DunhouD
    Hi @i_mazlov , Sadly the GenerateDragData() not work in python, I had try the c4d.DRAGTYPE_FILENAME_SCENE, but it will return bad without GenerateDragData(),seems nothing we can do here. Cheers~ DunHou
  • Undraw Slider in TreeView?

    windows python 2024
    3
    2
    0 Votes
    3 Posts
    606 Views
    gheyretG
    Hi!@ferdinand Yes , That's what i want to do! I never didn't know LV_CHECKBOX_HIDE would work with LV_SLIDER, I simply assumed that it would only work with LV_CHECKBOX and LV_CHECKBOXUSER. But anyway i test it in my code , and it works perfectly! Thank you so much for your reply. Cheers~
  • How to access thinkin particles data channels correctly?

    c++ 2024
    3
    0 Votes
    3 Posts
    645 Views
    ferdinandF
    Hey @Aaron, thank you for sharing your solution! Cheers, Ferdinand
  • Cannot set layer parameter for capsules in 2024.3.1

    python 2024
    3
    1
    2 Votes
    3 Posts
    531 Views
    M
    Hi thanks for the detailed report, I fixed the issue it be available in the next non-hotfix release. As a workaround you can do dId = c4d.DescID(c4d.ID_LAYER_LINK) allObjects[i][dId] = myLayer Cheers, Maxime.
  • Unable to set override in take

    python
    4
    0 Votes
    4 Posts
    743 Views
    ferdinandF
    Hey @robpayne that is great to hear, thank you for informing us!
  • Timeline commands ran via Python script does not have same result

    2024 python
    8
    0 Votes
    8 Posts
    1k Views
    D
    Marvelous @Dunhou, thanks yet again!! Here's the final script in case someone else has use for it: from typing import Optional import c4d doc: c4d.documents.BaseDocument # The active document op: Optional[c4d.BaseObject] # The active object, None if unselected def main(): # Retrieves BaseTime of frame 5, 20 start = 0 end = 1 if c4d.CheckIsRunning(c4d.CHECKISRUNNING_ANIMATIONRUNNING) == True: c4d.CallCommand(12412) # Play Forwards # Loops through the frames for frame in range(start, end + 1): # Changes the time of the document doc.SetTime(c4d.BaseTime(frame, doc.GetFps())) # Updates timeline c4d.GeSyncMessage(c4d.EVMSG_TIMECHANGED) # Redraws the viewport and regenerate the cache object c4d.DrawViews(c4d.DRAWFLAGS_ONLY_ACTIVE_VIEW | c4d.DRAWFLAGS_NO_THREAD | c4d.DRAWFLAGS_STATICBREAK) # Pushes an update event to Cinema 4D c4d.EventAdd(c4d.EVENT_ANIMATE) if __name__ == '__main__': main()
  • VariableTag, Resize, and CopyTo

    2024 c++
    18
    0 Votes
    18 Posts
    3k Views
    D
    Hi Ilia, I'm on Mac 13.3 and C4D 2024.0.0 at the moment. Dan
  • Foldable Groups in Python GeDialog

    python 2024
    5
    0 Votes
    5 Posts
    935 Views
    i_mazlovI
    Hi @BretBays, Sorry for the delayed answer. Depending on how you picture the final look of your gui and how complex the behavior you'd like to have there, the means can be different. There's no easy way to achieve the same look as with "Freeze Transform" inside GeDialog. The suggested way would be to implement the logic manually and hide/show content by the button or a bitmap button. Such approach is demonstrated in the following examples: gedialog_menu_hide_content_r15.py that's pointed out by @Dunhou shows how to hide/show content customgui_quicktab_r19.py shows how to organize switch between your data using tab buttons If you really want to have the exact same look as foldable groups in the Description context, you could probably try drawing your layout with the DescriptionCustomGui that is capable of that (c++ example). However, I personally don't think this approach is worth the effort. Cheers, Ilia
  • List of object visible by a camera within Safe Frames

    s26 python 2023 2024
    8
    0 Votes
    8 Posts
    2k Views
    F
    Hi @i_mazlov , Thank you for confirming my solution. Best regards, Tomasz
  • Type Error when inserting geometry from a loaded file

    python 2023 windows
    3
    0 Votes
    3 Posts
    532 Views
    D
    @i_mazlov thanks ilia!!! ok that was truly obvious actually had to use 'c4d.documents.GetActiveDocument()' to make it work in my case ...
  • Capture the dragging and release of a marker via python

    2024 python
    4
    0 Votes
    4 Posts
    691 Views
    B
    Follow up but slightly unrelated question. If I have a GeDialog plugin with an edit field(for changing the Frame of a marker for example), is it possible to have it update while dragging vs on release? Is that some sort of CoreMessage thing? Right now I have a call inside of my Command function that basically says if the ID matches the edit field then set the marker frame. But I would like to be able to click and drag and see the marker's position move as I drag. Is that possible
  • Need help with python field - infection

    python 2024
    6
    0 Votes
    6 Posts
    1k Views
    ferdinandF
    Hey @SweepingMotion, first of all, I did not want to discourage you as such this would be only possible in C++. All I am saying here is that having points in a mesh which look up their neighbors and then do a possible iterative spreading algorithm per iteration sounds costly. You can certainly do this in Python, you should just brace for really bad performance when you run this on complex meshes with complex settings. That I used the modelling command for the growing part was not only based in my laziness but also the fact that the modelling command will run in C++ nice and fast. Your Problem Regarding your problem, I think I understand what you want. You want a field to (persistently) paint a vertex map to use this as a seed to run your simulation; think of a paint brush (the field) on canvas and the paint then spreading (the simulation). First of all, fields are not really meant to be persistent in that manner as that would be required here. Or to use your example, you would want your ballon tearing to continue even when the field on the tip of the needle is not touching any ballon vertex anymore after the ballon started tearing appart. Fields are also not meant to do these whole field space computations a simulation implies. I.e., you get the point x and the field sampler spit out values for its weight and vector. A field modifier layer would be better suited for running a simulation as they focus more on all values in a field. The problem is that modifiers do not do the sampling part for a transform with a falloff. So you would kind of need both. One could certainly do all this when motivated enough. You could for example simply precompute all values and then sample from a look-up table/cache when your field is sampled. But this all seems very complicated for no good reason. Recommendation I would still recommend using at least a Python TagData plugin. C++ would be better, using a Programming tag also works, but you must be hackier, be more knowledgeable to make it work. There are two ways how you could realize the field/brush influence thing you want: Ignore Mograph fields altogether. Here you would implement your own ObjectData plugin which does the painting. You would have two parts, the object(s) which are continuously painting sees into a vertex map, and your spider-in-the-net tag which then runs a simulation on that map. You would only need one vertex map in this case but would also have to reimplement falloffs and noise for the fields/brushes to the degree you need it. You use Mograph fields but you do not mix them with the simulation directly. The idea is to have two vertex maps. One seed vertex map is driven by MoGraph fields and you can go ham there, use all of MoMgraph to your liking. Your plugin tag would then copy from that seed map into a simulation map on each iteration and advance the simulation. For example by either blending values or taking the max value of both maps. On that other map you then run the simulation. This would have the advantage that you have the temporal persistence for free (since you copy from a volatile seed map into the persistent simulation map). You would also side step the fact that you would have to somehow weave the simulation into fields. If you wanted then wanted to pretty this up, you could make it so that your tag has field list and for the user it looks like that there is only the one output vertex map while the tag uses internally a hidden vertex map into which it feed the field list which is part of its UI. Number two is in my opinion the more sensible solution, number one would give you more freedom but would also be much more work. Cheers, Ferdinand
  • Python field error

    python 2024
    9
    0 Votes
    9 Posts
    2k Views
    S
    @m_adam said in Python field error: A fix is coming in one of the next version of Cinema 4D, so that OutputBlockSize == InputBlockSize and therefor you will not need to add this "useless" values at the end to fullfill the outValues. That's great news. I'll hold off till then.
  • How to evenly distribute objects of different 'width'

    python s26 windows
    6
    1
    0 Votes
    6 Posts
    2k Views
    i_mazlovI
    Hi @gsmetzer, please have a look at the related thread (How to get the bounding box for the whole scene) where your issue was explained in details by @ferdinand @ferdinand said in How to get the bounding box for the whole scene: a BaseObject will also not include its descendants in its bounding box computation So, one must carry out such computations oneself Cheers, Ilia
  • C4D crashes when removing node via MSG_MENUPREPARE

    python
    3
    0 Votes
    3 Posts
    687 Views
    M
    Hi @merkvilson I would say what you are trying to do is not well supported and MSG_MENUPREPARE was never designed for the current node to be removed. The correct way to do so, is to return False within your NodeData.Init method, this way the object is not created and therefor you do not have to remove it. Cheers, Maxime.
  • 0 Votes
    3 Posts
    604 Views
    M
    Thanks you answered my question, if it solves my problem we will see.