[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30069] branches/particles-2010: Added a new object data type for particles called ParticleSet, which will be a container for particles.
Lukas Toenne
lukas.toenne at googlemail.com
Wed Jul 7 09:17:13 CEST 2010
Revision: 30069
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30069
Author: lukastoenne
Date: 2010-07-07 09:17:12 +0200 (Wed, 07 Jul 2010)
Log Message:
-----------
Added a new object data type for particles called ParticleSet, which will be a container for particles.
Modified Paths:
--------------
branches/particles-2010/release/scripts/ui/space_info.py
branches/particles-2010/source/blender/blenkernel/BKE_main.h
branches/particles-2010/source/blender/blenkernel/intern/library.c
branches/particles-2010/source/blender/editors/CMakeLists.txt
branches/particles-2010/source/blender/editors/space_api/spacetypes.c
branches/particles-2010/source/blender/makesdna/DNA_ID.h
branches/particles-2010/source/blender/makesdna/DNA_object_types.h
branches/particles-2010/source/creator/CMakeLists.txt
Added Paths:
-----------
branches/particles-2010/source/blender/blenkernel/BKE_particleset.h
branches/particles-2010/source/blender/blenkernel/intern/particleset.c
branches/particles-2010/source/blender/editors/include/ED_particleset.h
branches/particles-2010/source/blender/editors/particleset/
branches/particles-2010/source/blender/editors/particleset/CMakeLists.txt
branches/particles-2010/source/blender/editors/particleset/editparticleset.c
branches/particles-2010/source/blender/editors/particleset/particleset_intern.h
branches/particles-2010/source/blender/editors/particleset/particleset_ops.c
branches/particles-2010/source/blender/makesdna/DNA_particleset_types.h
Modified: branches/particles-2010/release/scripts/ui/space_info.py
===================================================================
--- branches/particles-2010/release/scripts/ui/space_info.py 2010-07-07 04:40:33 UTC (rev 30068)
+++ branches/particles-2010/release/scripts/ui/space_info.py 2010-07-07 07:17:12 UTC (rev 30069)
@@ -242,6 +242,9 @@
layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
layout.separator()
+ layout.operator("particleset.primitive_particleset_add", text="Particle Set", icon='PARTICLES')
+ layout.separator()
+
layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
layout.operator_context = 'EXEC_SCREEN'
layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
Modified: branches/particles-2010/source/blender/blenkernel/BKE_main.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_main.h 2010-07-07 04:40:33 UTC (rev 30068)
+++ branches/particles-2010/source/blender/blenkernel/BKE_main.h 2010-07-07 07:17:12 UTC (rev 30069)
@@ -78,6 +78,7 @@
ListBase particle;
ListBase wm;
ListBase gpencil;
+ ListBase particleset;
} Main;
Added: branches/particles-2010/source/blender/blenkernel/BKE_particleset.h
===================================================================
--- branches/particles-2010/source/blender/blenkernel/BKE_particleset.h (rev 0)
+++ branches/particles-2010/source/blender/blenkernel/BKE_particleset.h 2010-07-07 07:17:12 UTC (rev 30069)
@@ -0,0 +1,39 @@
+/**
+ * ***** 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) 2005 Blender Foundation.
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef BKE_PARTICLESET_H
+#define BKE_PARTICLESET_H
+
+#include "DNA_particleset_types.h"
+
+struct ParticleSet;
+
+void make_local_particleset(struct ParticleSet *pset);
+struct ParticleSet* copy_particleset(struct ParticleSet *pset);
+void free_particleset(struct ParticleSet *pset);
+
+#endif
Modified: branches/particles-2010/source/blender/blenkernel/intern/library.c
===================================================================
--- branches/particles-2010/source/blender/blenkernel/intern/library.c 2010-07-07 04:40:33 UTC (rev 30068)
+++ branches/particles-2010/source/blender/blenkernel/intern/library.c 2010-07-07 07:17:12 UTC (rev 30069)
@@ -64,6 +64,7 @@
#include "DNA_nla_types.h"
#include "DNA_windowmanager_types.h"
#include "DNA_anim_types.h"
+#include "DNA_particleset_types.h"
#include "BLI_blenlib.h"
#include "BLI_dynstr.h"
@@ -97,6 +98,7 @@
#include "BKE_brush.h"
#include "BKE_idprop.h"
#include "BKE_particle.h"
+#include "BKE_particleset.h"
#include "BKE_gpencil.h"
#include "BKE_fcurve.h"
@@ -222,6 +224,9 @@
case ID_PA:
if(!test) make_local_particlesettings((ParticleSettings*)id);
return 1;
+ case ID_PS:
+ if(!test) make_local_particleset((ParticleSet*)id);
+ return 1;
case ID_WM:
return 0; /* can't be linked */
case ID_GD:
@@ -311,6 +316,9 @@
case ID_PA:
if(!test) *newid= (ID*)psys_copy_settings((ParticleSettings*)id);
return 1;
+ case ID_PS:
+ if(!test) *newid= (ID*)copy_particleset((ParticleSet*)id);
+ return 1;
case ID_WM:
return 0; /* can't be copied from here */
case ID_GD:
@@ -409,6 +417,8 @@
return &(mainlib->brush);
case ID_PA:
return &(mainlib->particle);
+ case ID_PS:
+ return &(mainlib->particleset);
case ID_WM:
return &(mainlib->wm);
case ID_GD:
@@ -485,6 +495,7 @@
lb[a++]= &(main->brush);
lb[a++]= &(main->script);
lb[a++]= &(main->particle);
+ lb[a++]= &(main->particleset);
lb[a++]= &(main->world);
lb[a++]= &(main->screen);
@@ -595,6 +606,9 @@
case ID_PA:
id = MEM_callocN(sizeof(ParticleSettings), "ParticleSettings");
break;
+ case ID_PS:
+ id = MEM_callocN(sizeof(ParticleSet), "ParticleSet");
+ break;
case ID_WM:
id = MEM_callocN(sizeof(wmWindowManager), "Window manager");
break;
@@ -799,6 +813,9 @@
case ID_PA:
psys_free_settings((ParticleSettings *)id);
break;
+ case ID_PS:
+ free_particleset((ParticleSet *)id);
+ break;
case ID_WM:
if(free_windowmanager_cb)
free_windowmanager_cb(NULL, (wmWindowManager *)id);
Added: branches/particles-2010/source/blender/blenkernel/intern/particleset.c
===================================================================
--- branches/particles-2010/source/blender/blenkernel/intern/particleset.c (rev 0)
+++ branches/particles-2010/source/blender/blenkernel/intern/particleset.c 2010-07-07 07:17:12 UTC (rev 30069)
@@ -0,0 +1,46 @@
+/**
+ * ***** 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.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include "DNA_particleset_types.h"
+
+#include "MEM_guardedalloc.h"
+
+#include "BKE_particleset.h"
+
+void make_local_particleset(ParticleSet *pset)
+{
+}
+
+ParticleSet* copy_particleset(ParticleSet *pset)
+{
+ /* TODO */
+ return NULL;
+}
+
+void free_particleset(ParticleSet *pset)
+{
+}
Modified: branches/particles-2010/source/blender/editors/CMakeLists.txt
===================================================================
--- branches/particles-2010/source/blender/editors/CMakeLists.txt 2010-07-07 04:40:33 UTC (rev 30068)
+++ branches/particles-2010/source/blender/editors/CMakeLists.txt 2010-07-07 07:17:12 UTC (rev 30069)
@@ -29,6 +29,7 @@
ADD_SUBDIRECTORY(metaball)
ADD_SUBDIRECTORY(object)
ADD_SUBDIRECTORY(physics)
+ADD_SUBDIRECTORY(particleset)
ADD_SUBDIRECTORY(render)
ADD_SUBDIRECTORY(screen)
ADD_SUBDIRECTORY(sculpt_paint)
Added: branches/particles-2010/source/blender/editors/include/ED_particleset.h
===================================================================
--- branches/particles-2010/source/blender/editors/include/ED_particleset.h (rev 0)
+++ branches/particles-2010/source/blender/editors/include/ED_particleset.h 2010-07-07 07:17:12 UTC (rev 30069)
@@ -0,0 +1,35 @@
+/**
+ * ***** 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) 2009 Blender Foundation.
+ * All rights reserved.
+ *
+ *
+ * Contributor(s):
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef ED_PARTICLESET_H
+#define ED_PARTICLESET_H
+
+/* pointcloud_ops.c */
+void ED_operatortypes_particleset(void);
+
+/* editpointcloud.c */
+
+#endif
Added: branches/particles-2010/source/blender/editors/particleset/CMakeLists.txt
===================================================================
--- branches/particles-2010/source/blender/editors/particleset/CMakeLists.txt (rev 0)
+++ branches/particles-2010/source/blender/editors/particleset/CMakeLists.txt 2010-07-07 07:17:12 UTC (rev 30069)
@@ -0,0 +1,34 @@
+# $Id: CMakeLists.txt 12931 2007-12-17 18:20:48Z theeth $
+# ***** 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.
+#
+# Contributor(s): Jacques Beaurain.
+#
+# ***** END GPL LICENSE BLOCK *****
+
+FILE(GLOB SRC *.c)
+
+SET(INC
+ ../include
+ ../../blenkernel
+ ../../blenlib
+ ../../makesdna
+ ../../makesrna
+ ../../windowmanager
+ ../../../../intern/guardedalloc
+)
+
+BLENDERLIB(bf_editor_particleset "${SRC}" "${INC}")
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list