com.jme3.scene.plugins.blender.objects
Class Properties

java.lang.Object
  extended by com.jme3.scene.plugins.blender.objects.Properties
All Implemented Interfaces:
java.lang.Cloneable

public class Properties
extends java.lang.Object
implements java.lang.Cloneable

The blender object's custom properties. This class is valid for all versions of blender.


Field Summary
protected static java.lang.String DEFAULT_NAME
          Default name of the property (used if the name is not specified in blender file).
static int IDP_ARRAY
           
static int IDP_DOUBLE
           
static int IDP_FLOAT
           
static int IDP_GROUP
           
static int IDP_IDPARRAY
           
static int IDP_INT
           
static int IDP_NUMTYPES
           
static int IDP_STRING
           
protected static java.lang.String RNA_PROPERTY_NAME
           
 
Constructor Summary
Properties()
           
 
Method Summary
protected  void completeLoading()
          This method should be called after the properties loading.
 boolean equals(java.lang.Object obj)
           
 java.lang.Object findValue(java.lang.String propertyName)
          This method returns the same as getValue if the current property is of other type than IDP_GROUP and its name matches 'propertyName' param.
 java.lang.String getDescription()
          This method returns the description of the property.
 java.lang.String getName()
          This method returns the name of the property.
 java.util.List<java.lang.String> getSubPropertiesNames()
           
 int getType()
          This method returns the type of the property.
 java.lang.Object getValue()
          This method returns the value of the property.
 int hashCode()
           
 void load(Structure idPropertyStructure, BlenderContext blenderContext)
          This method loads the property from the belnder file.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

IDP_STRING

public static final int IDP_STRING
See Also:
Constant Field Values

IDP_INT

public static final int IDP_INT
See Also:
Constant Field Values

IDP_FLOAT

public static final int IDP_FLOAT
See Also:
Constant Field Values

IDP_ARRAY

public static final int IDP_ARRAY
See Also:
Constant Field Values

IDP_GROUP

public static final int IDP_GROUP
See Also:
Constant Field Values

IDP_DOUBLE

public static final int IDP_DOUBLE
See Also:
Constant Field Values

IDP_IDPARRAY

public static final int IDP_IDPARRAY
See Also:
Constant Field Values

IDP_NUMTYPES

public static final int IDP_NUMTYPES
See Also:
Constant Field Values

RNA_PROPERTY_NAME

protected static final java.lang.String RNA_PROPERTY_NAME
See Also:
Constant Field Values

DEFAULT_NAME

protected static final java.lang.String DEFAULT_NAME
Default name of the property (used if the name is not specified in blender file).

See Also:
Constant Field Values
Constructor Detail

Properties

public Properties()
Method Detail

load

public void load(Structure idPropertyStructure,
                 BlenderContext blenderContext)
          throws BlenderFileException
This method loads the property from the belnder file.

Parameters:
idPropertyStructure - the ID structure constining the property
blenderContext - the blender context
Throws:
BlenderFileException - an exception is thrown when the belnder file is somehow invalid

getName

public java.lang.String getName()
This method returns the name of the property.

Returns:
the name of the property

getDescription

public java.lang.String getDescription()
This method returns the description of the property.

Returns:
the description of the property

getType

public int getType()
This method returns the type of the property.

Returns:
the type of the property

getValue

public java.lang.Object getValue()
This method returns the value of the property. The type of the value depends on the type of the property.

Returns:
the value of the property

getSubPropertiesNames

public java.util.List<java.lang.String> getSubPropertiesNames()
Returns:
the names of properties that are stored withing this property (assuming this property is of IDP_GROUP type)

findValue

public java.lang.Object findValue(java.lang.String propertyName)
This method returns the same as getValue if the current property is of other type than IDP_GROUP and its name matches 'propertyName' param. If this property is a group property the method tries to find subproperty value of the given name. The first found value is returnes os use this method wisely. If no property of a given name is foung - null is returned.

Parameters:
propertyName - the name of the property
Returns:
found property value or null

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

completeLoading

protected void completeLoading()
This method should be called after the properties loading. It loads the properties from the _RNA_UI property and removes this property from the result list.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object