[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38097] branches/soc-2011-onion: back to C , C++ would give me headaches it seems.
Antony Riakiotakis
kalast at gmail.com
Tue Jul 5 00:03:33 CEST 2011
Revision: 38097
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38097
Author: psy-fi
Date: 2011-07-04 22:03:32 +0000 (Mon, 04 Jul 2011)
Log Message:
-----------
back to C, C++ would give me headaches it seems. Add enable function notifier to RNA GUI
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/editors/include/ED_image.h
branches/soc-2011-onion/source/blender/editors/space_image/space_image.c
branches/soc-2011-onion/source/blender/editors/uvedit/CMakeLists.txt
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h
branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h
branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c
branches/soc-2011-onion/source/blenderplayer/bad_level_call_stubs/stubs.c
Added Paths:
-----------
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.c
Removed Paths:
-------------
branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.cpp
Property Changed:
----------------
branches/soc-2011-onion/
Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/trunk/blender:36833-38033
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-30783,30792-30793,30797-30798,30815
/trunk/blender:36833-38038
Modified: branches/soc-2011-onion/source/blender/editors/include/ED_image.h
===================================================================
--- branches/soc-2011-onion/source/blender/editors/include/ED_image.h 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blender/editors/include/ED_image.h 2011-07-04 22:03:32 UTC (rev 38097)
@@ -68,5 +68,8 @@
/* UI level image (texture) updating... render calls own stuff (too) */
void ED_image_update_frame(const struct Main *mainp, int cfra);
+/* uvedit_island_manager.c */
+void ED_space_image_enable_island_manager(int state);
+
#endif /* ED_IMAGE_H */
Modified: branches/soc-2011-onion/source/blender/editors/space_image/space_image.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/space_image/space_image.c 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blender/editors/space_image/space_image.c 2011-07-04 22:03:32 UTC (rev 38097)
@@ -307,6 +307,13 @@
return 0;
}
+/* enable island manager */
+void ED_space_image_enable_island_manager(int state)
+{
+ /* in uvedit_island_manager */
+ extern UVIslandManager _island_manager;
+ _island_manager.active = (state > 0);
+}
static void image_scopes_tag_refresh(ScrArea *sa)
{
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/CMakeLists.txt
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/CMakeLists.txt 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/CMakeLists.txt 2011-07-04 22:03:32 UTC (rev 38097)
@@ -41,7 +41,7 @@
uvedit_ops.c
uvedit_parametrizer.c
uvedit_unwrap_ops.c
- uvedit_island_manager.cpp
+ uvedit_island_manager.c
uvedit_intern.h
uvedit_parametrizer.h
)
Modified: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_intern.h 2011-07-04 22:03:32 UTC (rev 38097)
@@ -95,6 +95,5 @@
/* tool utilities */
StitchPreviewer *uv_get_stitch_previewer(void);
-void setIslandManagerActiveState(int state);
#endif /* ED_UVEDIT_INTERN_H */
Added: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.c (rev 0)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.c 2011-07-04 22:03:32 UTC (rev 38097)
@@ -0,0 +1,64 @@
+/*
+ * $Id: uvedit_island_manager.cpp 38000 2011-07-01 12:06:32Z psy-fi $
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s): Antony Riakiotakis, Blender Foundation, 2002-2009
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/editors/uvedit/uvedit_island_manager.cpp
+ * \ingroup eduv
+ */
+
+#include "GL/glew.h"
+
+/*
+ * UVIsland Component, stores boundaries for uv island, possibly a list of faces too, though this would be
+ */
+typedef struct UVIslandComponent {
+ float x_pos;
+ float y_pos;
+ float width;
+ float height;
+ /* Looks like a family reunion :p */
+ struct UVIslandComponent *brother;
+ struct UVIslandComponent *child;
+} UVIslandComponent;
+
+
+static void draw_UV_island_cell(UVIslandComponent *cell)
+{
+
+}
+
+
+/**
+ * Island Manager, holds the state necessary to use/display the island manager
+ */
+typedef struct UVIslandManager {
+ char active;
+
+ UVIslandComponent *rootIsland;
+} UVIslandManager;
+
+UVIslandManager _island_manager;
Property changes on: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.c
___________________________________________________________________
Added: svn:eol-style
+ native
Deleted: branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.cpp
===================================================================
--- branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.cpp 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blender/editors/uvedit/uvedit_island_manager.cpp 2011-07-04 22:03:32 UTC (rev 38097)
@@ -1,95 +0,0 @@
-/*
- * $Id: uvedit_island_manager.cpp 38000 2011-07-01 12:06:32Z psy-fi $
- *
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
- * All rights reserved.
- *
- *
- * Contributor(s): Antony Riakiotakis, Blender Foundation, 2002-2009
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/editors/uvedit/uvedit_island_manager.cpp
- * \ingroup eduv
- */
-
-#include "GL/glew.h"
-
-/*
- * UVIsland Component, stores boundaries for uv island, possibly a list of faces too, though this would be
- */
-class UVIslandComponent {
- public:
- UVIslandComponent();
- ~UVIslandComponent();
- void draw();
- private:
- float x_pos;
- float y_pos;
- float width;
- float height;
- /* Looks like a family reunion :p */
- UVIslandComponent *brother;
- UVIslandComponent *child;
-};
-
-/**
- * Island Manager, holds the state necessary to use/display the island manager
- */
-class UVIslandManager {
- public:
- static UVIslandManager *getUVIslandManager();
- int getActive(){return active;}
- void enable(){active = true;}
- void disable(){active = false;}
-
- private:
- static UVIslandManager _island_manager;
- UVIslandManager();
- ~UVIslandManager();
- bool active;
-
- class UVIslandComponent rootIsland;
-};
-
-UVIslandManager UVIslandManager::_island_manager;
-
-
-void setIslandManagerActiveState(int state)
-{
- UVIslandManager *manager = UVIslandManager::getUVIslandManager();
- if(state)
- manager->enable();
- else
- manager->disable();
-}
-
-
-/***************************************
- * UVIslandComponent Implementation
- ***************************************/
-
-void UVIslandComponent::draw()
-{
- if(brother)
- brother->draw();
- if(child)
- child->draw();
-}
Modified: branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h
===================================================================
--- branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blender/makesdna/DNA_scene_types.h 2011-07-04 22:03:32 UTC (rev 38097)
@@ -733,6 +733,29 @@
float sculpt_paint_unified_alpha; /* unified strength of brush */
} ToolSettings;
+/*
+ * UVIsland Component, stores boundaries for uv island, possibly a list of faces too, though this would be
+ */
+typedef struct UVIslandComponent {
+ float x_pos;
+ float y_pos;
+ float width;
+ float height;
+ /* Looks like a family reunion :p */
+ struct UVIslandComponent *brother;
+ struct UVIslandComponent *child;
+} UVIslandComponent;
+
+/**
+ * Island Manager, holds the state necessary to use/display the island manager
+ */
+typedef struct UVIslandManager {
+ UVIslandComponent *rootIsland;
+ int active;
+ int pad2;
+} UVIslandManager;
+
+
typedef struct bStats {
/* scene totals for visible layers */
int totobj, totlamp, totobjsel, totcurve, totmesh, totarmature;
Modified: branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c
===================================================================
--- branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blender/makesrna/intern/rna_space.c 2011-07-04 22:03:32 UTC (rev 38097)
@@ -447,8 +447,7 @@
static void rna_update_island_manager(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
SpaceImage *sima= (SpaceImage*)(ptr->data);
- if(sima->flag & SI_ISLAND_MANAGER)
- printf("papakia\n");
+ ED_space_image_enable_island_manager(sima->flag & SI_ISLAND_MANAGER);
}
static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr)
Modified: branches/soc-2011-onion/source/blenderplayer/bad_level_call_stubs/stubs.c
===================================================================
--- branches/soc-2011-onion/source/blenderplayer/bad_level_call_stubs/stubs.c 2011-07-04 21:21:49 UTC (rev 38096)
+++ branches/soc-2011-onion/source/blenderplayer/bad_level_call_stubs/stubs.c 2011-07-04 22:03:32 UTC (rev 38097)
@@ -192,6 +192,7 @@
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list