[Bf-blender-cvs] [989b0e4] master: Increase node max width to 700px
Julian Eisel
noreply at git.blender.org
Sat Mar 12 19:14:00 CET 2016
Commit: 989b0e472e74869be9f170e2dafbae76d6a4ce94
Author: Julian Eisel
Date: Sat Mar 12 19:10:36 2016 +0100
Branches: master
https://developer.blender.org/rB989b0e472e74869be9f170e2dafbae76d6a4ce94
Increase node max width to 700px
Opened and collapsed nodes now have a max width of 700px. Animation nodes add-on needs this.
===================================================================
M source/blender/blenkernel/intern/node.c
M source/blender/editors/space_node/node_edit.c
===================================================================
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index bc8a7d9..75f899d 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -72,6 +72,8 @@
#include "NOD_shader.h"
#include "NOD_texture.h"
+#define NODE_DEFAULT_MAX_WIDTH 700
+
/* Fallback types for undefined tree, nodes, sockets */
bNodeTreeType NodeTreeTypeUndefined;
bNodeType NodeTypeUndefined;
@@ -3423,16 +3425,16 @@ void node_type_size_preset(struct bNodeType *ntype, eNodeSizePreset size)
{
switch (size) {
case NODE_SIZE_DEFAULT:
- node_type_size(ntype, 140, 100, 320);
+ node_type_size(ntype, 140, 100, NODE_DEFAULT_MAX_WIDTH);
break;
case NODE_SIZE_SMALL:
- node_type_size(ntype, 100, 80, 320);
+ node_type_size(ntype, 100, 80, NODE_DEFAULT_MAX_WIDTH);
break;
case NODE_SIZE_MIDDLE:
- node_type_size(ntype, 150, 120, 320);
+ node_type_size(ntype, 150, 120, NODE_DEFAULT_MAX_WIDTH);
break;
case NODE_SIZE_LARGE:
- node_type_size(ntype, 240, 140, 320);
+ node_type_size(ntype, 240, 140, NODE_DEFAULT_MAX_WIDTH);
break;
}
}
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 62431b3..6ae72e2 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -924,14 +924,13 @@ static int node_resize_modal(bContext *C, wmOperator *op, const wmEvent *event)
pwidth = &node->miniwidth;
oldwidth = nsw->oldminiwidth;
widthmin = 0.0f;
- widthmax = 100.0f;
}
else {
pwidth = &node->width;
oldwidth = nsw->oldwidth;
widthmin = node->typeinfo->minwidth;
- widthmax = node->typeinfo->maxwidth;
}
+ widthmax = node->typeinfo->maxwidth;
{
if (nsw->directions & NODE_RESIZE_RIGHT) {
More information about the Bf-blender-cvs
mailing list