[Bf-blender-cvs] [82ec9c8] temp_remove_particles: Removed particle operators API and point cache operators.

Lukas Tönne noreply at git.blender.org
Tue Apr 12 13:05:38 CEST 2016


Commit: 82ec9c87a7d8ee28b65555c7fcbd8cdb156249e9
Author: Lukas Tönne
Date:   Tue Apr 12 11:47:08 2016 +0200
Branches: temp_remove_particles
https://developer.blender.org/rB82ec9c87a7d8ee28b65555c7fcbd8cdb156249e9

Removed particle operators API and point cache operators.

===================================================================

D	source/blender/editors/include/ED_particle.h
M	source/blender/editors/include/ED_physics.h
M	source/blender/editors/physics/CMakeLists.txt
M	source/blender/editors/physics/physics_intern.h
M	source/blender/editors/physics/physics_ops.c
D	source/blender/editors/physics/physics_pointcache.c
M	source/blender/editors/space_buttons/buttons_context.c
M	source/blender/editors/space_view3d/drawobject.c
M	source/blender/editors/space_view3d/view3d_edit.c
M	source/blender/editors/space_view3d/view3d_select.c
M	source/blender/editors/transform/transform.h
M	source/blender/editors/transform/transform_conversions.c
M	source/blender/editors/transform/transform_generics.c
M	source/blender/editors/transform/transform_manipulator.c
M	source/blender/editors/util/CMakeLists.txt
M	source/blender/editors/util/undo.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/makesrna/intern/rna_sculpt_paint.c
M	source/blenderplayer/bad_level_call_stubs/stubs.c

===================================================================

diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
deleted file mode 100644
index 6cb8c0c..0000000
--- a/source/blender/editors/include/ED_particle.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * ***** 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) 2007 by Janne Karhu.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file ED_particle.h
- *  \ingroup editors
- */
-
-#ifndef __ED_PARTICLE_H__
-#define __ED_PARTICLE_H__
-
-struct bContext;
-struct Object;
-struct ParticleEditSettings;
-struct rcti;
-struct PTCacheEdit;
-struct Scene;
-
-/* particle edit mode */
-void PE_free_ptcache_edit(struct PTCacheEdit *edit);
-int PE_start_edit(struct PTCacheEdit *edit);
-
-/* access */
-struct PTCacheEdit *PE_get_current(struct Scene *scene, struct Object *ob);
-struct PTCacheEdit *PE_create_current(struct Scene *scene, struct Object *ob);
-void PE_current_changed(struct Scene *scene, struct Object *ob);
-int PE_minmax(struct Scene *scene, float min[3], float max[3]);
-struct ParticleEditSettings *PE_settings(struct Scene *scene);
-
-/* update calls */
-void PE_hide_keys_time(struct Scene *scene, struct PTCacheEdit *edit, float cfra);
-void PE_update_object(struct Scene *scene, struct Object *ob, int useflag);
-
-/* selection tools */
-int PE_mouse_particles(struct bContext *C, const int mval[2], bool extend, bool deselect, bool toggle);
-int PE_border_select(struct bContext *C, struct rcti *rect, bool select, bool extend);
-int PE_circle_select(struct bContext *C, int selecting, const int mval[2], float rad);
-int PE_lasso_select(struct bContext *C, const int mcords[][2], const short moves, bool extend, bool select);
-void PE_deselect_all_visible(struct PTCacheEdit *edit);
-
-/* undo */
-void PE_undo_push(struct Scene *scene, const char *str);
-void PE_undo_step(struct Scene *scene, int step);
-void PE_undo(struct Scene *scene);
-void PE_redo(struct Scene *scene);
-bool PE_undo_is_valid(struct Scene *scene);
-void PE_undo_number(struct Scene *scene, int nr);
-const char *PE_undo_get_name(struct Scene *scene, int nr, bool *r_active);
-
-#endif /* __ED_PARTICLE_H__ */
-
diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h
index 584e9a9..f18e778 100644
--- a/source/blender/editors/include/ED_physics.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -39,11 +39,6 @@ struct wmKeyConfig;
 struct Scene;
 struct Object;
 
-/* particle_edit.c */
-int PE_poll(struct bContext *C);
-int PE_hair_poll(struct bContext *C);
-int PE_poll_view3d(struct bContext *C);
-
 /* rigidbody_object.c */
 bool ED_rigidbody_object_add(struct Scene *scene, struct Object *ob, int type, struct ReportList *reports);
 void ED_rigidbody_object_remove(struct Scene *scene, struct Object *ob);
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index b4f36d4..e4513c1 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -40,7 +40,6 @@ set(SRC
 	dynamicpaint_ops.c
 	physics_fluid.c
 	physics_ops.c
-	physics_pointcache.c
 	rigidbody_constraint.c
 	rigidbody_object.c
 	rigidbody_world.c
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index 98d192a..a5b59fe 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -45,15 +45,6 @@ void DPAINT_OT_surface_slot_remove(struct wmOperatorType *ot);
 void DPAINT_OT_type_toggle(struct wmOperatorType *ot);
 void DPAINT_OT_output_toggle(struct wmOperatorType *ot);
 
-/* physics_pointcache.c */
-void PTCACHE_OT_bake_all(struct wmOperatorType *ot);
-void PTCACHE_OT_free_bake_all(struct wmOperatorType *ot);
-void PTCACHE_OT_bake(struct wmOperatorType *ot);
-void PTCACHE_OT_free_bake(struct wmOperatorType *ot);
-void PTCACHE_OT_bake_from_cache(struct wmOperatorType *ot);
-void PTCACHE_OT_add(struct wmOperatorType *ot);
-void PTCACHE_OT_remove(struct wmOperatorType *ot);
-
 /* rigidbody_object.c */
 void RIGIDBODY_OT_object_add(struct wmOperatorType *ot);
 void RIGIDBODY_OT_object_remove(struct wmOperatorType *ot);
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index 5a6e9db..d0cb7fd 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -68,19 +68,6 @@ static void operatortypes_fluid(void)
 	WM_operatortype_append(FLUID_OT_bake);
 }
 
-/**************************** point cache **********************************/
-
-static void operatortypes_pointcache(void)
-{
-	WM_operatortype_append(PTCACHE_OT_bake_all);
-	WM_operatortype_append(PTCACHE_OT_free_bake_all);
-	WM_operatortype_append(PTCACHE_OT_bake);
-	WM_operatortype_append(PTCACHE_OT_free_bake);
-	WM_operatortype_append(PTCACHE_OT_bake_from_cache);
-	WM_operatortype_append(PTCACHE_OT_add);
-	WM_operatortype_append(PTCACHE_OT_remove);
-}
-
 /********************************* dynamic paint ***********************************/
 
 static void operatortypes_dynamicpaint(void)
@@ -92,29 +79,17 @@ static void operatortypes_dynamicpaint(void)
 	WM_operatortype_append(DPAINT_OT_output_toggle);
 }
 
-//static void keymap_pointcache(wmWindowManager *wm)
-//{
-//	wmKeyMap *keymap = WM_keymap_find(wm, "Pointcache", 0, 0);
-//	
-//	WM_keymap_add_item(keymap, "PHYSICS_OT_bake_all", AKEY, KM_PRESS, 0, 0);
-//	WM_keymap_add_item(keymap, "PHYSICS_OT_free_all", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
-//	WM_keymap_add_item(keymap, "PHYSICS_OT_bake_particle_system", PADMINUS, KM_PRESS, KM_CTRL, 0);
-//	WM_keymap_add_item(keymap, "PHYSICS_OT_free_particle_system", LKEY, KM_PRESS, 0, 0);
-//}
-
 /****************************** general ************************************/
 
 void ED_operatortypes_physics(void)
 {
 	operatortypes_rigidbody();
 	operatortypes_fluid();
-	operatortypes_pointcache();
 	operatortypes_dynamicpaint();
 }
 
 void ED_keymap_physics(wmKeyConfig *UNUSED(keyconf))
 {
-	//keymap_pointcache(keyconf);
 }
 
 
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
deleted file mode 100644
index e81aa58..0000000
--- a/source/blender/editors/physics/physics_pointcache.c
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * ***** 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) 2007 by Janne Karhu.
- * All rights reserved.
- *
- * The Original Code is: all of this file.
- *
- * Contributor(s): none yet.
- *
- * ***** END GPL LICENSE BLOCK *****
- */
-
-/** \file blender/editors/physics/physics_pointcache.c
- *  \ingroup edphys
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "MEM_guardedalloc.h"
-
-#include "BLI_blenlib.h"
-#include "BLI_utildefines.h"
-
-#include "DNA_scene_types.h"
-
-#include "BKE_context.h"
-#include "BKE_screen.h"
-#include "BKE_global.h"
-#include "BKE_main.h"
-#include "BKE_particle.h"
-#include "BKE_pointcache.h"
-
-#include "ED_particle.h"
-
-#include "WM_api.h"
-#include "WM_types.h"
-
-#include "RNA_access.h"
-#include "RNA_define.h"
-
-#include "physics_intern.h"
-
-static int ptcache_bake_all_poll(bContext *C)
-{
-	return CTX_data_scene(C) != NULL;
-}
-
-static int ptcache_poll(bContext *C)
-{
-	PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
-	return (ptr.data && ptr.id.data);
-}
-
-typedef struct PointCacheJob {
-	void *owner;
-	short *stop, *do_update;
-	float *progress;
-
-	PTCacheBaker *baker;
-} PointCacheJob;
-
-static void ptcache_job_free(void *customdata)
-{
-	PointCacheJob *job = customdata;
-	MEM_freeN(job->baker);
-	MEM_freeN(job);
-}
-
-static int ptcache_job_break(void *customdata)
-{
-	PointCacheJob *job = customdata;
-
-	if (G.is_break) {
-		return 1;
-	}
-
-	if (job->stop && *(job->stop)) {
-		return 1;
-	}
-
-	return 0;
-}
-
-static void ptcache_job_update(void *customdata, float progress, int *cancel)
-{
-    PointCacheJob *job = customdata;
-
-    if (ptcache_job_break(job)) {
-        *cancel = 1;
-    }
-
-    *(job->do_update) = true;
-    *(job->progress) = progress;
-}
-
-static void ptcache_job_startjob(void *customdata, short *stop, short *do_update, float *progress)
-{
-    PointCacheJob *job = customdata;
-
-    job->stop = stop;
-    job->do_update = do_update;
-    job->progress = progress;
-
-    G.is_break = false;
-
-    /* XXX annoying hack: needed to prevent data corruption when changing
-     * scene frame in separate threads
-     */
-    G.is_rendering = true;
-    BKE_spacedata_draw_locks(true);
-
-	BKE_ptcache_bake(job-

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list