@ferdinand You are amazing! Thanks
Posts made by momoko
-
RE: How to set a custom color for a node?
-
RE: How to set a custom color for a node?
@Dunhou Thank you. Do you know how I can see what kind of values I can set for it?
-
RE: How to set a custom color for a node?
@Dunhou Thanks but I mean the color of the node itself, not the base color
-
How to set a custom color for a node?
It's me again!
I'm wondering if there is an example to explain how we can use a custom color for a node? the nodes are grey by default but we can change their color
-
RE: How to set the position of a node manually?
@ferdinand Thank you. I thought that would be possible because Blender was providing that.
-
RE: how to set the path of a Textre node manually?
@ferdinand I found a solution. Sorry
-
RE: how to limit the type of files we can import?
@i_mazlov Thanks for your response! I learnt a lot!
-
How to set the position of a node manually?
Dear people,
Is there a chance I use a custom value to set the position (location)
of a node I create with Python manually inside Graph Editor? Like use a custom value for X and Y of a Texture node. -
how to set the path of a Textre node manually?
Lovely people,
Is this a wrong attempt to set the Path of a Texture node manually?
def create_material(self): doc = c4d.documents.GetActiveDocument() material = c4d.BaseMaterial(c4d.Mmaterial) if not material: raise MemoryError(f"{material = }") doc.InsertMaterial(material) # Get the node material for it and add a graph for the currently active material space to it. node_material = material.GetNodeMaterialReference() graph = node_material.CreateDefaultGraph(c4d.GetActiveNodeSpaceId()) if graph.IsNullValue(): raise RuntimeError("Could not add graph to material.") # Start a transaction to modify the graph with graph.BeginTransaction() as transaction: # Get texture files from the selected folder texture_files = self.print_allowed_files_in_folder(self.FOLDER_PATH) # Add texture nodes to the material graph for each texture file for texture_file in texture_files: texture_node = graph.AddChild(maxon.Id(), maxon.Id("com.redshift3d.redshift4c4d.nodes.core.texturesampler")) if texture_node is None: continue # Set the texture file path path_port = texture_node.GetInputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.tex0").FindChild("path") path_port.SetDefaultValue(maxon.Url("file:///" + texture_file)) # Assuming local file path # Connect the texture node to the output node of the material output_port = graph.GetOutputPort(0) # Get output port of the material texture_color_port = texture_node.GetOutputs().FindChild("com.redshift3d.redshift4c4d.nodes.core.texturesampler.outcolor") texture_color_port.Connect(output_port, modes=maxon.WIRE_MODE.NORMAL, reverse=False) # Commit the transaction to apply the changes to the graph transaction.Commit()
-
How to make static texts bold? Icons?
Hi guys,
1- I have a question. How can I make a static text bold? I tried some common methods in Python but they didn't work!
self.AddStaticText(id=2001, flags=DEFAULT_TEXT_FLAGS, name=static_text)
2- How can I add an icon to a button without using custom icons? Does Cinema4D provide any default icon like Blender?
self.AddButton(id=3002, flags=c4d.BFH_SCALEFIT, initw=100, name="Button!")
-
How to create Tabs with Python?
Guys can you guide me with a simple code to create a simple dialog with two tabs?
-
Change Dialog Text color
Hello guys,
I have a dialog ... Can I change display color of a specific id which belongs to a text?