[Bf-codereview] Node changes from Particles Branch (issue4476050)

lukas.toenne at googlemail.com lukas.toenne at googlemail.com
Fri May 6 21:46:20 CEST 2011


Fixed a few more issues.


http://codereview.appspot.com/4476050/diff/3001/source/blender/makesdna/DNA_node_types.h
File source/blender/makesdna/DNA_node_types.h (right):

http://codereview.appspot.com/4476050/diff/3001/source/blender/makesdna/DNA_node_types.h#newcode198
source/blender/makesdna/DNA_node_types.h:198: #define
NODE_BACKGROUND		(1<<12)
On 2011/05/06 11:26:46, brechtvl wrote:
> NODE_CONST_OUTPUT and NODE_BACKGROUND seem more like things that
should be part
> of the node type, not the node?

The node->flag and node->typeinfo->flag use the same flags. node->flag
is initialised from typeinfo->flag and some flags (OPTIONS and PREVIEW)
are used as general type flags as well as toggles for each node. The
CONST_OUTPUT and BACKGROUND flags should not be changed, but i will make
sure they are only read from the type.

http://codereview.appspot.com/4476050/diff/3001/source/blender/makesdna/DNA_node_types.h#newcode200
source/blender/makesdna/DNA_node_types.h:200: #define
NODE_TRANSFORM		(1<<13)
On 2011/05/06 11:26:46, brechtvl wrote:
> It seems to me it would be easier to not tag nodes with NODE_TRANSFORM
but just
> check for selection in the transform code.

The reason i'm using a separate flag for this is that there is now an
attachment feature for nodes (used by frame nodes). All nodes attached
to a selected parent are included in it's transformation, regardless of
selection state (no relative coordinates are used). The transform flag
is set before the actual transformation for all nodes that are either
selected or attached to a transforming node.

http://codereview.appspot.com/4476050/diff/3001/source/blender/makesdna/DNA_node_types.h#newcode212
source/blender/makesdna/DNA_node_types.h:212: #define NLINK_VALID			1
On 2011/05/06 11:26:46, brechtvl wrote:
> Some comment on this would be good. The purpose is a bit unclear to me
at the
> moment.

Done. Also renamed it to NODE_LINK_VALID for clarity.

http://codereview.appspot.com/4476050/diff/3001/source/blender/makesdna/DNA_node_types.h#newcode234
source/blender/makesdna/DNA_node_types.h:234: int stacksize;
On 2011/05/06 11:26:46, brechtvl wrote:
> Is this stacksize still needed, seems to be in bNodeTreeExec now?

Correct, removed it.

http://codereview.appspot.com/4476050/diff/3001/source/blender/makesdna/DNA_node_types.h#newcode283
source/blender/makesdna/DNA_node_types.h:283: int subtype;				/* RNA
subtype */
On 2011/05/06 11:26:46, brechtvl wrote:
> The RNA subtype wasn't really intended to be saved in files. Not sure
about this
> yet, but at the very least there should be a comment in RNA_types.h
that you
> must be careful changing the enum values for compatibility reasons.

Done. This now uses a separate subtype list in DNA, which is converted
to RNA property subtypes only in the RNA definition. Also moved the
socket types back to DNA from node_socket.h to avoid this problem.

http://codereview.appspot.com/4476050/


More information about the Bf-codereview mailing list