Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/nodes/COM_TranslateNode.cc
| Show All 35 Lines | void TranslateNode::convertToOperations(NodeConverter &converter, | ||||
| bNode *bnode = this->getbNode(); | bNode *bnode = this->getbNode(); | ||||
| NodeTranslateData *data = (NodeTranslateData *)bnode->storage; | NodeTranslateData *data = (NodeTranslateData *)bnode->storage; | ||||
| NodeInput *inputSocket = this->getInputSocket(0); | NodeInput *inputSocket = this->getInputSocket(0); | ||||
| NodeInput *inputXSocket = this->getInputSocket(1); | NodeInput *inputXSocket = this->getInputSocket(1); | ||||
| NodeInput *inputYSocket = this->getInputSocket(2); | NodeInput *inputYSocket = this->getInputSocket(2); | ||||
| NodeOutput *outputSocket = this->getOutputSocket(0); | NodeOutput *outputSocket = this->getOutputSocket(0); | ||||
| TranslateOperation *operation = new TranslateOperation(); | TranslateOperation *operation = context.get_execution_model() == eExecutionModel::Tiled ? | ||||
| new TranslateOperation() : | |||||
| new TranslateCanvasOperation(); | |||||
| operation->set_wrapping(data->wrap_axis); | operation->set_wrapping(data->wrap_axis); | ||||
| if (data->relative) { | if (data->relative) { | ||||
| const RenderData *rd = context.getRenderData(); | const RenderData *rd = context.getRenderData(); | ||||
| const float render_size_factor = context.getRenderPercentageAsFactor(); | const float render_size_factor = context.getRenderPercentageAsFactor(); | ||||
| float fx = rd->xsch * render_size_factor; | float fx = rd->xsch * render_size_factor; | ||||
| float fy = rd->ysch * render_size_factor; | float fy = rd->ysch * render_size_factor; | ||||
| operation->setFactorXY(fx, fy); | operation->setFactorXY(fx, fy); | ||||
| Show All 24 Lines | |||||