Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_DefocusNode.cpp
| Show All 36 Lines | |||||
| DefocusNode::DefocusNode(bNode *editorNode) : Node(editorNode) | DefocusNode::DefocusNode(bNode *editorNode) : Node(editorNode) | ||||
| { | { | ||||
| /* pass */ | /* pass */ | ||||
| } | } | ||||
| void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context) | void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext *context) | ||||
| { | { | ||||
| bNode *node = this->getbNode(); | bNode *node = this->getbNode(); | ||||
| Scene *scene = (Scene *)node->id; | |||||
| Object *camob = (scene) ? scene->camera : NULL; | |||||
| NodeDefocus *data = (NodeDefocus *)node->storage; | NodeDefocus *data = (NodeDefocus *)node->storage; | ||||
| Scene *scene = node->id ? (Scene *)node->id : context->getScene(); | |||||
| Object *camob = scene ? scene->camera : NULL; | |||||
| NodeOperation *radiusOperation; | NodeOperation *radiusOperation; | ||||
| if (data->no_zbuf) { | if (data->no_zbuf) { | ||||
| MathMultiplyOperation *multiply = new MathMultiplyOperation(); | MathMultiplyOperation *multiply = new MathMultiplyOperation(); | ||||
| SetValueOperation *multiplier = new SetValueOperation(); | SetValueOperation *multiplier = new SetValueOperation(); | ||||
| multiplier->setValue(data->scale); | multiplier->setValue(data->scale); | ||||
| SetValueOperation *maxRadius = new SetValueOperation(); | SetValueOperation *maxRadius = new SetValueOperation(); | ||||
| maxRadius->setValue(data->maxblur); | maxRadius->setValue(data->maxblur); | ||||
| ▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines | |||||