• What is the max parameter in BaseSelect.GetRange() really for?

    r21 python
    7
    0 Votes
    7 Posts
    1k Views
    CairynC
    yupyup, BaseSelect has no connection to the original object it actually selects from, not even in the cases where you get a pointer to the BaseSelect returned and change the selection directly through it. That's why we need the max parameter for SelectAll and ToggleAll -- the BaseSelect doesn't know what "all" even is. (Not GetLastElement()!) For GetRange() though, that reasoning does not apply. Now let's see whether I can crash C4D with inconsistent edge selections...
  • Access Python Tag Globals from outside

    python
    10
    0 Votes
    10 Posts
    1k Views
    indexofrefractionI
    Thanks zipit and Maxime, I use the MSG_BASECONTAINER solution now, thanks for the example ! one question here: you always return True from the message() function is that necessary? the docs here https://developers.maxon.net/docs/py/2023_2/manuals/introduction/python_tag.html?highlight=python plugin just says : Return type: bool Returns: Depends on the message type. ... and a bit off topic : is there a message, when a python tag or generator gets enabled / disabled by the (generator) switch in the object manager? can i catch that?
  • Do not delete your posts once you get an answer

    5
    2 Votes
    5 Posts
    892 Views
    gheyretG
    Thank you @m_adam
  • Customgui for ShaderLink

    maxon api r21
    4
    0 Votes
    4 Posts
    759 Views
    indexofrefractionI
    This is still missing in the Python SDK .....
  • Decoupling source from SDK project

    7
    0 Votes
    7 Posts
    1k Views
    F
    @kbar said in Decoupling source from SDK project: Since Maxon also updates the ProjectTool when a new version of C4D comes out and it may have new flags or optimazations and changes to the project structure for XCode and Visual Studio. From what I can tell it's pretty stable, also I don't mind what someone else thinks my compiler optimisation flags should be. Maintaining your own CMake version going forward for R20, R21, S22, RXX etc... would be a massive pain and just slow you down. Not as painful as you think it might be, also not as slow. Whatever floats your boat.
  • ToolPlugin Problems

    python s22 r21 r20 r19
    7
    2
    0 Votes
    7 Posts
    1k Views
    kbarK
    @gheyret great to hear! Looking forward to seeing what it is you are creating.
  • 0 Votes
    5 Posts
    834 Views
    AwesuusA
    Thank you so much, this works like a charm!!!
  • Requests for GeClipMap Class

    3
    0 Votes
    3 Posts
    486 Views
    ?
    @m_magalhaes Thanks, Manuel!
  • Best way to update objects after preference change?

    c++ r20 r21 s22
    7
    0 Votes
    7 Posts
    1k Views
    fwilleke80F
    Oh wait, I think I found a way. In case anybody else wants to know, here it is... In the PrefsDialogObject: Bool MyPrefsDialog::SetDParameter(GeListNode *node, const DescID &id,const GeData &t_data,DESCFLAGS_SET &flags) { BaseContainer* bc = MyPlugin::GetPreferences(); if (!bc) SUPER::SetDParameter(node, id, t_data, flags); switch (id[0].id) { // If PREFS_MYPLUGIN_SOMEVALUE was changed, store value and notify plugin objects in all open documents. case PREFS_MYPLUGIN_SOMEVALUE: bc->SetInt32(PREFS_MYPLUGIN_SOMEVALUE, t_data.GetInt32()); flags |= DESCFLAGS_SET::PARAM_SET; // Iterate open documents for (BaseDocument *doc = GetFirstDocument(); doc; doc = doc->GetNext()) { // Send broadcast message to each document, use unique ID doc->MultiMessage(MULTIMSG_ROUTE::BROADCAST, MyPlugin::UNIQUE_ID_PREFS, nullptr); } GeUpdateUI(); return true; } return SUPER::SetDParameter(node, id, t_data, flags); } And then, in the plugin object: Bool MyPluginObject::Message(GeListNode *node, Int32 type, void *data) { if (type == MyPlugin::UNIQUE_ID_PREFS) { GePrint("Aha! My prefs have changed!"_s); return true; } return SUPER::Message(node, type, data); }
  • C4D in VirtualBox... no viewport displayed

    windows r21 s22
    3
    0 Votes
    3 Posts
    602 Views
    fwilleke80F
    I guess VirtualBox is just not a good choice then. Damn. But thanks for the answer! Cheers, Frank
  • Controlling tessellation of c4d.SplineObject in python

    python classic api
    5
    0 Votes
    5 Posts
    881 Views
    CairynC
    @android Here's a thread for reference regarding the limitation of a Generator spline: https://developers.maxon.net/forum/topic/12596/is-it-possible-to-get-a-spline-wrap-object-to-use-a-python-generated-spline
  • Re-performing Hair Edit > Convert from Spline Command?

    r21 python
    5
    0 Votes
    5 Posts
    678 Views
    B
    @m_magalhaes Thanks! It works as expected. So that's what you mean by UniformToNatural. Basically, even if the segment guides are not the same as spline points, it will conform to its overall shape.
  • Toggle bitmap button on .res file

    python
    4
    0 Votes
    4 Posts
    859 Views
    ManuelM
    hi, Group is the key in UI. Simply add a SCALE_H; property for your slider. so for that two columns group, the slider will take all the place minus the button. GROUP { COLUMNS 2; REAL ONEFLOAT { CUSTOMGUI REALSLIDER; SCALE_H;} BITMAPBUTTON BUTTON_ID { SIZE 16; TOGGLE; BUTTON; ICONID1 5160; ICONID2 5159; } } Cheers, Manuel
  • How to use GetPolygonW/R under Python? ...if at all

    r21 python c++
    4
    0 Votes
    4 Posts
    537 Views
    ferdinandF
    Hi, jeah, that is probably somewhat the reason. Although Python has true statically typed arrays, which also can be used to directly in-place manipulate C arrays (i.e. array.array), from what I understand it is quite cumbersome to achieve such linkage. This is probably the reason why Maxon does not bother in this case and others like for example vertex colors. Including these access points is still a bit puzzling though. Maybe they are somehow used internally? But I cannot think of a case where this would make sense. Cheers, zipit
  • Changing Face Normal's Direction?

    r21 python
    5
    0 Votes
    5 Posts
    1k Views
    ManuelM
    hi, everything have been said, nothing to add here Cheers, Manuel
  • Thinking Particles allocation failure in new document

    python s22
    7
    0 Votes
    7 Posts
    1k Views
    ManuelM
    @ivodow said in Thinking Particles allocation failure in new document: So, would ExecutePasses() with the BUILDFLAGS_EXPORT flag set be typically called just before exporting to alembic (to be on the safe side)? the exporter is calling ExecutePasses several times, you don't really need it. And because the scene can be sometimes quiet complexe, you have to call it several times in a row. for example, in the alembic exporter : [image: 1597218183449-68d39647-ef56-430b-ae1a-2189e1b83617-image.png] Cheers, Manuel
  • Mouse positions and screen dimensions

    r20 r21 c++
    17
    4
    0 Votes
    17 Posts
    2k Views
    ManuelM
    hi, sorry, it get out of my mind. Cheers, Manuel
  • GeDialog shadows

    c++ windows macos r20 r19
    6
    0 Votes
    6 Posts
    1k Views
    ManuelM
    hi, this is the current state: "I think this is related to the ASYNC_POPUPEDIT being a non-resizable, modal dialog - and as such it is displayed kind of "Win legacy style" by the OS. Nothing we actively do set (and something which could change once they do further design overhauls in Win10)" Cheers, Manuel
  • Problem with TreeViewFunctions.HeaderClick in c4d r20, 21 22

    python r20 r21 s22
    3
    0 Votes
    3 Posts
    578 Views
    ManuelM
    hi, Since R20, arguments have been added, and the problem is coming from the last one def HeaderClick(self, root, userdata, lColID, lChannel, bDblClk, mouseX, mouseY, ua): I've opened a bug report Cheers, Manuel
  • Change the default name of ID_OBJECTPROPERTIES

    python
    3
    1
    0 Votes
    3 Posts
    708 Views
    mfersaouiM
    @m_magalhaes said in Change the default name of ID_OBJECTPROPERTIES: DEFAULT 1; Thank you much.