ReflectionProperty* ReflectionTypeComponent::createProperty( void* object ) const { ReflectionProperty* property = instantiateProperty( object ); if( property != NULL ) { property->setParams( m_memberName, m_label, m_isEditable, m_canBeSaved ); } return property; }
void MaterialNode::onPropertyChanged( ReflectionProperty& property ) { __super::onPropertyChanged( property ); if ( property.getName() == "m_inputs" ) { notify( GBNO_INPUTS_CHANGED ); } else if ( property.getName() == "m_outputs" ) { notify( GBNO_OUTPUTS_CHANGED ); } }
void RPPostProcessNode::onPropertyChanged( ReflectionProperty& property ) { __super::onPropertyChanged( property ); if ( property.getName() == "m_renderTargetId" ) { std::vector< GBNodeOutput< RenderingPipelineNode >* > outputs; MRTUtil::createOutputs( m_renderTargetId, outputs ); redefineOutputs( outputs ); } else if ( property.getName() == "m_shader" && m_shader.isNotNull() ) { m_shaderNode->setShader( *m_shader ); } }
void StoryActor::onObservedPropertyChanged( ReflectionProperty& property ) { if ( property.getName() == "m_localMtx" ) { // item instance was moved - copy its transform Matrix* itemLocalMtx = (Matrix*)property.edit(); if ( m_transform != *itemLocalMtx ) { m_transform = *itemLocalMtx; ReflectionProperty* property = getProperty( "m_transform" ); notifyPropertyChange( *property ); delete property; } } }
void SkeletonAnimationController::onPropertyChanged( ReflectionProperty& property ) { __super::onPropertyChanged( property ); if ( property.getName() == "m_source" ) { onDataChanged(); } }
void MNTexture::onPropertyChanged( ReflectionProperty& property ) { MaterialNode::onPropertyChanged( property ); if ( property.getName() == "m_texture" ) { m_renderableTexture->setTexture( m_texture ); } }
void RPPostProcessNode::onPrePropertyChanged( ReflectionProperty& property ) { __super::onPropertyChanged( property ); if ( property.getName() == "m_shader" && m_shaderNode ) { m_shaderNode->resetShader(); } }
void GraphBlock::onPropertyChanged( ReflectionProperty& property ) { __super::onPropertyChanged( property ); if ( property.getName() == "m_caption" ) { // recalculate the block bounds each time the caption changes calculateBounds(); } }
void GeometryEntity::onPropertyChanged( ReflectionProperty& property ) { __super::onPropertyChanged( property ); if ( property.getName() == "m_geometryShader" ) { initializeGeometryShader(); attachListeners(); } }
void ReflectionObjectEditor::onPropertyChanged( ReflectionProperty& property ) { uint changedPropertyId = ReflectionTypeComponent::generateId( property.getName() ); unsigned int count = m_editors.size(); for ( unsigned int i = 0; i < count; ++i ) { ReflectionPropertyEditor* editor = m_editors[i]; if ( editor->m_propertyId == changedPropertyId ) { // found the property editor that corresponds to the changed property editor->onPropertyChanged(); break; } } }
void AnimationEventsEditor::onObservedPropertyChanged( ReflectionProperty& property ) { if ( property.getName() == "m_animation" ) { SnapshotAnimation* animation = m_animationNode.getAnimation(); if ( animation ) { // convert to milliseconds uint durationInMillisecs = animation->m_duration * 100.0f; m_slider->setMaximum( durationInMillisecs ); } else { m_slider->setMaximum( 0 ); } // reset slider's position m_slider->setSliderPosition( 0 ); // update the source on our custom player m_customAnimationPlayer->setAnimationSource( animation ); } }