forked from blender/blender
MaterialX: fix review comments #19
@ -225,7 +225,7 @@ typedef int (*NodeGPUExecFunction)(struct GPUMaterial *mat,
|
|||||||
struct bNodeExecData *execdata,
|
struct bNodeExecData *execdata,
|
||||||
struct GPUNodeStack *in,
|
struct GPUNodeStack *in,
|
||||||
struct GPUNodeStack *out);
|
struct GPUNodeStack *out);
|
||||||
typedef void (*NodeMaterialXExecFunction)(void *data,
|
typedef void (*NodeMaterialXFunction)(void *data,
|
||||||
struct bNode *node,
|
struct bNode *node,
|
||||||
struct bNodeSocket *out);
|
struct bNodeSocket *out);
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ typedef struct bNodeType {
|
|||||||
/* gpu */
|
/* gpu */
|
||||||
NodeGPUExecFunction gpu_fn;
|
NodeGPUExecFunction gpu_fn;
|
||||||
/* MaterialX */
|
/* MaterialX */
|
||||||
NodeMaterialXExecFunction materialx_fn;
|
NodeMaterialXFunction materialx_fn;
|
||||||
|
|
||||||
/* Get an instance of this node's compositor operation. Freeing the instance is the
|
/* Get an instance of this node's compositor operation. Freeing the instance is the
|
||||||
* responsibility of the caller. */
|
* responsibility of the caller. */
|
||||||
|
@ -88,7 +88,7 @@ void MaterialData::init()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
usd_material = usd::create_usd_material(export_context, material_path, (Material *)id, "st");
|
usd_material = usd::create_usd_material(export_context, material_path, (Material *)id, "st");
|
||||||
|
@ -145,6 +145,7 @@ set(LIB
|
|||||||
)
|
)
|
||||||
|
|
||||||
if(WITH_MATERIALX)
|
if(WITH_MATERIALX)
|
||||||
|
add_definitions(-DWITH_MATERIALX)
|
||||||
list(APPEND SRC
|
list(APPEND SRC
|
||||||
materialx/material.cc
|
materialx/material.cc
|
||||||
materialx/node_item.cc
|
materialx/node_item.cc
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
#ifdef WITH_MATERIALX
|
#ifdef WITH_MATERIALX
|
||||||
# include "materialx/node_parser.h"
|
# include "materialx/node_parser.h"
|
||||||
#else
|
#else
|
||||||
# define NODE_SHADER_MATERIALX_BEGIN NodeMaterialXExecFunction node_shader_materialx = nullptr;
|
# define NODE_SHADER_MATERIALX_BEGIN NodeMaterialXFunction node_shader_materialx = nullptr;
|
||||||
# define NODE_SHADER_MATERIALX_END
|
# define NODE_SHADER_MATERIALX_END
|
||||||
#endif
|
#endif
|
||||||
BogdanNagirniak marked this conversation as resolved
|
|||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user
Seems could be simpliifed to:
Export code would be: