• Objects created in real time

    Cinema 4D SDK python r19 r21 r20
    6
    0 Votes
    6 Posts
    1k Views
    ManuelM
    Hello, For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here. Q&A New Functionality. How to Post Questions especially the tagging part. @zipit and @Cairyn have already answer here (thanks a lot) nothing to add. Cheers, Manuel
  • python combobox get current value

    Cinema 4D SDK r21 r20 r19 python
    4
    0 Votes
    4 Posts
    841 Views
    ManuelM
    Hello, For your next threads, please help us keeping things organised and clean. I know it's not your priority but it really simplify our work here. Q&A New Functionality. How to Post Questions especially the tagging part. I've already done for this thread. I can just confirm what @zipit said. Nothing to add Cheers, Manuel
  • Interact with Plugin Dialog [R21][Win][python]

    Cinema 4D SDK python r21 r20 r19
    7
    0 Votes
    7 Posts
    1k Views
    ManuelM
    hello, I'll mark this thread as solved tomorrow if you have nothing to add. Cheers, Manuel
  • Drag and Drop onto Range Slider

    Cinema 4D SDK python r19
    15
    0 Votes
    15 Posts
    2k Views
    ManuelM
    hello, I'll mark this thread as solved tomorrow if you have nothing to add. Cheers, Manuel
  • Set Knot Value of RangeData, bug?

    Moved Cinema 4D SDK r19 python
    3
    0 Votes
    3 Posts
    618 Views
    G
    Thank You, How embarrassing I forgot to write back to the UserData. (I shouldn't code late at night) Solved.
  • Graphview OpenDialog id?

    Cinema 4D SDK r19 python
    4
    0 Votes
    4 Posts
    546 Views
    ManuelM
    hello, ID_TREEVIEW_PLUGIN 1001145 ID_EXPRESSION_PLUGIN 1001148 ID_OPERATORPOOL_PLUGIN 1001138 ID_EXPRESSION_TAG 1001149 last one should be but it's not defined in python. ID_CALCULATE_PLUGIN 400009000 cheers, Manuel
  • utils.ViewportSelect() Problem

    Cinema 4D SDK r19 r20 r21 python
    5
    0 Votes
    5 Posts
    897 Views
    gheyretG
    @zipit Thank you man ! I see how to fix it now!~~ Cheers harry
  • 0 Votes
    4 Posts
    612 Views
    S
    Hello, there is no thing as mouse direction. The mouse has a position. The direction is the result of comparing two mouse positions. as @zipit stated, you can create a tool that implements MouseInput(). Within MouseInput() you can use ViewportSelect.PickObject() to check what object and what point the mouse is currently over (Using BaseView.SW()). You can store the previous mouse position and compare it to the current mouse position to calculate the direction. Unfortunately, there is an issue with the Python version of PickObject() (How do I find the z-depth with Python ViewportSelect.PickObject()?), so you might have to implement your idea as a C++ plugin. You find some code in the pickobject.cpp example. best wishes, Sebastian
  • Detect if inside the Material Editor

    Cinema 4D SDK python r19 r20 r21
    2
    0 Votes
    2 Posts
    320 Views
    ferdinandF
    Hi, check RENDERFLAGS (Link). You will have listen in NodeData.Message() for them. I never did use this, but checking for RENDERFLAGS_PREVIEWRENDER sounds promising. Cheers zipit
  • Get shader's parent ID

    Cinema 4D SDK python r19
    8
    0 Votes
    8 Posts
    1k Views
    A
    @m_magalhaes said in Get shader's parent ID: hello, thanks @zipit ^^ just one thing, in the context of the script manager, you don't need DOC = c4d.documents.GetActiveDocument() there is already doc. cheers, Manuel. Corrected! Thank you Manuel!
  • Spline with closed and open segments

    Cinema 4D SDK python r19 r20
    5
    0 Votes
    5 Posts
    881 Views
    a_blockA
    Thanks, Manuel, for looking into it. Maybe worth a note in the docs? It is a bit confusing, isn't it? Cheers to the entire team, Andreas
  • Hair material Thickness Texture on spline segments

    Cinema 4D SDK r20 r19 c++
    6
    0 Votes
    6 Posts
    915 Views
    rsodreR
    @m_magalhaes Based on the hair_shader.cpp example, I implemented a workaround with a custom shader on the Texture attribute, using calc_sample to sample per segment. Works fine!
  • Add Position Velocity Port

    Cinema 4D SDK r19 python
    7
    0 Votes
    7 Posts
    1k Views
    A
    @m_magalhaes said in Add Position Velocity Port: Hello, Sorry for the late reply. This was a bug (with other ports also) and it's fixe for the next release. Cheers Manuel @m_magalhaes Ah OK! Thanks for lettings us know!
  • Jiggle modifier not cached

    Cinema 4D SDK c++ r20 r19
    3
    0 Votes
    3 Posts
    452 Views
    ManuelM
    Hello, Regarding the question yes, using GetDeformCache is the way to go. Using one object, there's not too much difference between MCOMMAND_CURRENTSTATETOOBJECT and MCOMMAND_JOIN as the MCOMMAND_JOIN is calling a MCOMMAND_CURRENTSTATETOOBJECT for each object. The obvious part is that the Join command will create one object while the other will return a hierarchy. (if there are children) Cheers, Manuel
  • Export objects with materials to new document

    Cinema 4D SDK python r19
    2
    0 Votes
    2 Posts
    431 Views
    A
    Found it! c4d.documents.IsolateObjects(doc, t_objects) A helper routine to copy the objects t_objects of document doc to a new document (returned). All materials associated are also copied over and the links are corrected. Parameters: doc (c4d.documents.BaseDocument) – The document that contains the objects in t_objects. t_objects (List[c4d.BaseObject]) – The objects to isolate. Return type: c4d.documents.BaseDocument Returns: The document containing the isolated objects. Thank you all !
  • std compile error

    Cinema 4D SDK r19 c++
    6
    0 Votes
    6 Posts
    987 Views
    M
    I know this is quite an old topic, @m_magalhaes @Jmelon it would compile if you put c4d.h at the end of all other STL includes
  • Datastorage unique and ordered

    Cinema 4D SDK r19 r20 c++
    8
    0 Votes
    8 Posts
    840 Views
    ManuelM
    hello, It's not related to Iterator. This simple example also complain about the default constructor. #include <iostream> class MYINT { public: MYINT(int inInt) { _myint = inInt; }; private: int _myint; }; int main() { MYINT myint; system("pause"); return 0; } It should say 'hey i don't have any constructor with no parameters". But if you give him something to initialize with it understand. MYINT myint = MYINT(10); MYINT myOtherInt = 10; MYINT myThirdInt(10); all this will end with _myint = 10; Cheers Manuel
  • 0 Votes
    10 Posts
    2k Views
    A
    Hi Manuel, Right! Found the culprit... symbolcache file... Couldn't understand how it was working for you and not for me. After deleting symbolcache worked straight away and it seems that also works without having doc.SetActiveTag(outro_cal_tag) Thank you very much for your awesome help with this! Andre
  • Detecting TriState

    Cinema 4D SDK c++ r19 r20
    9
    0 Votes
    9 Posts
    934 Views
    ManuelM
    hi, yes closed is a better word in that case, I still need to add something in the documentation. Cheers, Manuel
  • HashMap with BaseArray as value

    Cinema 4D SDK r19 c++
    3
    0 Votes
    3 Posts
    519 Views
    C4DSC
    @r_gigante Thanks for the headsup about FindOrCreateEntry. Since Put does use that method internally, I didn't even consider about trying to use it, as I simply assumed it would have the same issue. Guess I was wrong about not trying it. Problem solved.