Navigation

    • Register
    • Login
    • Search
    1. Home
    2. Ogers
    O

    Ogers

    @Ogers

    0
    Reputation
    97
    Posts
    156
    Profile views
    1
    Followers
    1
    Following
    Joined Last Online
    Location Albania Age 25

    • Profile
    • More
      • Following
      • Followers
      • Topics
      • Posts
      • Best
      • Groups
    Ogers Follow

    Best posts made by Ogers

    This user does not have any upvoted posts yet.

    Latest posts made by Ogers

    RE: Create Gradient Attribute for Nodes Programmatically

    Haha, I forget even more important stuff sometimes 🙂
    Btw is there any workaround for this? Or will it be public in the future?

    posted in Cinema 4D SDK •
    RE: Create Gradient Attribute for Nodes Programmatically

    Hello.
    It's weird as I don't have a render.framework on my machine, although the include file points there on my side as well.. Could this be part of S26 only?
    I have also referred to the resource editor to build my own gradient where I found everything I needed except for the file which is missing.

    df669c9d-fb0b-4373-9ed0-4ede7ed822a3-image.png

    Also as you can notice from my previous messages where I showed how I was building the gradient, you can see that the only difference is that I set the datatype by typing the ID manually ("net.maxon.render.portbundle.gradient"), and all that because I could not find the right file.

    posted in Cinema 4D SDK •
    RE: Create Gradient Attribute for Nodes Programmatically

    Hello,
    Thanks for the update.

    Regarding the ports you have used, are they already defined as ports, or they should be created too?
    At the moment these ports PATTERN::NODE::GENERATOR::GRADIENT::GRADIENT, RENDER::PORTBUNDLE::GRADIENT::COLOR and RENDER::PORTBUNDLE::GRADIENT::POSITION cannot be accessed. I tried searching all files but could not find them.

    posted in Cinema 4D SDK •
    RE: Create Gradient Attribute for Nodes Programmatically

    Hello?
    Is there any news about this one yet?
    868391ba-efe4-4226-b077-5ab64582f925-image.png

    So far with the code above, I can only get to this part, but as you can see the gradient's colours are not showing on the UI.

    Also, how can I get the values set for each knot (colour, interpolation, position etc.)
    Do I have to build my own gradient data type to make it work or does the built-in gradient offers all these?

    Thank you.

    posted in Cinema 4D SDK •
    RE: Create Gradient Attribute for Nodes Programmatically

    Hello,
    Thanks for the reply. After setting the right ID as you said, I was able to get the UI look I was looking for, but same as you I can't make it work properly. Here is the part of the code I have used for this.

    maxon::BaseArray<maxon::Id> var_commands;
    
    var_commands.Append(maxon::Id("addvariadicport"));
    var_commands.Append(maxon::Id("removevariadicport"));
    
    node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::DATATYPE, maxon::Id("net.maxon.render.portbundle.gradient")) iferr_return;
    
    node.Set(maxon::DATADESCRIPTION_CATEGORY_UI, maxon::DESCRIPTION::UI::BASE::GUITYPEID, maxon::Id("net.maxon.ui.variadicport")) iferr_return;
    
    node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::ISVARIADIC, TRUE) iferr_return;
    
    node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::VARIADICCOUNT, 2) iferr_return;
    
    node.Set(maxon::DATADESCRIPTION_CATEGORY_DATA, maxon::DESCRIPTION::DATA::BASE::VARIADICCOMMANDS, var_commands) iferr_return;
    
    node.Set(maxon::DATADESCRIPTION_CATEGORY_UI, maxon::DESCRIPTION::UI::NET::MAXON::UI::VARIADICPORT::COMPLEXCUSTOMUI, 200001011);
    
    posted in Cinema 4D SDK •
    Create Gradient Attribute for Nodes Programmatically

    Hello,

    I have created a gradient attribute but instead of getting a proper Gradient UI that C4D uses, I am getting this one.

    cd9993f4-e193-4c83-abaf-b1658689ef91-image.png

    I noticed that it can be achieved by settings Replace Complex UI parameter to 200001011 but I could not find a way to set this parameter pragmatically except that from the resource editor. At first, I thought that this parameter would be on datadescription_ui.h, but it was missing from there or maybe it is located in another file.
    Is there any way to set that parameter pragmatically, or any other way to show my Gradient parameters' UI as it normally should be?

    Thank you.

    posted in Cinema 4D SDK •
    RE: Collapse/Fold groups by default in nodegraph UI

    Hello,

    Thank you for your reply. Can I leave the topic open until this is supported?

    posted in Cinema 4D SDK •
    Create custom menu category for nodes?

    Hello,
    Is it possible to create a custom menu category for nodes or should we use the ones that already exist?
    I could not find any way or example of how I can achieve this.

    Thank you.

    d8da1d87-ed83-4380-b9b7-9b0413cc7d30-image.png

    posted in Cinema 4D SDK •
    Collapse/Fold groups by default in nodegraph UI

    Hello, I have created a couple of nodes pragmatically but I can't find a way how to fold or collapse the groups in nodes UI by default as in the image.

    Setting maxon::DESCRIPTION::UI::BASE::GROUPDEFAULTOPEN to false will only deselect the group from the attributes manager.

    862575e3-dec5-4d38-951b-ec62f5de7bc7-image.png

    posted in Cinema 4D SDK •
    RE: Add values for enum data type (node graph)

    Hello,

    Thanks for the code.
    Regarding the second one, I have tried it and also mentioned in the first message that the data does not get added and the array size still stays 0.
    I had forgotten to put iferr_return and now with your example, I am getting a critical error when trying to append those data.

    RefMemberType<S> CritStop()
    {
    CriticalOutput(static_cast<const typename S::ReferenceClass*>(this)->ToString()); return this->PrivateGetRefMember();
    }
    
    posted in Cinema 4D SDK •