Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper-Free
Commits
12899142
Commit
12899142
authored
Feb 14, 2017
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Light type separated
parent
bba43b3a
Pipeline
#4378
failed with stage
in 37 minutes and 1 second
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
37 additions
and
27 deletions
+37
-27
OpenFlipper/Core/ParseIni.cc
OpenFlipper/Core/ParseIni.cc
+6
-1
OpenFlipper/Core/saveSettings.cc
OpenFlipper/Core/saveSettings.cc
+4
-1
Plugin-Datacontrol/CMakeLists.txt
Plugin-Datacontrol/CMakeLists.txt
+2
-2
Plugin-INI/CMakeLists.txt
Plugin-INI/CMakeLists.txt
+1
-1
PluginCollection-FilePlugins/Plugin-FileLgt/CMakeLists.txt
PluginCollection-FilePlugins/Plugin-FileLgt/CMakeLists.txt
+1
-1
PluginCollection-Renderers/Plugin-Render-Classic/CMakeLists.txt
...Collection-Renderers/Plugin-Render-Classic/CMakeLists.txt
+1
-1
PluginCollection-Renderers/Plugin-Render-Old-DepthPeeling/CMakeLists.txt
...n-Renderers/Plugin-Render-Old-DepthPeeling/CMakeLists.txt
+2
-1
Type-Light/ObjectTypes/Light/CMakeLists.txt
Type-Light/ObjectTypes/Light/CMakeLists.txt
+3
-0
Type-Light/ObjectTypes/Light/LightNode.hh
Type-Light/ObjectTypes/Light/LightNode.hh
+4
-4
Type-Light/ObjectTypes/Light/LightObject.cc
Type-Light/ObjectTypes/Light/LightObject.cc
+2
-1
Type-Light/ObjectTypes/Light/LightObject.hh
Type-Light/ObjectTypes/Light/LightObject.hh
+2
-2
Type-Light/ObjectTypes/Light/LightWidget.hh
Type-Light/ObjectTypes/Light/LightWidget.hh
+2
-2
Type-Light/ObjectTypes/Light/PluginFunctionsLight.hh
Type-Light/ObjectTypes/Light/PluginFunctionsLight.hh
+5
-5
Type-Light/Plugin-TypeLight/CMakeLists.txt
Type-Light/Plugin-TypeLight/CMakeLists.txt
+2
-5
No files found.
OpenFlipper/Core/ParseIni.cc
View file @
12899142
...
...
@@ -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
()
);
}
...
...
OpenFlipper/Core/saveSettings.cc
View file @
12899142
...
...
@@ -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
);
...
...
Plugin-Datacontrol/CMakeLists.txt
View file @
12899142
include
(
plugin
)
openflipper_plugin
(
INCDIRS
${
CMAKE_BINARY_DIR
}
/ACG
TRANSLATION_LANGUAGES de_DE
INSTALLDATA Icons
)
add_dependencies
(
Plugin-Datacontrol ACG
)
INSTALLDATA Icons
TYPES LIGHT
)
Plugin-INI/CMakeLists.txt
View file @
12899142
include
(
plugin
)
openflipper_plugin
(
TYPES POLYMESH TRIANGLEMESH
)
openflipper_plugin
(
TYPES POLYMESH TRIANGLEMESH
LIGHT
)
PluginCollection-FilePlugins/Plugin-FileLgt/CMakeLists.txt
View file @
12899142
include
(
plugin
)
openflipper_plugin
()
openflipper_plugin
(
TYPES LIGHT
)
PluginCollection-Renderers/Plugin-Render-Classic/CMakeLists.txt
View file @
12899142
include
(
plugin
)
openflipper_plugin
(
)
openflipper_plugin
(
TYPES LIGHT
)
PluginCollection-Renderers/Plugin-Render-Old-DepthPeeling/CMakeLists.txt
View file @
12899142
include
(
plugin
)
openflipper_plugin
(
INSTALLDATA Shaders
)
openflipper_plugin
(
INSTALLDATA Shaders
TYPES LIGHT
)
Type-Light/ObjectTypes/Light/CMakeLists.txt
0 → 100644
View file @
12899142
include
(
type
)
Type-Light/ObjectTypes/Light/LightNode.hh
View file @
12899142
...
...
@@ -63,7 +63,7 @@
//== INCLUDES =================================================================
#include <ACG/Scenegraph/BaseNode.hh>
#include <OpenFlipper/common/
Global
Defines.hh>
#include <OpenFlipper/common/
ObjectTypeDLL
Defines.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
OBJECTTYPE
DLLEXPORT
LightSource
{
// Declare Node as friend for direct access to memberss
friend
class
LightNode
;
...
...
@@ -252,7 +252,7 @@ protected:
};
class
DLLEXPORT
LightNode
:
public
BaseNode
class
OBJECTTYPE
DLLEXPORT
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
OBJECTTYPE
DLLEXPORT
LightSourceHandle
{
public:
LightSourceHandle
()
{
GLint
maxLights
;
...
...
Type-Light/ObjectTypes/Light/LightObject.cc
View file @
12899142
...
...
@@ -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 ==================================================================
...
...
Type-Light/ObjectTypes/Light/LightObject.hh
View file @
12899142
...
...
@@ -67,7 +67,7 @@
//== INCLUDES =================================================================
#include <OpenFlipper/common/BaseObjectData.hh>
#include <OpenFlipper/common/
Global
Defines.hh>
#include <OpenFlipper/common/
ObjectTypeDLL
Defines.hh>
#include "LightTypes.hh"
...
...
@@ -75,7 +75,7 @@
// //== CLASS DEFINITION =========================================================
class
DLLEXPORT
LightObject
:
public
BaseObjectData
{
class
OBJECTTYPE
DLLEXPORT
LightObject
:
public
BaseObjectData
{
friend
class
TypeLightPlugin
;
friend
class
LightWidget
;
...
...
Type-Light/ObjectTypes/Light/LightWidget.hh
View file @
12899142
...
...
@@ -56,10 +56,10 @@
#endif
#include <OpenFlipper/common/
Global
Defines.hh>
#include <OpenFlipper/common/
ObjectTypeDLL
Defines.hh>
#include "Light.hh"
class
DLLEXPORT
LightWidget
:
public
QDialog
,
public
Ui
::
LightWidgetBase
class
OBJECTTYPE
DLLEXPORT
LightWidget
:
public
QDialog
,
public
Ui
::
LightWidgetBase
{
Q_OBJECT
...
...
Type-Light/ObjectTypes/Light/PluginFunctionsLight.hh
View file @
12899142
...
...
@@ -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
OBJECTTYPE
DLLEXPORT
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
OBJECTTYPE
DLLEXPORT
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
OBJECTTYPE
DLLEXPORT
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
OBJECTTYPE
DLLEXPORT
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
OBJECTTYPE
DLLEXPORT
LightSource
*
lightSource
(
LightObject
*
_object
);
}
...
...
Type-Light/Plugin-TypeLight/CMakeLists.txt
View file @
12899142
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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment