• Example Python Code "Add a Custom User Data": Not Working

    python
    4
    0 Votes
    4 Posts
    2k Views
    B
    @eziopan Thanks mate. It works as expected. @a_block Thanks. Will double check next time.
  • Scaling of image not working

    4
    0 Votes
    4 Posts
    1k Views
    a_blockA
    Hi, I'm glad this already got solved. I just wanted to mention, I have added code tags to the initial post. Cheers, Andreas
  • How do priorities work when all objects/tags have the same priority?

    2
    0 Votes
    2 Posts
    880 Views
    M
    Hi @cmpxchh8b, No worries at all since it's one of your first posts, but please make sure to read and apply the rules defined on the following topics: How to Post Questions. (Add proper tags in your case) Q&A Functionality. Regarding your question, if an object gets the same priority it's from top to bottom. Then you can find valuable information about priority in the c4d help With the given example you mentioned in the post here is the execution order after some internal test. (First one is executed before the last one) Skin.1 (Called to some kind of prepass) Skin.2 Called to some kind of prepass) Polygon.1 Skin.1 Circle (ObjectData which return a Spline, Called to some kind of prepass) Circle (ObjectData which return a Spline, Called to return the cache) Null.1 Null.2 Null.3 Polygon.2 Skin.2 XPresso.1 XPresso.2 XPresso.3 Note that any ObjectData can be executed multiple time since you can call AddToExecution which allow you to add the current node at any time within the execution pipline. This is basically used to do some kind of prepass and postpass. Hope it's answers to your question. Cheers, Maxime.
  • deformer object priority

    3
    0 Votes
    3 Posts
    2k Views
    M
    Thank you for your answer!@m_adam Although object go back normal after i clicked 'Redraw' (I guess that's the reason),it isn't make sure problem is 'refresh the viewport'. 'refresh the viewport' can also fix Priority error result . 'Shift Priority Tag' just effective Expression.It can't help. After asking questions,i try to use Python Tag to replace 'Spline Deformer Object' ,because Python Tag have Priority.Fortunately,even though it looks very complicated, but everything become ok!
  • Drag and drop in GeUserArea

    c++ windows r19
    6
    0 Votes
    6 Posts
    1k Views
    C4DSC
    @a_block Thanks for the update. Much appreciated!
  • Coding a Python Field

    Moved
    5
    0 Votes
    5 Posts
    1k Views
    M
    Hey @darrellp as you figured out, it was not on the correct category. But in any case don't worry, maybe I was too harsh and unprecise, I'm sorry about that but in the end, as I said, you are new here, so don't worry if you break the posting rules the first times
  • Underlying of "doc" and "op" ?

    8
    0 Votes
    8 Posts
    2k Views
    eZioPanE
    @c4ds, don’t worry! Every steps (even the off-road one) make some progress, right? I appreciate the way you focusing on the problem solving, which I believe is also the wonderful thing of this forum: we do our best to solving the problem itself, discussing about the better/more accurate answers rather than “who is right, who is wrong”. Last but not least, thank you for taking time to reply!
  • Creating a Circle (spline) with varying number of points.

    python r20
    5
    0 Votes
    5 Posts
    3k Views
    P
    Thank you all, great answers! I will take a different approach. I convert the circle to a spline and then divide that spline into the wanted number of points. -Pim
  • Coding a Python Plugin for fields

    python r20 windows
    4
    0 Votes
    4 Posts
    1k Views
    D
    @s_bach I was beginning to wonder if I was beating my head against a brick wall. Apparently so. Thanks so much for alleviating the pain! Well, I learned quite a bit about Python in the process so not really a loss. Guess I'll try moving on directly to the C++ version.
  • read active render data

    python
    2
    0 Votes
    2 Posts
    636 Views
    S
    Hello and welcome, when creating a new post, please use tags and the Q&A system. See Read Before Posting. I tried your code in a R20 script and it seems to work perfectly fine: rd = doc.GetActiveRenderData() if rd is None: return fromSlice = rd[c4d.RDATA_FRAMEFROM] toSlice = rd[c4d.RDATA_FRAMETO] fps = doc.GetFps() print(fromSlice.GetFrame(fps)) print(toSlice.GetFrame(fps) What exactly is not working for you? In what context do you execute your code? best wishes, Sebastian
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    14 Views
    No one has replied
  • SortedArray() - "Namespace Maxon has no member class "SortedArray"

    4
    1
    0 Votes
    4 Posts
    1k Views
    P
    @s_bach said in SortedArray() - "Namespace Maxon has no member class "SortedArray": #include "maxon/sortedarray.h" Great, thanks to the both of you. Next time, I will mark it as a question. -Pim
  • Checking Keyframe curve type

    python r19 windows sdk
    2
    0 Votes
    2 Posts
    673 Views
    S
    Hello and welcome, what exactly do you mean with "export keyframe data"? Do you want to write data into a file? The best way to develop such code would be in a Python script that you can edit and execute in the Script Manager. A XPresso Python node is meant to contain code that is executed as part of XPresso to define the behavior of the XPresso network. A XPresso Python node should not be used to modify the scene or to perform I/O operations. A CTrack object stores the DescID of the associated parameter. You can access that DescID with GetDescriptionID(). Alternatively you can use BaseList2D.FindCTrack() to search for the CTrack associated with a certain parameter DescID. You find an example on GitHub. You find general information on how to use CTrack and DescID also in the C++ documentation: CTrack Manual DescID Manual best wishes, Sebastian
  • line limit for function??

    c++ project tool r20
    2
    0 Votes
    2 Posts
    855 Views
    a_blockA
    Hi ello, no, you don't need to worry, the compiler won't check the remaining lines. It is a warning, we use internally to make people write better code. Usually smaller functions are easier to maintain and thinking about how to properly split and slice your code leads to better better results. By the way, compilers nowadays do quite a good job on inlining functions, so one does not need to be afraid of performance issues. But in the end this is probably also a matter of personal taste and so you can configure this in your projectdefinition.txt. See the Stylecheck options in our Project Tool documentation, there you have the option to set the maximum line count for functions (stylecheck.max-linecount=number). Please consider the use of tags and of our Q&A system. Cheers, Andreas
  • Some suggestions about Python SDK

    5
    6
    0 Votes
    5 Posts
    2k Views
    r_giganteR
    Hi Mike, please check this thread to properly use the Q&A functionality. Cheers, Riccardo
  • SetPercent() not working...

    r19
    7
    0 Votes
    7 Posts
    2k Views
    G
    @m_adam Hi, Thanks for your answer. I applied your changes and it worked like a charm . Thanks again!!!
  • BaseArray::Insert( position, value ) documentation

    r19 r20 c++ sdk
    3
    0 Votes
    3 Posts
    745 Views
    S
    Hello, Indeed this example is wrong. We will fix that as soon as possible. Thanks for noticing us. best wishes, Sebastian
  • NewMem question

    6
    0 Votes
    6 Posts
    2k Views
    E
    thank you. i got this working. maybe there are even other places in my code where i can use this knowledge
  • 0 Votes
    4 Posts
    2k Views
    A
    For anyone who would like to use or learn from the script. You can download full script from github. ( Get And Copy Textures From Texture Tags )
  • getting 3D noise values

    python
    4
    0 Votes
    4 Posts
    1k Views
    R
    Thanks @eziopan and Sebastian for your answers ! So far I searched a way for getting values out of the 3D noise shaders. Starting point was the c4d.BaseShader class but it seems to me that accessing these shaders in order to get noise values is much more cumbersome than using the C4DNoise class and specifying the corresponding noise type as parameter 't' - as @eziopan has pointed out. So: thank you - problem solved ... and sorry, I haven't read the Q&A system thoroughly enough - next time I will mark my post properly. cheers, Jens