New Scene now has the popup from 2.4x which gives the option to copy.
Added some test code for rna_info to create a big list of property+type+descriptions, useful for api name review.
This commit is contained in:
@@ -620,3 +620,19 @@ def BuildRNAInfo():
|
||||
# print(rna_info)
|
||||
|
||||
return InfoStructRNA.global_lookup, InfoFunctionRNA.global_lookup, InfoOperatorRNA.global_lookup, InfoPropertyRNA.global_lookup
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import rna_info
|
||||
struct = rna_info.BuildRNAInfo()[0]
|
||||
data = ""
|
||||
for struct_id, v in sorted(struct.items()):
|
||||
struct_id_str = "".join(sid for sid in struct_id if struct_id)
|
||||
props = [(prop.identifier, prop) for prop in v.properties]
|
||||
|
||||
for prop_id, prop in sorted(props):
|
||||
data += "%s.%s: %s %s\n" % (struct_id_str, prop.identifier, prop.type, prop.description)
|
||||
|
||||
|
||||
text = bpy.data.texts.new(name="api.py")
|
||||
text.from_string(data)
|
||||
|
||||
@@ -428,7 +428,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
|
||||
int w= id?UI_UNIT_X: (flag & UI_ID_OPEN)? UI_UNIT_X*3: UI_UNIT_X*6;
|
||||
|
||||
if(newop) {
|
||||
but= uiDefIconTextButO(block, BUT, newop, WM_OP_EXEC_DEFAULT, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL);
|
||||
but= uiDefIconTextButO(block, BUT, newop, WM_OP_INVOKE_DEFAULT, ICON_ZOOMIN, (id)? "": "New", 0, 0, w, UI_UNIT_Y, NULL);
|
||||
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user