[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50532] branches/soc-2011-tomato: Sequencer: added option to calculate modifiers in linear space
Sergey Sharybin
sergey.vfx at gmail.com
Tue Sep 11 14:35:25 CEST 2012
Revision: 50532
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50532
Author: nazgul
Date: 2012-09-11 12:35:25 +0000 (Tue, 11 Sep 2012)
Log Message:
-----------
Sequencer: added option to calculate modifiers in linear space
It was really annoying mistake in original support of logarithmic color space
for sequencer which made adjustment layers be working in linear space. Seems
this was only an issue for modifiers in adjustment effect.
Now all modifiers are applying in sequencer's color space (in fact, this was
fixed in svn rev50275).
To preserve compatibility of Mango grading added this option which probably
wouldn't be used by others.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50275
Modified Paths:
--------------
branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
branches/soc-2011-tomato/source/blender/blenkernel/intern/seqmodifier.c
branches/soc-2011-tomato/source/blender/makesdna/DNA_sequence_types.h
branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c
Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-09-11 12:30:30 UTC (rev 50531)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_sequencer.py 2012-09-11 12:35:25 UTC (rev 50532)
@@ -884,6 +884,8 @@
strip = act_strip(context)
sequencer = context.scene.sequence_editor
+ layout.prop(strip, "use_linear_modifiers")
+
layout.operator_menu_enum("sequencer.strip_modifier_add", "type")
for mod in strip.modifiers:
Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/seqmodifier.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/seqmodifier.c 2012-09-11 12:30:30 UTC (rev 50531)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/seqmodifier.c 2012-09-11 12:35:25 UTC (rev 50532)
@@ -581,6 +581,11 @@
SequenceModifierData *smd;
ImBuf *processed_ibuf = ibuf;
+ if (seq->modifiers.first && (seq->flag & SEQ_USE_LINEAR_MODIFIERS)) {
+ processed_ibuf = IMB_dupImBuf(ibuf);
+ BKE_sequencer_imbuf_from_sequencer_space(context.scene, processed_ibuf);
+ }
+
for (smd = seq->modifiers.first; smd; smd = smd->next) {
SequenceModifierTypeInfo *smti = BKE_sequence_modifier_type_info_get(smd->type);
@@ -605,6 +610,10 @@
}
}
+ if (seq->modifiers.first && (seq->flag & SEQ_USE_LINEAR_MODIFIERS)) {
+ BKE_sequencer_imbuf_to_sequencer_space(context.scene, processed_ibuf, FALSE);
+ }
+
return processed_ibuf;
}
Modified: branches/soc-2011-tomato/source/blender/makesdna/DNA_sequence_types.h
===================================================================
--- branches/soc-2011-tomato/source/blender/makesdna/DNA_sequence_types.h 2012-09-11 12:30:30 UTC (rev 50531)
+++ branches/soc-2011-tomato/source/blender/makesdna/DNA_sequence_types.h 2012-09-11 12:35:25 UTC (rev 50532)
@@ -329,6 +329,7 @@
#define SEQ_USE_PROXY_CUSTOM_FILE (1 << 21)
#define SEQ_USE_EFFECT_DEFAULT_FADE (1 << 22)
+#define SEQ_USE_LINEAR_MODIFIERS (1 << 23)
// flags for whether those properties are animated or not
#define SEQ_AUDIO_VOLUME_ANIMATED (1 << 24)
Modified: branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c 2012-09-11 12:30:30 UTC (rev 50531)
+++ branches/soc-2011-tomato/source/blender/makesrna/intern/rna_sequencer.c 2012-09-11 12:35:25 UTC (rev 50532)
@@ -1433,6 +1433,11 @@
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set", NULL); /* overlap test */
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+ prop = RNA_def_property(srna, "use_linear_modifiers", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_LINEAR_MODIFIERS);
+ RNA_def_property_ui_text(prop, "Use Linear Modifiers", "Calculate modifiers in linear space instead of sequencer's space");
+ RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
+
/* blending */
prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
More information about the Bf-blender-cvs
mailing list