Skip to main content

All Questions

0 votes
0 answers
78 views

How to write a python code for changing color space of image texture attached to normal map as well as strength of normal map?

I want to write a code for changing color space of all image textures attached to normal maps as well as strength of all normal maps to 1.
Manwire06's user avatar
1 vote
0 answers
58 views

Cycles render in background exits with error in Blender 2.91.0, on Linuxmint

I have now a recurring new problem: when I want do render a simple animation the program stops with following errors: ...
s Kaiser's user avatar
1 vote
0 answers
157 views

Adding a nodes tree from my own material instead of Principled BSDF in Python

When you click the "use nodes" button, the Principled BSDF node appears in the shader editor connected to the output node, and the properties of the Principled BSDF node appear in the ...
egycno's user avatar
  • 23
1 vote
0 answers
153 views

Hair on diffuse color pass is black and has no albedo information?

I have a object (face with hair) and I want to get the albedo from my diffuse color pass in Blender 2.8. I only get the image without hair. How can I get the whole image or just its albedo color? I ...
user96930's user avatar
1 vote
1 answer
418 views

Assign Materials based on mesh name

our workflow for a job requires us to import alembic meshes from maya and render them in cycles. I would like run a script that looks at the scene mesh names and assigns the corresponding material. ...
Chris's user avatar
  • 19
0 votes
1 answer
171 views

What's the best way to build a GUI for non-blender users to control materials?

OK so I have a scenario whereby my colleagues are creating an image and overwriting a texture, they can then open a blender file and hit render to get an image showing off the design. However I need ...
Tom Jelfs's user avatar
2 votes
0 answers
313 views

Checking for node tree update

I would like to check if a cycles material has been updated since the last check. The easiest way to do that would probably be to store the nodetree somewhere and check against the current node tree. ...
schustudrai's user avatar
1 vote
1 answer
851 views

Make material local?

I have linked a group of meshes. The geometry needs to be linked in case I want to update the imported architecture model later, and keep all my new materials setting and attribution. (I model in ...
Fox's user avatar
  • 1,942
1 vote
2 answers
69 views

Possible Python Automation With This Particular Material

I just had a quick question. I am starting to get a bit more adequate with Blender in terms of getting to photorealism. In the picture below is a model that I got online and I am wanting to edit the ...
Tyler Dahl's user avatar
0 votes
1 answer
760 views

What type of normal and specular map nodes is correct for these textures

I am creating a plugin to import some model files from a game to blender, with all the textures and materials created automatically. I am creating a principled bsdf node from python and assign ...
Panos Paschalis's user avatar
0 votes
0 answers
186 views

Link Image Texture Path to Object Name

I have a material node setup in cycles that I am trying to get an image texture file path to automatically updated based on the name of the object that the material is applied to. For example, if the ...
aschafer14's user avatar
0 votes
1 answer
524 views

How to keyframe changes to assigned materials in Cycles

I'm trying to set-up an animation where each frame renders an object using one of several materials with the whole sequence rendering out all the material variations. Unfortunately, it doesn't seem ...
PaulMc's user avatar
  • 295
0 votes
1 answer
3k views

How to add/remove links to existing or new nodes using Python?

I have lots of objects consisting of many different meshes. Some of these meshes come with transparent materials applied to them. My goal is to modify the nodes list, add new nodes and change the ...
Amir's user avatar
  • 3,062
1 vote
1 answer
434 views

How to select meshes with transparent materials applied to them only?

I want to select all meshes which a transparent material (e.g. glass) has been applied, when using Cycles (if it matters at all)? I just know how to select meshes with any kind of material applied to ...
Amir's user avatar
  • 3,062
3 votes
1 answer
1k views

Change field of a node in a group

I am trying to make a script that will change the value of a specific node within a specific node group. I have seen from this question how to target a node within a material, but I can't see how to ...
Ascalon's user avatar
  • 6,647
2 votes
1 answer
262 views

Python to Replace Skechup Material to Cycles Material

I'm using the Blender to make all my works university (architecture), but in my job the people use Sketchup for modeling and V-Ray for rendering. I want use Blender, cause liked more then others, the ...
Asaph Coimbra Fagundes's user avatar
-1 votes
1 answer
483 views

How to convert a cycles material node setup to a python material generation script?

Is there a way to convert a cycles material node setup to a python script which in it's turn can generate a new material with the same node setup? Also, is it possible to somehow retain the x,y ...
Delagone's user avatar
  • 2,098
2 votes
2 answers
2k views

Getting the image of a texture node that feeds into a node group

I have a Cycles material node group like this: I can access the user-specified color (red) like this: ...
jdurrant's user avatar
2 votes
2 answers
1k views

cycles adding texture to face via python / import script

I am writing an importer for a custom file format. So far I have created my object: ...
Phillip Proctor's user avatar
5 votes
1 answer
787 views

Graph bar with elevation/height values

How can I get a graph legend that automatically gets my maximum and minimum elevation from an object? Basically, I have an object that dinamically paints other with waves. I have a node setup that ...
MCunha's user avatar
  • 1,263
2 votes
2 answers
397 views

Same Video on each face, but with different time delay?

iam looking for a way to - like the title says - i want to put the same video on each face, but with different time delay. In other words, i want to create a kind of videowall. i found THIS: ...
froggyman's user avatar
  • 503
2 votes
0 answers
327 views

Custom Python Nodes: Calling Group Node

I am writing a custom shader node that essentially "Calls" a predefined group node into the code. Here is the group node I am looking to call: I am using the "CustomNode" template that is packaged ...
jay's user avatar
  • 524
1 vote
1 answer
2k views

How to change a material with python in blender?

I have a basic panel script with 3 buttons made with an enum. Those buttons are meant to change two materials of an object e.g. the 'silver' button would change the materials to the silver materials ...
mr-matt's user avatar
  • 1,200
3 votes
3 answers
1k views

Any way of serializing Blender cycles materials data?

I am searching of ways to serialize Blender Cycles materials to files using Python. But as of now I've found no such ways. Maybe by writing the data of the materials to files but how can I do that? ...
Farhan Anam's user avatar
5 votes
2 answers
283 views

Accessing image texture uv channel connected to Cycles material Image Texture

Trying to figure out how to read the uv channel used by an Image Texture input from Python. So, in effect, how to access the "Vector", then grab the attribute name:
Steve Williams's user avatar
3 votes
1 answer
272 views

Setting all default_values of nodes to 0 does not result in expected black output

What I am trying to accomplish? I am iterating over all nodes of one named material from the output node and going backwards and want to set all inputs.default_value to 0. I use the Code from ...
Kevin Streicher's user avatar
4 votes
0 answers
749 views

Copy node tree from one material to another in cycles using python

I have two cycles materials (say source and target). I want to copy the Shader Nodetree from the source material to the target material after clearing any currently present node tree(s) in the target ...
Varun kumar's user avatar
3 votes
0 answers
389 views

Example of creating and setting a Cycles material node with the Python API [duplicate]

I'm trying to set the properties of a Cycles material, which is linked to a Plane object, using the API. So far this is what I'...
Ajay T's user avatar
  • 115
7 votes
1 answer
4k views

How to set a background using the cycles render engine with the API

I'm just getting started with the Blender API, and I'm trying to set the background texture using the API. In the GUI, I do the following: Choose the Cycles render engine ...
Ajay T's user avatar
  • 115
2 votes
1 answer
403 views

Extracting a text string info (character's indices) to use it as a material mask

I think an image can say more than words sometimes... :) The idea is to use a different color from the color ramp for each character in the string. It's related to this question
Bithur's user avatar
  • 8,284
47 votes
3 answers
28k views

Control Cycles/Eevee material nodes and material properties using python?

How can I define the different properties of an Cycles/Eevee material? Such things as glossy, glass, diffuse, RGB-color, emissive via python scripting?
binaryBigInt's user avatar
  • 1,047
41 votes
1 answer
51k views

How to assign a new material to an object in the scene from Python?

How can I assign a new material to an object in the scene via Python?
binaryBigInt's user avatar
  • 1,047
2 votes
1 answer
560 views

How to check if object is cycles light source?

My first idea was to get the surface type of the material. If this is an emission shader it should be a light source, but I can't find something in the python documentation to get the surface input.
p2or's user avatar
  • 16k
3 votes
1 answer
388 views

copy linked materials nodes to local material

DISCLAIMER: I rewrite my post upon the latest success to not flood my own post with already solved parts so I left only the part that really is still not working... PROBLEM: I need to replace all ...
bublible's user avatar
  • 111
15 votes
2 answers
3k views

PyNodes, the bare basics

I know it's a very new thing (post 2.4 era anyways) but there seems to be very little documentation and examples for PyNodes in general, and the little there is doesn't seem to work in latest SVN (...
Greg Zaal's user avatar
  • 10.8k