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:
authorCampbell Barton <ideasman42@gmail.com>2017-06-21 06:54:46 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-06-21 07:10:14 +0300
commitb7669ac1c672a92f31735ae9f92b369f9ba30eb1 (patch)
tree1747e45bcc61cd4c2fc02dd3f006f49b4a18ca2b /source/blender/windowmanager/manipulators/intern/wm_manipulator_type.c
parent5b51dcacbc81df6283518317c274bf897010e967 (diff)
Manipulators: move settings to ID properties
This makes manipulator access closer to operators, and allows Python access. This adds RNA for manipulators, but not Python registration yet. - Split draw style into 2x settings: `draw_style` (enum) & `draw_options` (enum-flag) - Rename wmManipulator.properties -> properties_edit, Use wmManipulator.properties for ID-properties. Note that this area of the API will need further work since manipulators now have 2 kinds of properties & API's to access them.
Diffstat (limited to 'source/blender/windowmanager/manipulators/intern/wm_manipulator_type.c')
-rw-r--r--source/blender/windowmanager/manipulators/intern/wm_manipulator_type.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/windowmanager/manipulators/intern/wm_manipulator_type.c b/source/blender/windowmanager/manipulators/intern/wm_manipulator_type.c
index e89d4cc6e81..94b4000b841 100644
--- a/source/blender/windowmanager/manipulators/intern/wm_manipulator_type.c
+++ b/source/blender/windowmanager/manipulators/intern/wm_manipulator_type.c
@@ -31,6 +31,7 @@
#include "MEM_guardedalloc.h"
#include "RNA_access.h"
+#include "RNA_define.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -82,12 +83,20 @@ void WM_manipulatortype_iter(GHashIterator *ghi)
static wmManipulatorType *wm_manipulatortype_append__begin(void)
{
wmManipulatorType *wt = MEM_callocN(sizeof(wmManipulatorType), "manipulatortype");
+ wt->srna = RNA_def_struct_ptr(&BLENDER_RNA, "", &RNA_ManipulatorProperties);
+#if 0
+ /* Set the default i18n context now, so that opfunc can redefine it if needed! */
+ RNA_def_struct_translation_context(ot->srna, BLT_I18NCONTEXT_OPERATOR_DEFAULT);
+ ot->translation_context = BLT_I18NCONTEXT_OPERATOR_DEFAULT;
+#endif
return wt;
}
static void wm_manipulatortype_append__end(wmManipulatorType *wt)
{
BLI_assert(wt->struct_size >= sizeof(wmManipulator));
+ RNA_def_struct_identifier(wt->srna, wt->idname);
+
BLI_ghash_insert(global_manipulatortype_hash, (void *)wt->idname, wt);
}