diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-03 23:03:39 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-01-03 23:03:39 +0300 |
commit | 3f58b376832903365d3356e8a0eae9ac30f85a06 (patch) | |
tree | 991ef07f2a262fd45073abeb77e8ae908799bdef | |
parent | 927adad8e254fc9f28a483abbe4ce0c663788276 (diff) |
2.5: fix "repeat last", and display of operator properties
in rna outliner.
-rw-r--r-- | source/blender/editors/space_outliner/outliner.c | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 1 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 13 |
4 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c index 5d85c8622e5..97f54b40361 100644 --- a/source/blender/editors/space_outliner/outliner.c +++ b/source/blender/editors/space_outliner/outliner.c @@ -4184,6 +4184,7 @@ static uiBut *outliner_draw_rnabut(uiBlock *block, PointerRNA *ptr, PropertyRNA if(nameprop) { text= RNA_property_string_get_alloc(&pptr, nameprop, textbuf, sizeof(textbuf)); + descr= (char*)RNA_property_ui_description(&pptr, prop); but= uiDefIconTextBut(block, LABEL, 0, icon, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, descr); if(text != textbuf) MEM_freeN(text); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 8f8448759d2..ba367310286 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -875,7 +875,6 @@ static void rna_def_modifier_cast(BlenderRNA *brna) srna= RNA_def_struct(brna, "CastModifier", "Modifier"); RNA_def_struct_ui_text(srna, "Cast Modifier", "Cast Modifier."); RNA_def_struct_sdna(srna, "CastModifierData"); - RNA_def_property_update(prop, NC_OBJECT|ND_MODIFIER, "rna_Modifier_update"); prop= RNA_def_property(srna, "cast_type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "type"); diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index 2008c3c1c6f..1533cc636db 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -80,12 +80,6 @@ void wm_operator_register(wmWindowManager *wm, wmOperator *op) { int tot; - if(op->ptr) { - op->properties= op->ptr->data; - MEM_freeN(op->ptr); - op->ptr= NULL; - } - BLI_addtail(&wm->operators, op); tot= BLI_countlist(&wm->operators); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 308887f71f3..6cc29921bc6 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -367,11 +367,18 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event, P op->type= ot; BLI_strncpy(op->idname, ot->idname, OP_MAX_TYPENAME); + /* initialize properties, either copy or create */ op->ptr= MEM_callocN(sizeof(PointerRNA), "wmOperatorPtrRNA"); - if(properties && properties->data) - op->ptr->data= IDP_CopyProperty(properties->data); - RNA_pointer_create(&RNA_WindowManager, &wm->id, ot->srna, op->ptr->data, op->ptr); + if(properties && properties->data) { + op->properties= IDP_CopyProperty(properties->data); + } + else { + IDPropertyTemplate val = {0}; + op->properties= IDP_New(IDP_GROUP, val, "wmOperatorProperties"); + } + RNA_pointer_create(&RNA_WindowManager, &wm->id, ot->srna, op->properties, op->ptr); + /* initialize error reports */ if (reports) { op->reports= reports; /* must be initialized alredy */ } |