• SculptTag

    Cinema 4D SDK r20 python windows
    6
    0 Votes
    6 Posts
    768 Views
    M
    The bug is fixed in S22. Cheers, Maxime.
  • Ptex Shader Progress

    Moved General Talk c++ windows r21
    8
    2
    2 Votes
    8 Posts
    2k Views
    r_giganteR
    Hi @wuzelwazel, thanks a lot for sharing your progresses on the Ptex Shader and for sharing your code. I've moved the thread to the more appropriate "General Programming & Plugin Discussions" hoping other developers could contribute to the discussion. Cheers, Riccardo
  • C++ Shader Plug-In Best Practices

    Cinema 4D SDK c++ r21 sdk windows
    6
    1
    3 Votes
    6 Posts
    1k Views
    ManuelM
    hello, thanks @PluginStudent for the answer here if (obj != nullptr) // If I'm checking for nullptr could I just use if(obj) as in Python? The correct way is to check against nullptr, that's a c++11 standard. if (obj) could lead to false positive and bugs. String is not the same thing as maxon::String. String is the classic API while maxon::String is the Maxon API. You can read more about that in the manual about strings Error handling is super eady to use, we got every thing to do so, you should definitely use it. Check Our manual about Error Handling Last but not least you can probably use our Url class to handle file or filename. Give it a look Cheers, Manuel
  • R21 Windows System Error

    Cinema 4D SDK r21 c++ windows
    4
    0 Votes
    4 Posts
    1k Views
    S
    Hello, as Riccardo has pointed out, AdditionalIncludeDirectories has nothing to do with DLLs. It is used to define search paths for header files. See Additional include directories. It was never valid. Also, looking at the error, the plugin was installed into the C:/Program Files folder. In R21, there is no reason to install plugins there; one can install plugins at any location and just tell Cinema 4D the plugin path. best wishes, Sebastian
  • Issue with registering a ToolData

    Cinema 4D SDK
    3
    0 Votes
    3 Posts
    634 Views
    a_blockA
    Hi Maxime, thanks a lot! Both are valid solutions for me. Very helpful. Cheers
  • 0 Votes
    3 Posts
    944 Views
    r_giganteR
    Hi jhpark, thanks for reaching out us. Aside from the notes left by @blastframe - thanks dude for the remarks - I think it's worthy, thinking of a more generic scene, to mention the need BaseDocument::ExecutePasses() to be sure that everything is actually evaluated before querying the scene rather than the EventAdd() which serves a different scope. This function is responsible to execute the scene evaluation and, consequently to be sure that, moving from a frame to another, all the items in the scene reflect the changes imposed by the frame switch. The approach used by @blastframe actually operates on CTracks and key but, although this approach works fine for your specific case, when more evaluation dependencies are created in the scene you could easily end up in unexpected results. The code could then look like frames_count = 10 # [Set] frames counter for f in range(0, frames_count): doc.SetTime(c4d.BaseTime(f, doc.GetFps())) # evaluate the scene doc.ExecutePasses(None, True, True, True, c4d.BUILDFLAGS_NONE) obj = doc.SearchObject('Cube') # get object position x = int(obj.GetMg().off.x) y = int(obj.GetMg().off.y) z = int(obj.GetMg().off.z) # get object color r = int(obj[c4d.ID_BASEOBJECT_COLOR].x * 255) g = int(obj[c4d.ID_BASEOBJECT_COLOR].y * 255) b = int(obj[c4d.ID_BASEOBJECT_COLOR].z * 255) print("Frame = " + str(f) + ", (X,Y,Z) = " + str(x) + "," + str(y) + "," + str(z) + ", RGB = " + str(r) + "," + str(g) + "," + str(b))
  • Building Cinema 4D SDK on Windows

    Cinema 4D SDK r21 c++ sdk windows
    3
    0 Votes
    3 Posts
    582 Views
    W
    Thank you @m_magalhaes! I needed to open the plugins.sln solution instead of the project file. I feel like I've learned something, but I'm not sure what
  • c4dpy.exe and VS Code on Windows?

    Cinema 4D SDK python windows r21
    9
    1 Votes
    9 Posts
    3k Views
    M
    @rossc1 Thanks for the inputs, I will for sure add a note in the documentation regarding this issue. Just as a follow-up from the current status, it is confirmed and while there is a behavior change in our side due to the new licensing mechanism, the issue also comes from Visual Studio Code, reading directly raw string to detect a valid interpreter, and fail if something is not formated as it wants. However, we received the official confirmation from Visual Studio Code that they will not change their implementation, and not support custom interpreters. But we are still on it. Regarding your needs for an IDE, you can use Pycharm, the only pre-requires is to rename c4dpy to python, unfortunately, we can't officially recommend doing such things since newer OS (Catalina) prevent user changing content of an application package but @dskeith explained everything cleary in How to use c4dpy for Cinema4D R20 SP1. Cheers, Maxime.
  • 0 Votes
    4 Posts
    838 Views
    D
    @m_magalhaes I'll write it in your way Thank you very much. Cheers!
  • Attach XPresso Graph to GUI via Python

    Cinema 4D SDK
    9
    1
    0 Votes
    9 Posts
    2k Views
    DunhouD
    @ashton_fcs_plugindev That is so cool , Is it finish yet? I am new to GeUserArea too , That's a dreamly example to learn GeUserArea.
  • 0 Votes
    9 Posts
    1k Views
    S
    I think we are talking past each other. You can of course build any project any way you like. An then make sure that your plugins link to the build result using the link options defined in projectdefinition.txt. But I think you want to include an already existing (non-plugin) project in the solution created by the Project Tool, right? And I think that is not possible. I guess you could add the project manually to the solution created by the Project Tool.
  • Output all renderpaths

    Cinema 4D SDK r20 r21 windows python
    3
    1 Votes
    3 Posts
    584 Views
    B
    Thanks Maxime! In the mean time I will cycle through takes, AOVs and Frames manually to get the paths.
  • 0 Votes
    5 Posts
    934 Views
    B
    Thanks! I'll try that.
  • Use existing data for DynamicDescription

    Cinema 4D SDK c++ windows r21
    3
    0 Votes
    3 Posts
    660 Views
    O
    Thanks @s_bach This is very helpful. Best wishes.
  • 0 Votes
    5 Posts
    776 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!
  • How to handle C4D Unicode in Python scripting?

    Cinema 4D SDK 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.
  • 0 Votes
    4 Posts
    729 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
  • R21 SDK build error

    Cinema 4D SDK r21 sdk c++ windows
    7
    0 Votes
    7 Posts
    1k Views
    A
    Thanks for your advice. The build is complete. It was because VS2017 when Unity was installed was old. Now you can build other plugins. Thank you very much.
  • 0 Votes
    3 Posts
    618 Views
    N
    Hey zipit, thanks for the answer! Exactly what I needed! Best Regards, Florian
  • Modifier parameters change uppon scaling

    Cinema 4D SDK r20 c++ windows macos
    3
    0 Votes
    3 Posts
    553 Views
    N
    Hello Sebastian, thanks for this quick response! I dind't know about this. But this solved my issue! Best Regards, Florian