[Bf-blender-cvs] [1e84d69] object_nodes: Refactor: renamed 'Expression' to 'Function'.
Lukas Tönne
noreply at git.blender.org
Tue Nov 24 09:44:16 CET 2015
Commit: 1e84d69d728bdaa2fbb540ab247998ff278ed27d
Author: Lukas Tönne
Date: Mon Nov 9 14:06:26 2015 +0100
Branches: object_nodes
https://developer.blender.org/rB1e84d69d728bdaa2fbb540ab247998ff278ed27d
Refactor: renamed 'Expression' to 'Function'.
===================================================================
M source/blender/blenkernel/BKE_effect.h
M source/blender/blenkernel/intern/effect.c
M source/blender/blenvm/BVM_api.h
M source/blender/blenvm/bvm/CMakeLists.txt
M source/blender/blenvm/bvm/bvm_eval.cc
M source/blender/blenvm/bvm/bvm_eval.h
M source/blender/blenvm/bvm/bvm_eval_common.h
D source/blender/blenvm/bvm/bvm_expression.cc
D source/blender/blenvm/bvm/bvm_expression.h
A source/blender/blenvm/bvm/bvm_function.cc
A source/blender/blenvm/bvm/bvm_function.h
M source/blender/blenvm/compile/bvm_codegen.cc
M source/blender/blenvm/compile/bvm_codegen.h
M source/blender/blenvm/intern/bvm_api.cc
M source/blender/makesrna/intern/rna_texture_api.c
M source/blender/render/intern/source/render_texture.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_effect.h b/source/blender/blenkernel/BKE_effect.h
index 46e412b..5c0100f 100644
--- a/source/blender/blenkernel/BKE_effect.h
+++ b/source/blender/blenkernel/BKE_effect.h
@@ -105,7 +105,7 @@ typedef struct EffectorCache {
float guide_loc[4], guide_dir[3], guide_radius;
float velocity[3];
- struct BVMExpression *expression;
+ struct BVMFunction *function;
float frame;
int flag;
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index e515af6..d0e2ebf 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -212,7 +212,7 @@ static void add_object_nodes_to_effectors(EffectorContext *effctx, Scene *scene,
if (ff_ntree) {
EffectorCache *eff = new_effector_cache(effctx, scene, ob, NULL, ob->pd);
- eff->expression = BVM_gen_forcefield_expression(effctx->eval_globals, ff_ntree);
+ eff->function = BVM_gen_forcefield_function(effctx->eval_globals, ff_ntree);
}
break;
@@ -282,8 +282,8 @@ void pdEndEffectors(EffectorContext *effctx)
for (; eff; eff = eff->next) {
if (eff->guide_data)
MEM_freeN(eff->guide_data);
- if (eff->expression)
- BVM_expression_free(eff->expression);
+ if (eff->function)
+ BVM_function_free(eff->function);
}
BLI_freelistN(&effctx->effectors);
@@ -1024,8 +1024,8 @@ void pdDoEffectors(struct EffectorContext *effctx, ListBase *colliders, Effector
get_effector_tot(eff, &efd, point, &tot, &p, &step);
for (; p<tot; p+=step) {
- if (eff->expression) {
- BVM_eval_forcefield(effctx->eval_globals, eval_context, eff->expression, eff->ob, point, force, impulse);
+ if (eff->function) {
+ BVM_eval_forcefield(effctx->eval_globals, eval_context, eff->function, eff->ob, point, force, impulse);
}
else if (get_effector_data(eff, &efd, point, 0)) {
efd.falloff= effector_falloff(eff, &efd, point, weights);
diff --git a/source/blender/blenvm/BVM_api.h b/source/blender/blenvm/BVM_api.h
index ec727e4..c8afdfb 100644
--- a/source/blender/blenvm/BVM_api.h
+++ b/source/blender/blenvm/BVM_api.h
@@ -40,7 +40,7 @@
extern "C" {
#endif
-struct BVMExpression;
+struct BVMFunction;
struct BVMFunction;
struct BVMModule;
@@ -49,7 +49,7 @@ void BVM_free(void);
/* ------------------------------------------------------------------------- */
-void BVM_expression_free(struct BVMExpression *expr);
+void BVM_function_free(struct BVMFunction *fn);
/* ------------------------------------------------------------------------- */
@@ -97,9 +97,9 @@ struct bNodeTree;
struct Object;
struct EffectedPoint;
-struct BVMExpression *BVM_gen_forcefield_expression(const struct BVMEvalGlobals *globals, struct bNodeTree *btree);
+struct BVMFunction *BVM_gen_forcefield_function(const struct BVMEvalGlobals *globals, struct bNodeTree *btree);
-void BVM_eval_forcefield(struct BVMEvalGlobals *globals, struct BVMEvalContext *context, struct BVMExpression *expr,
+void BVM_eval_forcefield(struct BVMEvalGlobals *globals, struct BVMEvalContext *context, struct BVMFunction *fn,
struct Object *effob, const struct EffectedPoint *point, float force[3], float impulse[3]);
/* ------------------------------------------------------------------------- */
@@ -107,15 +107,15 @@ void BVM_eval_forcefield(struct BVMEvalGlobals *globals, struct BVMEvalContext *
struct Tex;
struct TexResult;
-struct BVMExpression *BVM_gen_texture_expression(const struct BVMEvalGlobals *globals, struct Tex *tex,
+struct BVMFunction *BVM_gen_texture_function(const struct BVMEvalGlobals *globals, struct Tex *tex,
struct bNodeTree *btree, FILE *debug_file);
-void BVM_eval_texture(struct BVMEvalContext *context, struct BVMExpression *expr,
+void BVM_eval_texture(struct BVMEvalContext *context, struct BVMFunction *fn,
struct TexResult *target,
float coord[3], float dxt[3], float dyt[3], int osatex,
short which_output, int cfra, int preview);
-struct BVMExpression *BVM_texture_cache_acquire(Tex *tex);
+struct BVMFunction *BVM_texture_cache_acquire(Tex *tex);
void BVM_texture_cache_release(Tex *tex);
void BVM_texture_cache_invalidate(Tex *tex);
void BVM_texture_cache_clear(void);
diff --git a/source/blender/blenvm/bvm/CMakeLists.txt b/source/blender/blenvm/bvm/CMakeLists.txt
index 5c63fe5..64933aa 100644
--- a/source/blender/blenvm/bvm/CMakeLists.txt
+++ b/source/blender/blenvm/bvm/CMakeLists.txt
@@ -42,8 +42,8 @@ set(SRC
bvm_eval.h
bvm_eval_common.h
bvm_eval_texture.h
- bvm_expression.cc
- bvm_expression.h
+ bvm_function.cc
+ bvm_function.h
bvm_opcode.h
)
diff --git a/source/blender/blenvm/bvm/bvm_eval.cc b/source/blender/blenvm/bvm/bvm_eval.cc
index 18187fd..deadd44 100644
--- a/source/blender/blenvm/bvm/bvm_eval.cc
+++ b/source/blender/blenvm/bvm/bvm_eval.cc
@@ -451,373 +451,373 @@ static void eval_op_effector_closest_point(float *stack, StackIndex offset_objec
}
}
-void EvalContext::eval_instructions(const EvalGlobals *globals, const EvalData *data, const Expression *expr, float *stack) const
+void EvalContext::eval_instructions(const EvalGlobals *globals, const EvalData *data, const Function *fn, float *stack) const
{
int instr = 0;
while (true) {
- OpCode op = expr->read_opcode(&instr);
+ OpCode op = fn->read_opcode(&instr);
switch(op) {
case OP_NOOP:
break;
case OP_VALUE_FLOAT: {
- float value = expr->read_float(&instr);
- StackIndex offset = expr->read_stack_index(&instr);
+ float value = fn->read_float(&instr);
+ StackIndex offset = fn->read_stack_index(&instr);
eval_op_value_float(stack, value, offset);
break;
}
case OP_VALUE_FLOAT3: {
- float3 value = expr->read_float3(&instr);
- StackIndex offset = expr->read_stack_index(&instr);
+ float3 value = fn->read_float3(&instr);
+ StackIndex offset = fn->read_stack_index(&instr);
eval_op_value_float3(stack, value, offset);
break;
}
case OP_VALUE_FLOAT4: {
- float4 value = expr->read_float4(&instr);
- StackIndex offset = expr->read_stack_index(&instr);
+ float4 value = fn->read_float4(&instr);
+ StackIndex offset = fn->read_stack_index(&instr);
eval_op_value_float4(stack, value, offset);
break;
}
case OP_VALUE_INT: {
- int value = expr->read_int(&instr);
- StackIndex offset = expr->read_stack_index(&instr);
+ int value = fn->read_int(&instr);
+ StackIndex offset = fn->read_stack_index(&instr);
eval_op_value_int(stack, value, offset);
break;
}
case OP_VALUE_MATRIX44: {
- matrix44 value = expr->read_matrix44(&instr);
- StackIndex offset = expr->read_stack_index(&instr);
+ matrix44 value = fn->read_matrix44(&instr);
+ StackIndex offset = fn->read_stack_index(&instr);
eval_op_value_matrix44(stack, value, offset);
break;
}
case OP_VALUE_POINTER: {
- PointerRNA value = expr->read_pointer(&instr);
- StackIndex offset = expr->read_stack_index(&instr);
+ PointerRNA value = fn->read_pointer(&instr);
+ StackIndex offset = fn->read_stack_index(&instr);
eval_op_value_pointer(stack, value, offset);
break;
}
case OP_FLOAT_TO_INT: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_float_to_int(stack, offset_from, offset_to);
break;
}
case OP_INT_TO_FLOAT: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_int_to_float(stack, offset_from, offset_to);
break;
}
case OP_PASS_FLOAT: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_pass_float(stack, offset_from, offset_to);
break;
}
case OP_PASS_FLOAT3: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_pass_float3(stack, offset_from, offset_to);
break;
}
case OP_PASS_FLOAT4: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_pass_float4(stack, offset_from, offset_to);
break;
}
case OP_PASS_INT: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_pass_int(stack, offset_from, offset_to);
break;
}
case OP_PASS_MATRIX44: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_pass_matrix44(stack, offset_from, offset_to);
break;
}
case OP_PASS_POINTER: {
- StackIndex offset_from = expr->read_stack_index(&instr);
- StackIndex offset_to = expr->read_stack_index(&instr);
+ StackIndex offset_from = fn->read_stack_index(&instr);
+ StackIndex offset_to = fn->read_stack_index(&instr);
eval_op_pass_pointer(stack, offset_from, offset_to);
break;
}
case OP_SET_FLOAT3: {
- StackIndex offset_x = expr->read_stack_index(&instr);
- StackIndex offset_y = expr->read_stack_index(&instr);
- StackIndex offset_z
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list