project: moved color manager outside of node graph
This commit is contained in:
@@ -28,8 +28,6 @@ namespace olive {
|
||||
|
||||
ColorProcessor::ColorProcessor(ColorManager *config, const QString &input, const ColorTransform &transform, Direction direction)
|
||||
{
|
||||
QMutexLocker locker(config->mutex());
|
||||
|
||||
const QString& output = (transform.output().isEmpty()) ? config->GetDefaultDisplay() : transform.output();
|
||||
|
||||
if (transform.is_display()) {
|
||||
@@ -43,8 +41,6 @@ ColorProcessor::ColorProcessor(ColorManager *config, const QString &input, const
|
||||
display_transform->setView(view.toUtf8());
|
||||
display_transform->setDirection(direction == kNormal ? OCIO::TRANSFORM_DIR_FORWARD : OCIO::TRANSFORM_DIR_INVERSE);
|
||||
|
||||
OCIO_SET_C_LOCALE_FOR_SCOPE;
|
||||
|
||||
if (transform.look().isEmpty()) {
|
||||
processor_ = config->GetConfig()->getProcessor(display_transform);
|
||||
} else {
|
||||
@@ -69,7 +65,6 @@ ColorProcessor::ColorProcessor(ColorManager *config, const QString &input, const
|
||||
|
||||
} else {
|
||||
|
||||
OCIO_SET_C_LOCALE_FOR_SCOPE;
|
||||
try {
|
||||
if (direction == kNormal) {
|
||||
processor_ = config->GetConfig()->getProcessor(input.toUtf8(), output.toUtf8());
|
||||
|
||||
@@ -733,7 +733,7 @@ void PreviewAutoCacher::SetProject(Project *project)
|
||||
}
|
||||
|
||||
// Find copied viewer node
|
||||
copied_color_manager_ = copier_->GetCopy(project_->color_manager());
|
||||
copied_color_manager_ = copier_->GetCopiedProject()->color_manager();
|
||||
|
||||
SetRendersPaused(false);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,8 @@ public:
|
||||
return static_cast<T*>(copy_map_.key(copy));
|
||||
}
|
||||
|
||||
Project *GetCopiedProject() const { return copy_; }
|
||||
|
||||
const QHash<Node*, Node*> &GetNodeMap() const { return copy_map_; }
|
||||
|
||||
const JobTime &GetGraphChangeTime() const { return graph_changed_time_; }
|
||||
|
||||
Reference in New Issue
Block a user