Blender "Diffuse" Color in Viewport

Forums: Blender "Diffuse" Color in Viewport
Blender (Export script developed by yoyoz; Integrated Plugin developed by JimStar)

Blender "Diffuse" Color in Viewport

Postby sinesium » Wed Dec 07, 2016 10:57 pm

sinesium Wed Dec 07, 2016 10:57 pm
Hi
does anybody know how to add a color to object solid mesh for specific material slot ?
When there is no Diffuse Shader then color is always white.
Be patient for me, please. I am new here.
sinesium
Licensed Customer
Licensed Customer
 
Posts: 50
Joined: Thu Aug 13, 2015 8:11 am

Re: Blender "Diffuse" Color in Viewport

Postby sinesium » Thu Dec 08, 2016 8:29 am

sinesium Thu Dec 08, 2016 8:29 am
JimStar,
is it possible to add "Diffuse" colour for every material slot based on Output node?
Output node should have colour picker field to select colour that shown in the 3d Viewport for mesh that has this material attached:
bpy.data.materials["<MATERIAL_NAME>"].diffuse_color

Could you think about this feature ?
Be patient for me, please. I am new here.
sinesium
Licensed Customer
Licensed Customer
 
Posts: 50
Joined: Thu Aug 13, 2015 8:11 am

Re: Blender "Diffuse" Color in Viewport

Postby sinesium » Thu Dec 08, 2016 9:10 am

sinesium Thu Dec 08, 2016 9:10 am
I made simple script ( I am python rookie ) for changing color for object in selected material - it changes color in viewport to RED.
It changes colour for every FACE of every object that has attached this material name. This is what I need :)

Currently I do not know how to build a additional panel in Materials to select colour by Color Selector.
I will try to find out how to create it.

Now you can run it from text editor:

import bpy
print (bpy.context.object.active_material.name)
bpy.data.materials[ bpy.context.object.active_material.name ].diffuse_color=(1,0,0)
Be patient for me, please. I am new here.
sinesium
Licensed Customer
Licensed Customer
 
Posts: 50
Joined: Thu Aug 13, 2015 8:11 am

Re: Blender "Diffuse" Color in Viewport

Postby sinesium » Sun Dec 11, 2016 11:46 am

sinesium Sun Dec 11, 2016 11:46 am
Ok. I made it.
My own script that helps to change Diffuse Material Colour.

I did not make __init script for install from zip.
Just unpack and install by directly picking a file 3dViewMatColor.py
After installation it appears in Material tab panel named 3D Viewport Material Colour


Let it make you work easier !
:)
Attachments
3DViewportMaterialColor.zip
(838 Bytes) Downloaded 289 times
Be patient for me, please. I am new here.
sinesium
Licensed Customer
Licensed Customer
 
Posts: 50
Joined: Thu Aug 13, 2015 8:11 am

Re: Blender "Diffuse" Color in Viewport

Postby J.C » Tue Dec 13, 2016 11:05 am

J.C Tue Dec 13, 2016 11:05 am
Thanks, super useful :) I wish it worked automatically by taking the color from the diffuse input of a material node :)
CPU – i9 13900KF, 128GB RAM, GPU – RTX 4090
System – Windows 11
My Behance portfolio, Blender plugin FB support group
J.C
Licensed Customer
Licensed Customer
 
Posts: 1721
Joined: Thu May 13, 2010 6:35 pm
Location: Wrocław

Re: Blender "Diffuse" Color in Viewport

Postby sinesium » Tue Dec 13, 2016 2:17 pm

sinesium Tue Dec 13, 2016 2:17 pm
I think it is better to have possibility to set it manually. Cause sometimes is very needed to mark material in scene with specific colour.
Be patient for me, please. I am new here.
sinesium
Licensed Customer
Licensed Customer
 
Posts: 50
Joined: Thu Aug 13, 2015 8:11 am

Re: Blender "Diffuse" Color in Viewport

Postby J.C » Thu Dec 15, 2016 2:47 pm

J.C Thu Dec 15, 2016 2:47 pm
There coluld be a swich manual/auto viewport color assign ;)
CPU – i9 13900KF, 128GB RAM, GPU – RTX 4090
System – Windows 11
My Behance portfolio, Blender plugin FB support group
J.C
Licensed Customer
Licensed Customer
 
Posts: 1721
Joined: Thu May 13, 2010 6:35 pm
Location: Wrocław

Re: Blender "Diffuse" Color in Viewport

Postby zukan » Fri Feb 10, 2017 4:27 pm

zukan Fri Feb 10, 2017 4:27 pm
Very useful, thank you sinesium!
MacOS Sierra 10.12.3 - GTX 970 + GTX 780 Ti - 16 GB RAM - Nvidia Driver: 367.15.10.35f01 - Octane Blender 3.05.3 - 11.23 - Blender 2.78a
zukan
Licensed Customer
Licensed Customer
 
Posts: 16
Joined: Fri Jul 08, 2016 6:14 am

Return to Blender


Who is online

Users browsing this forum: No registered users and 21 guests

Fri Apr 19, 2024 10:53 pm [ UTC ]