Cleanup: Added leading `e` to enum types.
This commit is contained in:
parent
5a491adc17
commit
b6ab1107c2
|
@ -28,7 +28,7 @@ CompositorContext::CompositorContext()
|
|||
{
|
||||
this->m_scene = nullptr;
|
||||
this->m_rd = nullptr;
|
||||
this->m_quality = CompositorQuality::High;
|
||||
this->m_quality = eCompositorQuality::High;
|
||||
this->m_hasActiveOpenCLDevices = false;
|
||||
this->m_fastCalculation = false;
|
||||
this->m_viewSettings = nullptr;
|
||||
|
|
|
@ -48,7 +48,7 @@ class CompositorContext {
|
|||
* This field is initialized in ExecutionSystem and must only be read from that point on.
|
||||
* \see ExecutionSystem
|
||||
*/
|
||||
CompositorQuality m_quality;
|
||||
eCompositorQuality m_quality;
|
||||
|
||||
Scene *m_scene;
|
||||
|
||||
|
@ -205,7 +205,7 @@ class CompositorContext {
|
|||
/**
|
||||
* \brief set the quality
|
||||
*/
|
||||
void setQuality(CompositorQuality quality)
|
||||
void setQuality(eCompositorQuality quality)
|
||||
{
|
||||
this->m_quality = quality;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ class CompositorContext {
|
|||
/**
|
||||
* \brief get the quality
|
||||
*/
|
||||
CompositorQuality getQuality() const
|
||||
eCompositorQuality getQuality() const
|
||||
{
|
||||
return this->m_quality;
|
||||
}
|
||||
|
|
|
@ -20,18 +20,18 @@
|
|||
|
||||
namespace blender::compositor {
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const CompositorPriority &priority)
|
||||
std::ostream &operator<<(std::ostream &os, const eCompositorPriority &priority)
|
||||
{
|
||||
switch (priority) {
|
||||
case CompositorPriority::High: {
|
||||
case eCompositorPriority::High: {
|
||||
os << "Priority::High";
|
||||
break;
|
||||
}
|
||||
case CompositorPriority::Medium: {
|
||||
case eCompositorPriority::Medium: {
|
||||
os << "Priority::Medium";
|
||||
break;
|
||||
}
|
||||
case CompositorPriority::Low: {
|
||||
case eCompositorPriority::Low: {
|
||||
os << "Priority::Low";
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace blender::compositor {
|
|||
* \see CompositorContext.quality
|
||||
* \ingroup Execution
|
||||
*/
|
||||
enum class CompositorQuality {
|
||||
enum class eCompositorQuality {
|
||||
/** \brief High quality setting */
|
||||
High = 0,
|
||||
/** \brief Medium quality setting */
|
||||
|
@ -42,7 +42,7 @@ enum class CompositorQuality {
|
|||
* \brief Possible priority settings
|
||||
* \ingroup Execution
|
||||
*/
|
||||
enum class CompositorPriority {
|
||||
enum class eCompositorPriority {
|
||||
/** \brief High quality setting */
|
||||
High = 2,
|
||||
/** \brief Medium quality setting */
|
||||
|
@ -70,7 +70,7 @@ enum class eWorkPackageState {
|
|||
Executed = 2,
|
||||
};
|
||||
|
||||
std::ostream &operator<<(std::ostream &os, const CompositorPriority &priority);
|
||||
std::ostream &operator<<(std::ostream &os, const eCompositorPriority &priority);
|
||||
std::ostream &operator<<(std::ostream &os, const eWorkPackageState &execution_state);
|
||||
|
||||
} // namespace blender::compositor
|
||||
|
|
|
@ -92,7 +92,7 @@ std::ostream &operator<<(std::ostream &os, const ExecutionGroup &execution_group
|
|||
return os;
|
||||
}
|
||||
|
||||
CompositorPriority ExecutionGroup::getRenderPriority()
|
||||
eCompositorPriority ExecutionGroup::getRenderPriority()
|
||||
{
|
||||
return this->getOutputOperation()->getRenderPriority();
|
||||
}
|
||||
|
|
|
@ -389,7 +389,7 @@ class ExecutionGroup {
|
|||
* \brief get the Render priority of this ExecutionGroup
|
||||
* \see ExecutionSystem.execute
|
||||
*/
|
||||
CompositorPriority getRenderPriority();
|
||||
eCompositorPriority getRenderPriority();
|
||||
|
||||
/**
|
||||
* \brief set border for viewer operation
|
||||
|
|
|
@ -55,10 +55,10 @@ ExecutionSystem::ExecutionSystem(RenderData *rd,
|
|||
this->m_context.setFastCalculation(fastcalculation);
|
||||
/* initialize the CompositorContext */
|
||||
if (rendering) {
|
||||
this->m_context.setQuality((CompositorQuality)editingtree->render_quality);
|
||||
this->m_context.setQuality((eCompositorQuality)editingtree->render_quality);
|
||||
}
|
||||
else {
|
||||
this->m_context.setQuality((CompositorQuality)editingtree->edit_quality);
|
||||
this->m_context.setQuality((eCompositorQuality)editingtree->edit_quality);
|
||||
}
|
||||
this->m_context.setRendering(rendering);
|
||||
this->m_context.setHasActiveOpenCLDevices(WorkScheduler::has_gpu_devices() &&
|
||||
|
@ -193,10 +193,10 @@ void ExecutionSystem::execute()
|
|||
init_execution_groups_for_execution(m_groups, m_context.getChunksize());
|
||||
|
||||
WorkScheduler::start(this->m_context);
|
||||
execute_groups(CompositorPriority::High);
|
||||
execute_groups(eCompositorPriority::High);
|
||||
if (!this->getContext().isFastCalculation()) {
|
||||
execute_groups(CompositorPriority::Medium);
|
||||
execute_groups(CompositorPriority::Low);
|
||||
execute_groups(eCompositorPriority::Medium);
|
||||
execute_groups(eCompositorPriority::Low);
|
||||
}
|
||||
WorkScheduler::finish();
|
||||
WorkScheduler::stop();
|
||||
|
@ -212,7 +212,7 @@ void ExecutionSystem::execute()
|
|||
}
|
||||
}
|
||||
|
||||
void ExecutionSystem::execute_groups(CompositorPriority priority)
|
||||
void ExecutionSystem::execute_groups(eCompositorPriority priority)
|
||||
{
|
||||
for (ExecutionGroup *execution_group : m_groups) {
|
||||
if (execution_group->get_flags().is_output &&
|
||||
|
|
|
@ -179,7 +179,7 @@ class ExecutionSystem {
|
|||
}
|
||||
|
||||
private:
|
||||
void execute_groups(CompositorPriority priority);
|
||||
void execute_groups(eCompositorPriority priority);
|
||||
|
||||
/* allow the DebugInfo class to look at internals */
|
||||
friend class DebugInfo;
|
||||
|
|
|
@ -452,11 +452,11 @@ class NodeOperation {
|
|||
/**
|
||||
* \brief get the render priority of this node.
|
||||
* \note only applicable for output operations like ViewerOperation
|
||||
* \return CompositorPriority
|
||||
* \return eCompositorPriority
|
||||
*/
|
||||
virtual CompositorPriority getRenderPriority() const
|
||||
virtual eCompositorPriority getRenderPriority() const
|
||||
{
|
||||
return CompositorPriority::Low;
|
||||
return eCompositorPriority::Low;
|
||||
}
|
||||
|
||||
inline bool isBraked() const
|
||||
|
|
|
@ -47,7 +47,7 @@ void BlurNode::convertToOperations(NodeConverter &converter,
|
|||
const float size = this->getInputSocket(1)->getEditorValueFloat();
|
||||
const bool extend_bounds = (editorNode->custom1 & CMP_NODEFLAG_BLUR_EXTEND_BOUNDS) != 0;
|
||||
|
||||
CompositorQuality quality = context.getQuality();
|
||||
eCompositorQuality quality = context.getQuality();
|
||||
NodeOperation *input_operation = nullptr, *output_operation = nullptr;
|
||||
|
||||
if (data->filtertype == R_FILTER_FAST_GAUSS) {
|
||||
|
|
|
@ -112,7 +112,7 @@ void DefocusNode::convertToOperations(NodeConverter &converter,
|
|||
|
||||
VariableSizeBokehBlurOperation *operation = new VariableSizeBokehBlurOperation();
|
||||
if (data->preview) {
|
||||
operation->setQuality(CompositorQuality::Low);
|
||||
operation->setQuality(eCompositorQuality::Low);
|
||||
}
|
||||
else {
|
||||
operation->setQuality(context.getQuality());
|
||||
|
|
|
@ -85,7 +85,7 @@ void DilateErodeNode::convertToOperations(NodeConverter &converter,
|
|||
}
|
||||
else if (editorNode->custom1 == CMP_NODE_DILATEERODE_DISTANCE_FEATHER) {
|
||||
/* this uses a modified gaussian blur function otherwise its far too slow */
|
||||
CompositorQuality quality = context.getQuality();
|
||||
eCompositorQuality quality = context.getQuality();
|
||||
|
||||
GaussianAlphaXBlurOperation *operationx = new GaussianAlphaXBlurOperation();
|
||||
operationx->setData(&m_alpha_blur);
|
||||
|
|
|
@ -32,7 +32,7 @@ void DisplaceNode::convertToOperations(NodeConverter &converter,
|
|||
const CompositorContext &context) const
|
||||
{
|
||||
NodeOperation *operation;
|
||||
if (context.getQuality() == CompositorQuality::Low) {
|
||||
if (context.getQuality() == eCompositorQuality::Low) {
|
||||
operation = new DisplaceSimpleOperation();
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -144,7 +144,7 @@ NodeOperationOutput *KeyingNode::setupFeather(NodeConverter &converter,
|
|||
int distance) const
|
||||
{
|
||||
/* this uses a modified gaussian blur function otherwise its far too slow */
|
||||
CompositorQuality quality = context.getQuality();
|
||||
eCompositorQuality quality = context.getQuality();
|
||||
|
||||
/* initialize node data */
|
||||
NodeBlurData data;
|
||||
|
|
|
@ -111,9 +111,9 @@ class CompositorOperation : public NodeOperation {
|
|||
}
|
||||
void initExecution() override;
|
||||
void deinitExecution() override;
|
||||
CompositorPriority getRenderPriority() const override
|
||||
eCompositorPriority getRenderPriority() const override
|
||||
{
|
||||
return CompositorPriority::Medium;
|
||||
return eCompositorPriority::Medium;
|
||||
}
|
||||
void determineResolution(unsigned int resolution[2],
|
||||
unsigned int preferredResolution[2]) override;
|
||||
|
|
|
@ -66,9 +66,9 @@ class OutputSingleLayerOperation : public NodeOperation {
|
|||
}
|
||||
void initExecution() override;
|
||||
void deinitExecution() override;
|
||||
CompositorPriority getRenderPriority() const override
|
||||
eCompositorPriority getRenderPriority() const override
|
||||
{
|
||||
return CompositorPriority::Low;
|
||||
return eCompositorPriority::Low;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -118,9 +118,9 @@ class OutputOpenExrMultiLayerOperation : public NodeOperation {
|
|||
}
|
||||
void initExecution() override;
|
||||
void deinitExecution() override;
|
||||
CompositorPriority getRenderPriority() const override
|
||||
eCompositorPriority getRenderPriority() const override
|
||||
{
|
||||
return CompositorPriority::Low;
|
||||
return eCompositorPriority::Low;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -166,9 +166,9 @@ void PreviewOperation::determineResolution(unsigned int resolution[2],
|
|||
resolution[1] = height;
|
||||
}
|
||||
|
||||
CompositorPriority PreviewOperation::getRenderPriority() const
|
||||
eCompositorPriority PreviewOperation::getRenderPriority() const
|
||||
{
|
||||
return CompositorPriority::Low;
|
||||
return eCompositorPriority::Low;
|
||||
}
|
||||
|
||||
} // namespace blender::compositor
|
||||
|
|
|
@ -55,7 +55,7 @@ class PreviewOperation : public NodeOperation {
|
|||
}
|
||||
void initExecution() override;
|
||||
void deinitExecution() override;
|
||||
CompositorPriority getRenderPriority() const override;
|
||||
eCompositorPriority getRenderPriority() const override;
|
||||
|
||||
void executeRegion(rcti *rect, unsigned int tileNumber) override;
|
||||
void determineResolution(unsigned int resolution[2],
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace blender::compositor {
|
|||
|
||||
QualityStepHelper::QualityStepHelper()
|
||||
{
|
||||
this->m_quality = CompositorQuality::High;
|
||||
this->m_quality = eCompositorQuality::High;
|
||||
this->m_step = 1;
|
||||
this->m_offsetadd = 4;
|
||||
}
|
||||
|
@ -32,16 +32,16 @@ void QualityStepHelper::initExecution(QualityHelper helper)
|
|||
switch (helper) {
|
||||
case COM_QH_INCREASE:
|
||||
switch (this->m_quality) {
|
||||
case CompositorQuality::High:
|
||||
case eCompositorQuality::High:
|
||||
default:
|
||||
this->m_step = 1;
|
||||
this->m_offsetadd = 1;
|
||||
break;
|
||||
case CompositorQuality::Medium:
|
||||
case eCompositorQuality::Medium:
|
||||
this->m_step = 2;
|
||||
this->m_offsetadd = 2;
|
||||
break;
|
||||
case CompositorQuality::Low:
|
||||
case eCompositorQuality::Low:
|
||||
this->m_step = 3;
|
||||
this->m_offsetadd = 3;
|
||||
break;
|
||||
|
@ -49,16 +49,16 @@ void QualityStepHelper::initExecution(QualityHelper helper)
|
|||
break;
|
||||
case COM_QH_MULTIPLY:
|
||||
switch (this->m_quality) {
|
||||
case CompositorQuality::High:
|
||||
case eCompositorQuality::High:
|
||||
default:
|
||||
this->m_step = 1;
|
||||
this->m_offsetadd = 4;
|
||||
break;
|
||||
case CompositorQuality::Medium:
|
||||
case eCompositorQuality::Medium:
|
||||
this->m_step = 2;
|
||||
this->m_offsetadd = 8;
|
||||
break;
|
||||
case CompositorQuality::Low:
|
||||
case eCompositorQuality::Low:
|
||||
this->m_step = 4;
|
||||
this->m_offsetadd = 16;
|
||||
break;
|
||||
|
|
|
@ -29,7 +29,7 @@ typedef enum QualityHelper {
|
|||
|
||||
class QualityStepHelper {
|
||||
private:
|
||||
CompositorQuality m_quality;
|
||||
eCompositorQuality m_quality;
|
||||
int m_step;
|
||||
int m_offsetadd;
|
||||
|
||||
|
@ -51,7 +51,7 @@ class QualityStepHelper {
|
|||
public:
|
||||
QualityStepHelper();
|
||||
|
||||
void setQuality(CompositorQuality quality)
|
||||
void setQuality(eCompositorQuality quality)
|
||||
{
|
||||
this->m_quality = quality;
|
||||
}
|
||||
|
|
|
@ -209,13 +209,13 @@ void ViewerOperation::updateImage(rcti *rect)
|
|||
this->updateDraw();
|
||||
}
|
||||
|
||||
CompositorPriority ViewerOperation::getRenderPriority() const
|
||||
eCompositorPriority ViewerOperation::getRenderPriority() const
|
||||
{
|
||||
if (this->isActiveViewerOutput()) {
|
||||
return CompositorPriority::High;
|
||||
return eCompositorPriority::High;
|
||||
}
|
||||
|
||||
return CompositorPriority::Low;
|
||||
return eCompositorPriority::Low;
|
||||
}
|
||||
|
||||
} // namespace blender::compositor
|
||||
|
|
|
@ -102,7 +102,7 @@ class ViewerOperation : public NodeOperation {
|
|||
{
|
||||
return this->m_chunkOrder;
|
||||
}
|
||||
CompositorPriority getRenderPriority() const override;
|
||||
eCompositorPriority getRenderPriority() const override;
|
||||
void setUseAlphaInput(bool value)
|
||||
{
|
||||
this->m_useAlphaInput = value;
|
||||
|
|
Loading…
Reference in New Issue