Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_sequencer/sequencer_edit.c
| Show First 20 Lines • Show All 3,496 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| void SEQUENCER_OT_rebuild_proxy(wmOperatorType *ot) | void SEQUENCER_OT_rebuild_proxy(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Rebuild Proxy and Timecode Indices"; | ot->name = "Rebuild Proxy and Timecode Indices"; | ||||
| ot->idname = "SEQUENCER_OT_rebuild_proxy"; | ot->idname = "SEQUENCER_OT_rebuild_proxy"; | ||||
| ot->description = "Rebuild all selected proxies and timecode indices using the job system"; | ot->description = "Rebuild all selected proxies and timecode indices using the job system"; | ||||
ISS: Both poll functions are identical.
Use one function for both operators, I would name it… | |||||
| /* api callbacks */ | /* api callbacks */ | ||||
Not Done Inline ActionsPoll functions should never perform searches on all selected items. Just use the active as is done elsewhere. campbellbarton: Poll functions should never perform searches on all selected items. Just use the active as is… | |||||
Not Done Inline ActionsBut the operator is applied to all selected items, not just the active one. Is there a faster way to iterate over selected items ? mathers: But the operator is applied to all selected items, not just the active one. Is there a faster… | |||||
Not Done Inline ActionsI would understand concern of accessing selection from python as a python object, as it has to be built. Most users will hit a and rebuild proxies button, but they can't because it's not visible. Sorry, I really can not help myself here... Can we have managed list of selected sequences, that will be updated when user updates the selection so we don't have to iterate over all elements? Will this be OK then? ISS: I would understand concern of accessing selection from python as a python object, as it has to… | |||||
| ot->invoke = sequencer_rebuild_proxy_invoke; | ot->invoke = sequencer_rebuild_proxy_invoke; | ||||
| ot->exec = sequencer_rebuild_proxy_exec; | ot->exec = sequencer_rebuild_proxy_exec; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER; | ot->flag = OPTYPE_REGISTER; | ||||
| } | } | ||||
| static int sequencer_enable_proxies_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | static int sequencer_enable_proxies_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event)) | ||||
| ▲ Show 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | static int sequencer_enable_proxies_exec(bContext *C, wmOperator *op) | ||||
| return OPERATOR_FINISHED; | return OPERATOR_FINISHED; | ||||
| } | } | ||||
| void SEQUENCER_OT_enable_proxies(wmOperatorType *ot) | void SEQUENCER_OT_enable_proxies(wmOperatorType *ot) | ||||
| { | { | ||||
| /* identifiers */ | /* identifiers */ | ||||
| ot->name = "Set Selected Strip Proxies"; | ot->name = "Set Selected Strip Proxies"; | ||||
| ot->idname = "SEQUENCER_OT_enable_proxies"; | ot->idname = "SEQUENCER_OT_enable_proxies"; | ||||
| ot->description = "Enable selected proxies on all selected Movie strips"; | ot->description = "Enable selected proxies on all selected Movie, Image and Meta strips"; | ||||
| /* api callbacks */ | /* api callbacks */ | ||||
| ot->invoke = sequencer_enable_proxies_invoke; | ot->invoke = sequencer_enable_proxies_invoke; | ||||
| ot->exec = sequencer_enable_proxies_exec; | ot->exec = sequencer_enable_proxies_exec; | ||||
| /* flags */ | /* flags */ | ||||
| ot->flag = OPTYPE_REGISTER; | ot->flag = OPTYPE_REGISTER; | ||||
| ▲ Show 20 Lines • Show All 386 Lines • Show Last 20 Lines | |||||
Both poll functions are identical.
Use one function for both operators, I would name it sequencer_selection_proxy_supported_poll