I usually work with rather lengthly texture filenames, so I’m constantly finding myself widening the image texture nodes to have them show those filenames in full.
Is there any way to set their (or all the node types’) default size to something bigger than the usual? I can’t seem to find anything I could tweak in Blender’s preferences.
In Blender 4.x, you need to look into the node_add_menu_*.py files, inside the scripts/startup/bl_ui folder.
To change default settings is now similar to adding settings to other UILayout operator calls:
Though I’m not sure I understand you correctly (I’m not a coder, sorry ) - do you propose to change width for every node in the file the way as it’s shown in your example above?
But there are a lot of nodes:
Changing one or two nodes can be done as I posted above.
You may also modify the NodeAddOperator in scripts/startup/bl_operators/node.py if you want (or the add_node_type in node_add_menu.py), but I don’t recomend it. (it will overwrite any changes in the Add_Menu definitions)
Well, that may be a problem, because if you want to change the overall default values in Blender (>=4.x), the best option is for you to grab the source code, change the node_type_size_preset in node.cc (ln:4431):
void node_type_size_preset(bNodeType *ntype, const eNodeSizePreset size)
{
switch (size) {
case eNodeSizePreset::DEFAULT:
node_type_size(ntype, 140, 100, NODE_DEFAULT_MAX_WIDTH);
break;
case eNodeSizePreset::SMALL:
node_type_size(ntype, 100, 80, NODE_DEFAULT_MAX_WIDTH);
break;
case eNodeSizePreset::MIDDLE:
node_type_size(ntype, 150, 120, NODE_DEFAULT_MAX_WIDTH);
break;
case eNodeSizePreset::LARGE:
node_type_size(ntype, 240, 140, NODE_DEFAULT_MAX_WIDTH);
break;
}
}