The Maxon SDK Team is currently short staffed due to the winter holidays. No forum support is being provided between 15/12/2025 and 5/1/2026. For details see Maxon SDK 2025 Winter Holidays.
  • Check User Data Link Field

    Moved
    3
    0 Votes
    3 Posts
    643 Views
    SwinnS
    @Swinn is None did the trick. Thanks.
  • c4d.utils.RangeMap clampval funkyness

    r20 python
    2
    0 Votes
    2 Posts
    274 Views
    ManuelM
    Hi, thanks a lot. I've opened a bug entry for that one. It will be fixed in a futur release. Cheers, Manuel
  • 0 Votes
    11 Posts
    2k Views
    Tasos MagkafasT
    @m_adam Dear Maxime thanks for everything! But, unfortunally now that I almost finished this part I realized that all this scripting doen't give me the desired procedural result. It just changes the values once but if i change the values of the PARENT object the OBJECT_A (child) is not updated... Anyway I have to approach it in a different way. I think I should tag this thread as "SOLVED" and in case I need again help i create a new one. Please advise me Maxime. And for one more time THANK YOU both , Maxime and Zipit
  • Render to Picture Viewer with fields problem.

    Moved
    7
    0 Votes
    7 Posts
    1k Views
    Danchyg1337D
    @m_adam Thank you for reply. I would probably send my code to your email to try to figure it out better. What i see so far is that in renderer, fields returns 0 for each point they sample. I have a function which samples fields and accepting a result to each vertex. For example imagine extrude with fields. In viewport i see extruded points, but in renderer everything is flat, like there is no field or it is so far to make any extrusion and returns 0. for each point. Second is more likely due to my tests.
  • Undo for a TagData?

    5
    0 Votes
    5 Posts
    895 Views
    M
    As said previously this is not possible in the execute method to add an undo event because this execute method is called during the execute. But if I understood correctly you have an UserData attached then this UD drive children parameters. If that's the case you can react to this parameter change (coming from the GUI which is a Main Thread thing) and then apply the undo. You can find an example in https://developers.maxon.net/forum/topic/12479/update-button/3 Cheers, Maxime.
  • Texture renaming

    Moved python
    16
    0 Votes
    16 Posts
    2k Views
    M
    @zipit hm yes this sounds too complicated overall, particularly point 3 there could so much happen on the os side. A gui with more options like renaming the hole texturename or a replace option of certain words could be the way forward. Instead of undo it would be easy then to rename the texture with he old name etc. for now im happy how this works and let this solved. Much Thanks! Cheers, moko
  • Python NODES - Shouldn't really they can change the scene?

    Moved
    19
    0 Votes
    19 Posts
    4k Views
    ferdinandF
    @SolarPH said in Python NODES - Shouldn't really they can change the scene?: Edit: One thing though, this code kinda has it's own holes, because I encountered a problem ... I never said that it is perfect, I just implemented, what I thought you were after. If you want to find all file paths where the file name matches the file name part of a given preset URL, you could use os.walk. Something like this: def find_preset_url_candidates(url): """Find all OS file paths for which the file name matches the file name of a given MAXON preset url. Args: url (str): The url in the MAXON 'preset' scheme to resolve. Returns: list[str]: The resolved preset paths. Raises: ValueError: When the argument preset_url is not a valid preset url. """ # Half-heartedly sort out some malformed preset urls. url = str(url) if (not url.startswith("preset://") or not url.endswith(".lib4d")): msg = r"Not a preset url: {}." raise ValueError(msg.format(url)) # Split the url into the scheme-path and filename-extension parts _, preset_file = os.path.split(url) candidates = [] # For each preset path walk that path and test if any file matches the # file name of our preset file name. for preset_path in PRESET_PATHS: for root, folders, files in os.walk(preset_path): if preset_file in files: candidates.append((os.path.join(root, preset_file))) return candidates My example does not deal with any fuzzy path searches / does not sort its output by the edit-distance (you would have to do that yourself). To test successfully against something like testrig0.lib4d you would have to implement a Hamming distance or Levenshtein distance to sort out what is close enough. For your example you would need the latter. Or you could just use a regular expression if you do not care about the edit distance. Cheers, zipit
  • Custom GUI button via resource description

    c++ r20 r21
    3
    0 Votes
    3 Posts
    610 Views
    C4DSC
    @PluginStudent You mentioning the BITMAPBUTTON and with the help of ExampleSculptGrabBrush::GetDDescription from the cinemasdk I was able to make it work. Thanks.
  • User Area and ScrollArea()

    r20 python
    4
    0 Votes
    4 Posts
    534 Views
    P
    Yes, I use the auto way. I thought that using ScrollArea() it would only display that part (no need to draw the other parts). So, fill the virtual UA once and then display parts of it using ScrollArea(). But if "you still need to draw completely the GeUserArea with all the DrawBitmap", there will be no speed benefit. I will try it under R21 and will read "Profiling Python Plugins". Thank you, Pim [image: 1586507628642-24fbc034-a80c-42f0-acb3-77deffeadaec-image.png]
  • Cannot write specific values to UVWTag

    r20 r21 c++ python
    6
    0 Votes
    6 Posts
    646 Views
    r_giganteR
    It's actually due to a lower number of bits used to store the floating value.
  • Custom FIELDLAYER_CHANNELFLAG

    r20 c++ classic api maxon api r21
    7
    1
    1 Votes
    7 Posts
    1k Views
    mikeudinM
    @m_adam @zipit @PluginStudent OK, thank you guys!
  • Set Track Data Method?

    r21 python
    4
    0 Votes
    4 Posts
    371 Views
    B
    @zipit @m_adam Apologies for the late response. Thank you for the confirmation both. I will close this for now.
  • 0 Votes
    15 Posts
    1k Views
    M
    Looking at the doc in R19: [image: 1586334998271-5fdf5fb0-1327-4589-b6b6-d68af8869c11-image.png] [image: 1586334983049-821d97fa-e103-4cca-84b1-85f0f50304f0-image.png] So I'm afraid there is no simple solution that will work on each version maxon::String being introduced in R20, you will need to adapt your code. Cheers, Maxime.
  • Need Help Debugging EXC_BAD_ACCESS error during render

    r21 macos c++
    8
    1
    0 Votes
    8 Posts
    911 Views
    r_giganteR
    Hi @JuicyJuggles , I apologize for coming late here but luckly you've been already provided in the meanwhile of some good guidance from @PluginStudent and @zipit . Rest assured that the API documentation is, by far, the best place where to look for answers although I can see that, due to huge number of covered topics, it could take time to get used to browse it effectively. Last but not least, if the issue is addressed, don't forget to mark the right post as correct answer or if it's not possible to identify a specific one, to set the whole topic as Solved Cheers, Riccardo
  • Avoid: IsActive()

    python classic api
    10
    0 Votes
    10 Posts
    1k Views
    lasselauchL
    Thanks @m_adam for the insights! Works like a charm!! Cheers, Lasse
  • Python Generator - Linking ports to xpresso node

    14
    0 Votes
    14 Posts
    2k Views
    M
    Hi sorry to jump on this topic so late, and I agree that if you could do what you want in a Python Scripting tag its preferred, the mains issue with xpresso is that its a whole system that assumes certain things and was really not designed to be embedded within a generator. So the issue about the AddNode, not working is because user data things, as an object xpresso node, is something dynamic (they will change according to the linked object) and I found no way except via the UI (by asking a UI Redraw or a whole scene execution) to refresh these data so the GvPort can be created. But since you are in a Generator you don't have access to the GUI since all GUI operation should be done in the Main thread see Threading Information. Cheers, Maxime.
  • Change Color of Hyperlink Customgui

    3
    0 Votes
    3 Posts
    566 Views
    lasselauchL
    Okay! Thanks for the info @m_adam ! Oh, and on macOS it is General - Text - Flag Edit Saved [image: 1586176239242-bildschirmfoto-2020-04-06-um-14.28.13.png] ¯_(ツ)_/¯ Cheers, Lasse
  • 0 Votes
    3 Posts
    600 Views
    M
    While the method provided by Zipit Is fine, it is not 100% reliable. here how to achieve, unfortunately, the ELEMENT_Count value is hardcoded and no way for you to retrieve it. constraintTag = doc.GetActiveTag() targetCount = constraintTag[c4d.ID_CA_CONSTRAINT_TAG_PARENT_TARGET_COUNT] for i in range(targetCount): CONSTRAINT_ELEMENT = 10 # This is hardcoded targetId = c4d.ID_CA_CONSTRAINT_TAG_PARENT_TARGET_COUNT + i * CONSTRAINT_ELEMENT + 1 print(constraintTag[targetId]) Cheers, Maxime.
  • VoxelizationInterface

    r20 sdk c++
    10
    0 Votes
    10 Posts
    1k Views
    N
    Thank you Manuel !! this is exactly what I was looking for
  • Python Generator - Adding Shaders to Deformer Objects

    python
    11
    0 Votes
    11 Posts
    2k Views
    M
    @mp5gosu Ah brilliant. Thanks for that! And apologies for being such a noob at this.