Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Bishop <nicholasbishop@gmail.com>2008-01-16 10:19:21 +0300
committerNicholas Bishop <nicholasbishop@gmail.com>2008-01-16 10:19:21 +0300
commitc6118036bc044bd5f25106dfb0b422ee2310d5ba (patch)
treeb7d3105398c881d155043dc6579bf6e7652f179e /source/blender/include/BIF_radialcontrol.h
parentf41c3340be9fbd5126a09a514f48cf88af2ec951 (diff)
== Radial Control ==
* Generalized the interactive brush property control from sculpt mode into a simple API * Modified sculpt mode to take advantage of this (even fixes some minor bugs!) * Added shortcuts in particle edit to set brush size/strength (FKEY/shift+FKEY) Still todo are the other modes that have brushes...
Diffstat (limited to 'source/blender/include/BIF_radialcontrol.h')
-rw-r--r--source/blender/include/BIF_radialcontrol.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/source/blender/include/BIF_radialcontrol.h b/source/blender/include/BIF_radialcontrol.h
new file mode 100644
index 00000000000..81181a3a91e
--- /dev/null
+++ b/source/blender/include/BIF_radialcontrol.h
@@ -0,0 +1,62 @@
+/*
+ * $Id: multires.h 13015 2007-12-27 07:27:03Z nicholasbishop $
+ *
+ * ***** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 by Nicholas Bishop
+ * All rights reserved.
+ *
+ * The Original Code is: all of this file.
+ *
+ * Contributor(s): none yet.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef RADIALCONTROL_H
+#define RADIALCONTROL_H
+
+struct NumInput;
+
+#define RADIALCONTROL_NONE 0
+#define RADIALCONTROL_SIZE 1
+#define RADIALCONTROL_STRENGTH 2
+#define RADIALCONTROL_ROTATION 3
+
+typedef void (*RadialControlCallback)(const int, const int);
+
+typedef struct RadialControl {
+ int mode;
+ short origloc[2];
+
+ unsigned int tex;
+
+ int new_value;
+ int original_value;
+ int max_value;
+ RadialControlCallback callback;
+
+ struct NumInput *num;
+} RadialControl;
+
+RadialControl *radialcontrol_start(const int mode, RadialControlCallback callback,
+ const int original_value, const int max_value,
+ const unsigned int tex);
+void radialcontrol_do_events(RadialControl *rc, const unsigned short event);
+void radialcontrol_draw(RadialControl *rc);
+
+#endif