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;
}
예제 #2
0
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 );
    }
}
예제 #3
0
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 );
   }
}
예제 #4
0
파일: StoryActor.cpp 프로젝트: dabroz/Tamy
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();
   }
}
예제 #6
0
파일: MNTexture.cpp 프로젝트: dabroz/Tamy
void MNTexture::onPropertyChanged( ReflectionProperty& property )
{
   MaterialNode::onPropertyChanged( property );

   if ( property.getName() == "m_texture" )
   {
      m_renderableTexture->setTexture( m_texture );
   }
}
예제 #7
0
void RPPostProcessNode::onPrePropertyChanged( ReflectionProperty& property )
{
   __super::onPropertyChanged( property );

   if ( property.getName() == "m_shader" && m_shaderNode )
   {
      m_shaderNode->resetShader();
   }
}
예제 #8
0
void GraphBlock::onPropertyChanged( ReflectionProperty& property )
{
   __super::onPropertyChanged( property );

   if ( property.getName() == "m_caption" )
   {
      // recalculate the block bounds each time the caption changes
      calculateBounds();
   }
}
예제 #9
0
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;
      }
   }
}
예제 #11
0
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 );
   }
}