Commit 12899142 authored by Jan Möbius's avatar Jan Möbius

Light type separated

parent bba43b3a
Pipeline #4378 failed with stage
in 37 minutes and 1 second
......@@ -65,7 +65,7 @@
#include <OpenFlipper/common/RecentFiles.hh>
#include <ObjectTypes/Light/Light.hh>
//#include <ObjectTypes/Light/Light.hh>
#include <OpenFlipper/ACGHelper/DrawModeConverter.hh>
......@@ -594,12 +594,14 @@ void Core::writeIniFile(QString _filename,
file = f->second;
}
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects
LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light );
if(light != 0) {
if(light->defaultLight()) continue;
}
*/
if (QFile(file).exists()){
// Add a section for this object
......@@ -626,12 +628,15 @@ void Core::writeIniFile(QString _filename,
// Tell plugins to save their information for the given object
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::ALL_OBJECTS) ;
o_it != PluginFunctions::objectsEnd(); ++o_it) {
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects
LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light );
if(light != 0) {
if(light->defaultLight()) continue;
}
*/
emit iniSave( ini , o_it->id() );
}
......
......@@ -50,7 +50,7 @@
#include "Core.hh"
#include <ObjectTypes/Light/Light.hh>
//#include <ObjectTypes/Light/Light.hh>
/// Save Settings (slot is called from CoreWidget's File-Menu)
void Core::saveSettings(){
......@@ -267,6 +267,7 @@ void Core::saveSettings(QString complete_name, bool is_saveObjectInfo, bool is_t
}
}
/* @Todo: This is broken when Light source Object type is not available!
// Don't save default light source objects
LightObject* light = 0;
PluginFunctions::getObject( o_it->id(), light );
......@@ -274,6 +275,8 @@ void Core::saveSettings(QString complete_name, bool is_saveObjectInfo, bool is_t
if(light->defaultLight()) continue;
}
*/
// Store original file name
originalFiles.insert(filename);
......
include (plugin)
openflipper_plugin (INCDIRS ${CMAKE_BINARY_DIR}/ACG
TRANSLATION_LANGUAGES de_DE
INSTALLDATA Icons )
add_dependencies(Plugin-Datacontrol ACG)
INSTALLDATA Icons
TYPES LIGHT)
include (plugin)
openflipper_plugin ( TYPES POLYMESH TRIANGLEMESH )
openflipper_plugin ( TYPES POLYMESH TRIANGLEMESH LIGHT )
include (plugin)
openflipper_plugin ()
openflipper_plugin (TYPES LIGHT)
include (plugin)
openflipper_plugin ( )
openflipper_plugin ( TYPES LIGHT )
include (plugin)
openflipper_plugin ( INSTALLDATA Shaders )
openflipper_plugin ( INSTALLDATA Shaders
TYPES LIGHT)
......@@ -63,7 +63,7 @@
//== INCLUDES =================================================================
#include <ACG/Scenegraph/BaseNode.hh>
#include <OpenFlipper/common/GlobalDefines.hh>
#include <OpenFlipper/common/ObjectTypeDLLDefines.hh>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <ACG/GL/gl.hh>
#include <ACG/GL/GLPrimitives.hh>
......@@ -88,7 +88,7 @@ namespace SceneGraph {
**/
/// Structure to hold options for one LightSource
class DLLEXPORT LightSource
class OBJECTTYPEDLLEXPORT LightSource
{
// Declare Node as friend for direct access to memberss
friend class LightNode;
......@@ -252,7 +252,7 @@ protected:
};
class DLLEXPORT LightNode : public BaseNode
class OBJECTTYPEDLLEXPORT LightNode : public BaseNode
{
public:
......@@ -340,7 +340,7 @@ private:
* stored in a map. If there is no free light source left,
* return GL_INVALID_ENUM as light source enumerant.
*/
class DLLEXPORT LightSourceHandle {
class OBJECTTYPEDLLEXPORT LightSourceHandle {
public:
LightSourceHandle() {
GLint maxLights;
......
......@@ -59,7 +59,8 @@
#include <OpenFlipper/common/Types.hh>
#include <OpenFlipper/BasePlugin/PluginFunctions.hh>
#include <OpenFlipper/BasePlugin/PluginFunctionsCore.hh>
#include <OpenFlipper/BasePlugin/PluginFunctionsSceneGraphWidget.hh>
#include <ACG/QtWidgets/QtSceneGraphWidget.hh>
#include "LightWidget.hh"
//== DEFINES ==================================================================
......
......@@ -67,7 +67,7 @@
//== INCLUDES =================================================================
#include <OpenFlipper/common/BaseObjectData.hh>
#include <OpenFlipper/common/GlobalDefines.hh>
#include <OpenFlipper/common/ObjectTypeDLLDefines.hh>
#include "LightTypes.hh"
......@@ -75,7 +75,7 @@
// //== CLASS DEFINITION =========================================================
class DLLEXPORT LightObject : public BaseObjectData {
class OBJECTTYPEDLLEXPORT LightObject : public BaseObjectData {
friend class TypeLightPlugin;
friend class LightWidget;
......
......@@ -56,10 +56,10 @@
#endif
#include <OpenFlipper/common/GlobalDefines.hh>
#include <OpenFlipper/common/ObjectTypeDLLDefines.hh>
#include "Light.hh"
class DLLEXPORT LightWidget : public QDialog, public Ui::LightWidgetBase
class OBJECTTYPEDLLEXPORT LightWidget : public QDialog, public Ui::LightWidgetBase
{
Q_OBJECT
......
......@@ -75,7 +75,7 @@ namespace PluginFunctions {
/** This functions returns the object with the given id if it is a LightObject.
* See get_object( int _identifier , BaseObject*& _object ) for more details.
*/
DLLEXPORT
OBJECTTYPEDLLEXPORT
bool getObject( int _identifier , LightObject*& _object );
/** \brief Get a LightNode from an object.
......@@ -83,7 +83,7 @@ bool getObject( int _identifier , LightObject*& _object );
* @param _object The object should be of type BaseDataObject. If the content is a light, a
* LightNode will be returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
OBJECTTYPEDLLEXPORT
LightNode* lightNode( BaseObjectData* _object );
/** \brief Cast an BaseObject to a LightObject if possible
......@@ -91,7 +91,7 @@ LightNode* lightNode( BaseObjectData* _object );
* @param _object The object should be of type BaseDataObject. If the content is a light, a
* a LightObject is returned. Otherwise a NULL pointer is returned.
*/
DLLEXPORT
OBJECTTYPEDLLEXPORT
LightObject* lightObject( BaseObjectData* _object );
/** \brief Get the lightSource in this Object
......@@ -99,7 +99,7 @@ LightObject* lightObject( BaseObjectData* _object );
* @param _object Try to get a light source from an object. If this Object is not
* a light source, the function will return 0
*/
DLLEXPORT
OBJECTTYPEDLLEXPORT
LightSource* lightSource( BaseObjectData* _object );
/** \brief Get the lightSource in this Object
......@@ -107,7 +107,7 @@ LightSource* lightSource( BaseObjectData* _object );
* @param _object Try to get a light source from an object. If this Object is not
* a light source or anything else goes wrong, the function will return 0
*/
DLLEXPORT
OBJECTTYPEDLLEXPORT
LightSource* lightSource( LightObject* _object );
}
......
include (plugin)
if (EXISTS ${CMAKE_SOURCE_DIR}/ObjectTypes/Light/Light.hh)
openflipper_plugin (INSTALLDATA Icons)
else()
message( WARNING "Plugin TypeLight disabled due to missing Light ObjectType" )
endif ()
openflipper_plugin (TYPES LIGHT
INSTALLDATA Icons)
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