2.12.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit 0212878f authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

fixed updateProperties() in various processors

parent ebb0ef7b
......@@ -239,7 +239,7 @@ namespace campvis {
void EEPGenerator::updateProperties() {
p_mirrorID.setVisible(p_enableMirror.getValue());
HasPropertyCollection::updateProperties();
validate(AbstractProcessor::INVALID_PROPERTIES);
}
}
......@@ -39,7 +39,7 @@ namespace campvis {
SimpleRaycaster::SimpleRaycaster(IVec2Property* viewportSizeProp)
: RaycastingProcessor(viewportSizeProp, "modules/vis/glsl/simpleraycaster.frag", true)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows (Expensive!)", false, AbstractProcessor::INVALID_SHADER | AbstractProcessor::INVALID_PROPERTIES)
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows (Expensive!)", false, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_SHADER | AbstractProcessor::INVALID_PROPERTIES)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f)
, p_enableAdaptiveStepsize("EnableAdaptiveStepSize", "Enable Adaptive Step Size", true, AbstractProcessor::INVALID_SHADER)
{
......@@ -92,7 +92,7 @@ namespace campvis {
void SimpleRaycaster::updateProperties() {
p_shadowIntensity.setVisible(p_enableShadowing.getValue());
HasPropertyCollection::updateProperties();
validate(AbstractProcessor::INVALID_PROPERTIES);
}
}
......@@ -49,7 +49,7 @@ namespace campvis {
SliceRenderer3D::SliceRenderer3D(IVec2Property* viewportSizeProp)
: VisualizationProcessor(viewportSizeProp)
, p_sourceImageID("sourceImageID", "Input Image", "", DataNameProperty::READ)
, p_sourceImageID("sourceImageID", "Input Image", "", DataNameProperty::READ, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_PROPERTIES)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_camera("Camera", "Camera")
, p_sliceNumber("sliceNumber", "Slice Number", 0, 0, 0)
......@@ -140,9 +140,12 @@ namespace campvis {
void SliceRenderer3D::updateProperties(DataContainer& dc) {
ScopedTypedData<ImageData> img(dc, p_sourceImageID.getValue());
const tgt::svec3& imgSize = img->getSize();
if (p_sliceNumber.getMaxValue() != imgSize.z - 1){
p_sliceNumber.setMaxValue(static_cast<int>(imgSize.z) - 1);
if (img != 0) {
const tgt::svec3& imgSize = img->getSize();
if (p_sliceNumber.getMaxValue() != imgSize.z - 1){
p_sliceNumber.setMaxValue(static_cast<int>(imgSize.z) - 1);
}
}
validate(AbstractProcessor::INVALID_PROPERTIES);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment