• Where Can I Find Documentation for Licensing a Python Plugin?

    python
    6
    1
    0 Votes
    6 Posts
    1k Views
    ?
    @kbar Thank you for your response. That's really helpful, thank you.
  • This topic is deleted!

    1
    1
    0 Votes
    1 Posts
    4 Views
    No one has replied
  • How to handle C4D Unicode in Python scripting?

    r21 python windows
    12
    0 Votes
    12 Posts
    2k Views
    CairynC
    @zipit said in How to handle C4D Unicode in Python scripting?: well, that API object names thing is a flaw of Python 2. So working as expected or not as expected is a bit a question of the point of view. If you got the string passed from any other source the problem would be the same. Right. The main thing is to understand the issue, and then to write the chapter in a way that explains what to watch out for. (I do wonder how third-party modules would do with a name string passed to them from a script that reads them from the API... well, another bridge to cross another day.) Python 3 clearly is superior in that respect, as there is no unicode class and all str objects are unicode (what they appear to be already in C4D, but with matching len, index, and slice capabilities). On a more productive note: I think that focusing in Unicode strings isn't really that important for Python stuff in c4d, since object names should be something you largely ignore as they are a unreliable source of identification and only are rarely important in other contexts. Hmm, I am not sure whether I would agree to that. Good naming is essential to find your way through complex scenes, and a good naming schema can be built in a way that is friendly to string search and comparison criteria, esp. if you can build your own scripts to perform the search and selection. I just point at the _L _R naming schema for joints that is common in C4D's docs. Of course, if your objects are all named Cube, Cube.1, Cube.2, Cube.3, then name-based identification may be unhelpful Anyway, I am not the person to judge that, as I am only teaching Python to interested users. What they do with it is their own decision; I just have to point out the crucial points so they can apply the code to their own concepts.
  • Preventing SetDocumentData from switching to active tool

    python r20 windows
    5
    0 Votes
    5 Posts
    827 Views
    B
    I'm just going to go ahead and mark this as solved. Either using an empty Basecontainer or the set function solve the problem. Thank you for explaining!
  • Howto add a Field input to a python plugin

    python r19 r20 r21
    3
    0 Votes
    3 Posts
    638 Views
    P
    @s_bach said in Howto add a Field input to a python plugin: FIELDLIST works fine - i think i got an strange error before and trying CUSTOMFIELDLIST etc. solved
  • LocalDateTime and UniversalDateTime questions

    r21 c++ maxon api
    5
    0 Votes
    5 Posts
    652 Views
    ferdinandF
    Hi, well, aside from the "at least I am done with it"-approach of just adding 24 hours to each license, there is the static method UniversalDateTime::FromValues() which should be close enough to a FromString(). There is also UniversalDateTime::GetNow(). But the description on that is a bit ambiguous. It says "Return[s] the current date-time object of the current time zone.", while the UniversalDateTime class description says "Class that represents the Universal date-time (UTC+0000)". Unless I am overlooking something here, I would say both cannot be true at the same time, and would expect UniversalDateTime::GetNow() to actually return the current time in UTC +0 (as a UniversalDateTime). The problem with DST is, that it is not anything truly predictable. While your problem could be rooted in a bug, there is a rich history of big organisations struggling with DST (Microsoft, Apple, etc.) and using DST makes you dependent on them maintaining their OS/services properly. On a more light-hearted note: When dealing with standardisation of human conventions I always have to think of this XKCD [image: unicode.png] Cheers zipit
  • BFM_INPUT_DOUBLECLICK in GeUserArea...

    c++ classic api macos
    7
    0 Votes
    7 Posts
    828 Views
    fwilleke80F
    OK, thank you!
  • Can STATICTEXT be multi line?

    4
    0 Votes
    4 Posts
    485 Views
    fwilleke80F
    Thank you, that's what I suspected
  • ObjectData plugin not rendering to picture viewer

    Moved
    6
    0 Votes
    6 Posts
    1k Views
    S
    Hello, as now said multiple times, GetActiveDocument() must not be used, but GetDocument() instead. What is the point of your In/Exclude list? Are these the objects you "rotate along the timeline"? This is typically not how a ObjectData object works; it generates objects based on its child objects or deforms objects in its hierarchy. It is not supposed to move arbitrary other objects. As mentioned above, a tag plugin may be the better solution. The "look_at_camera" example show such a plugin rotating its host object. best wishes, Sebastian
  • SendModelingCommand Failing

    python r21
    9
    0 Votes
    9 Posts
    2k Views
    ManuelM
    hello, I forgot to ask, where are you running those commands ? on a script, a dialogbox, a nodedata ? Thanks for your time trying to isolate the problem. Don't hesitate to send us an heavy scene, we can see why the command isn't working. Cheers, Manuel
  • Critical Stop when deleting a plugin object

    2
    1
    0 Votes
    2 Posts
    357 Views
    r_giganteR
    Hi Frank, thanks for reaching out us. With regard to the reported issue, since we can easily end up in a lot of guess work, would you mind to privately share (email) the plugin to let us run some tests here? Thanks, Riccardo
  • Updating ObjectData plugin only on timeline change

    Moved r20 python
    6
    0 Votes
    6 Posts
    1k Views
    G
    Fantastic, Thank you for the suggestions, ObjectDataOptimizeCache(true) does what I need.
  • Keyframing a property using python.

    Moved
    3
    0 Votes
    3 Posts
    854 Views
    M
    Hi Manual, Thanks for your help! Next time I will use the 'ask question' when posting a question. You code does exactly what I need, much appreciated! Cheers, Martijn
  • Retrieve Center Pivot of Three or More Objects?

    r21 python
    8
    0 Votes
    8 Posts
    933 Views
    B
    @s_bach Thanks for the response! Works as expected. @zipit No worries. Will close this thread. I will probably revive this a year from now (lol). I have a feeling that Matrix will haunt me again in other aspects so this would be a nice exercise if that happens. Thanks again!
  • ProjectTool problems in MacOs Catalina

    5
    0 Votes
    5 Posts
    1k Views
    r_giganteR
    Hi c4dmac, thanks for following up here. With regard to the issue you've reported you can get fixed by reestablishing the executable bit on the kernel_app file found in the zip archive. To sum it up, upon downloading the project tool archive you have to: remove quarantine xattr -d "com.apple.quarantine" ./cinema4d_r21_project_tool_20190903.zip extract the archive (either via terminal or via finder) unzip -d ./cinema4d_r21_project_tool_20190903 ./cinema4d_r21_project_tool_20190903.zip re-establish the kernel_app executable bit chmod 555 ./cinema4d_r21_project_tool_20190903/kernel_app.app/Contents/MacOS/kernel_app Best, Riccardo
  • Insert Button for Plugin into standard palette

    python r20 windows
    4
    0 Votes
    4 Posts
    788 Views
    B
    Thanks for the input! It's a shame you can't fiddle with the palettes. I think I'll just do it like x-particles and have a command that loads the palette and the user can dock it himself. Not the most elegant, but gets the job done. Cheers
  • LocalDateTime, UniversalDateTime... how to compare

    c++ r21 classic api maxon api
    13
    0 Votes
    13 Posts
    1k Views
    fwilleke80F
    Thank you, Ricardo!
  • Retrieve the Bottom Center Pivot of an Object?

    r21 python
    5
    0 Votes
    5 Posts
    709 Views
    M
    Hi @bentraje beside zipit said which is indeed correct you may found interesting a plugin I made a long time ago when I started python, which has exactly this purpose but also supports specific objects such as sweep, spline and so on. https://github.com/gr4ph0s/graph_bottom_center_axis/blob/master/bottom_axis_center.pyp Cheers, Maxime.
  • FileFormat Exporter

    4
    0 Votes
    4 Posts
    713 Views
    E
    Thank you. That worked like a dream.
  • Gray Out Custom UI Bitmap Button?

    r21 python
    9
    0 Votes
    9 Posts
    1k Views
    B
    @Cairyn Gotcha. Thanks for sharing! @m_adam ". . . but until everything is moved to the new core" That's a nice tease there