Commit 0a1711ad authored by Jan Möbius's avatar Jan Möbius

Scripting function to set emissive color of an object

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@16500 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 635e30bf
...@@ -291,6 +291,11 @@ void ColorPlugin::setBackgroundColor( Vector _color ) { ...@@ -291,6 +291,11 @@ void ColorPlugin::setBackgroundColor( Vector _color ) {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/** Sets the emissive color of an object
*
* @param _objectId Id of an Object
* @param _color Color to be set
*/
void ColorPlugin::setObjectEmissiveColor(int _objectId , Vector4 _color) { void ColorPlugin::setObjectEmissiveColor(int _objectId , Vector4 _color) {
BaseObjectData* object; BaseObjectData* object;
......
...@@ -181,10 +181,8 @@ class ColorPlugin : public QObject, BaseInterface, MenuInterface, ScriptInterfac ...@@ -181,10 +181,8 @@ class ColorPlugin : public QObject, BaseInterface, MenuInterface, ScriptInterfac
*/ */
void setBackgroundColor( Vector _color ); void setBackgroundColor( Vector _color );
/** Sets the emissive color of an object /**
* * Sets the emissive color of an object
* @param _objectId Id of an Object
* @param _color Color to be set
*/ */
void setObjectEmissiveColor(int _objectId , Vector4 _color); void setObjectEmissiveColor(int _objectId , Vector4 _color);
......
...@@ -16,4 +16,26 @@ ...@@ -16,4 +16,26 @@
</code> </code>
</element> </element>
<element name="color_object_emissive">
<category>Colors</category>
<short>Emissive Color</short>
<long>Set Emissive Color of an object</long>
<dataflow>true</dataflow>
<inputs>
<input name="obj" type="ObjectId">
<short>ID</short>
<long>ID of an object</long>
</input>
<input name="color" type="Vector4">
<short>Color</short>
<long>Desired emissive color</long>
<precision>0.00001</precision>
</input>
</inputs>
<code>
colorplugin.setObjectEmissiveColor([input="obj"],[input="color"])
</code>
</element>
</OpenFlipper> </OpenFlipper>
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