Navigation

    • Register
    • Login
        No matches found
    • Search
    1. Home
    2. InterfaceGuy
    3. Posts
    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups

    Posts made by InterfaceGuy

    SplineMask Render Visibility Not Working

    Hello,

    I think I found a bug with the SplineMask and Sketch and Toon material.
    When I apply the material to it, turning its render visibility off doesn't do anything.

    To replicate:

    • create a spline mask with e.g. a rectangle and a circle as children
    • apply a sketch and toon shader to it
    • try turning off the visibility in renderer

    With regular splines, MoSplines etc. it works as expected.

    Am I missing something?
    If so, help would be appreciated, if not I hope it gets fixed soon.

    Thanks

    posted in General Talk •
    RE: Access Spline Field Parameters with XPresso

    Thank you for the elaborate reply, it worked! (And helped me to better understand the desc id system)

    posted in Cinema 4D SDK •
    Access Spline Field Parameters with XPresso

    Hello,

    I want to create an xpresso which accesses the offset parameter of a spline field layer in a plain effector. This proves to be more difficult than I thought because, unlike e.g. a linear field, the spline field layer is not a regular object in the hierarchy.

    Naively I thought this would work with the general pattern of adding a port to the xpresso node using the description id:

    offset_port = gv_node.AddPort(c4d.GV_PORT_INPUT, DESC_ID_OF_PARAMETER )
    

    But I don't know what the description id should be in this case. Or if that is even the right way to go in this situation.

    Dragging the parameter into the console returns:

    Plain[c4d.FIELDS,11,1011]
    

    Help is appreciated

    posted in Cinema 4D SDK •
    RE: Strange Bug with Correction Deformer and Bounding Box Node

    Oh yes that's a much better approach!

    I will provide executables from now on, sorry for the trouble

    To be honest I was just stuck in an inaccurate frame for how to solve this... thanks for breaking it 🙂

    posted in Cinema 4D SDK •
    Strange Bug with Correction Deformer and Bounding Box Node

    Hey there,

    I am making use of the trick where I put a correction deformer under a generator (extrude object in this case) to make it readable by the bounding box xpresso node

    However, for some strange reason it only works when I add the deformer manually to the scene.
    Using python to create the object somehow makes it impotent for this method.
    Even dragging it out of the hierarchy and back in again, refreshing xpresso etc. doesn't help with the problem.

    Only creating a new deformer manually seems to do the trick.

    Please help me make sense of this and fix it.

    Thank you

    posted in Cinema 4D SDK •
    RE: Set IRR settings

    Works like a charm, thank you!

    posted in General Talk •
    Set IRR settings

    Hello,

    in this thread it is explained how to set the size of the IRR.

    I would also like to set parameters like the resolution.

    When dragging the GUI element into the console it says:

    Sniper[c4d.IRR_DETAIL]
    

    and when I execute it without the ID I get

    >>> Sniper 
    <c4d.BaseList2D object called Sniper/Sniper with ID 430000000 at 4756143680>
    

    How can I get access to this inside a script?

    Thank you!

    posted in General Talk •
    RE: How to Manually Build the Cache for a Vector Import Instance?

    works like a charm, thank you!

    posted in Cinema 4D SDK •
    How to Manually Build the Cache for a Vector Import Instance?

    Hello,

    now with the updated Vector Import object in S26 I thought there might be a more elegant way to import an SVG directly to a spline.
    But after playing around with it for a bit I am struggling to extract the spline from the setup using python only.

    Here is my code:

            vector_import = c4d.BaseObject(1057899)
            self.document.InsertObject(vector_import)
            # set file path
            file_path = os.path.join(SVG_PATH, self.file_name + ".svg")
            vector_import[c4d.ART_FILE] = file_path
            # extract spline from hierarchy
            vector_import[c4d.ART_SHOW_HIERARCHY] = True
            c4d.CallButton(vector_import, c4d.ART_RELOAD)
            c4d.EventAdd()
            spline = vector_import.GetDown().GetDown().GetDownLast()
    

    The problem seems to be that even after calling the reload button and c4d.EventAdd() which makes the hierarchy containing the spline visible in the GUI, C4D does not recognise that the vector_import object now has children.

    Help would be appreciated!

    posted in Cinema 4D SDK •
    RE: Add Field to Effector

    I found a code sample here which does the job 🙂

    posted in Cinema 4D SDK •
    RE: c4dpy "sysctl: No such file or directory"

    Sorry for the late reply, my issue went away after reinstalling C4D so I forgot about it

    Thank you for your feedback

    posted in General Talk •
    Add Field to Effector

    Hello,

    I want to link an already existing linear field to an effector.
    For that I need to provide/update a c4d.FieldList object. But in the SDK I don't understand how to insert objects into the list.

    help would be greatly appreciated

    Cheers,
    David

    posted in Cinema 4D SDK •
    c4dpy "sysctl: No such file or directory"

    Hello,

    I am trying to set up pip on my new machine but keep running into this error:

    Davids-MBP-2 Maxon Cinema 4D R26 % c4dpy -m get-pip.py
    sysctl: No such file or directory
    

    My specs:

    Screenshot 2022-05-12 at 12.10.26.png

    posted in General Talk •
    RE: How to import svg in S25 from path

    Thank you so much!

    posted in Cinema 4D SDK •
    How to import svg in S25 from path

    Hello,

    I was really delighted to hear that svg import is now supported natively in S25. But the only method I am aware of so far is via drag and drop.

    I would like to import an svg file using only its path as input in a python script. Is there a way to do that?

    Thank you

    posted in Cinema 4D SDK •
    access predefined variable in another context

    Hi,

    I am currently playing around with the Python thickness modifier in the Sketch and Toon material. In that context there are a lot of predefined variables like "StrokeLength", "wPnt" and "sNormalisedP".

    My goal is to use these variables to generate 3D Splines that match the strokes on screen. In order to achieve this I have to find a way to access especially the three variables stated above OUTSIDE of the thickness modifier context i.e. in a normal python script.

    Does anybody have an idea on how to approach this?

    posted in Cinema 4D SDK •
    RE: get length of stroke

    Thanks for the reply

    @m_magalhaes said in get length of stroke:

    I'm not sure to understand, you have one material for each stroke length?

    You are right, I didn't consider that I can only set one speed per material which in my case corresponds to one object.
    In this case I want to obtain the length of the longest stroke in order to have the drawing process be finished on frame x. Besides that everything stays the same.

    I found out that it is possible to use python as a modifier for thickness, color and opacity of the strokes. In this context "StrokeLength" is accessible as a predefined variable.
    So with that as a starting point the question becomes how to make this variable accessible outside of the modifier context so I can use it in a regular python script.

    Grateful for any suggestions.

    Cheers

    posted in General Talk •
    get length of stroke

    Hi,

    I am trying to write a script for the sketch material that makes the "pixel" mode in Draw Speed in the Animate tab work similar to the "completion" mode. What I mean by that is that I want to be able just like in the completion mode to keyframe the beginning and end of the drawing process. But the pixel mode only lets me set the start frame and the speed in pixels.

    So the goal is to have the script calculate the speed required to make the drawing end at frame x.
    The reason for doing this is that if I have objects with multiple different strokes of different lengths, the drawing speed varies significantly which doesn't make for a nice aesthetic in the end.

    I know there has to be some place in C4D where the length of each stroke is stored in order for the completion mode to work. So the only question is if and how I could access this value in my python script.

    Thank you.

    posted in General Talk •
    Need help with NumPy build MacOS

    I am trying to install numpy in my c4d python version on MacOS. So far I could find out that drag and drop does not work since the package is written in C. I understood that I have to build/compile the package from source for the python version of c4d.

    After trying my luck with this guide and wrestling with various error messages I see that this is just too advanced for my understanding.

    So if anybody could either help me out with the build or even better provide a binary that works with C4D R23, python 3.7.7 on MacOS that would be a true life saver!

    P.S.: I am aware of Niklas Rosensteins Tutorial for Windows but this doesn't help me much with MacOS

    posted in General Talk •
    RE: CKey.SetValue() for BaseTime object as value

    I actually found the solution while posting the question but wanted to still post it in order to help others who might have the same problem. (If this is against community guidelines I apologise)

    The solution is to use the CKey.SetGeData() method. Done!

    posted in General Talk •