Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_generics.c
| Show First 20 Lines • Show All 1,648 Lines • ▼ Show 20 Lines | void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *event) | ||||
| else { | else { | ||||
| /* Avoid mirroring for unsupported contexts. */ | /* Avoid mirroring for unsupported contexts. */ | ||||
| t->options |= CTX_NO_MIRROR; | t->options |= CTX_NO_MIRROR; | ||||
| } | } | ||||
| /* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */ | /* setting PET flag only if property exist in operator. Otherwise, assume it's not supported */ | ||||
| if (op && (prop = RNA_struct_find_property(op->ptr, "use_proportional_edit"))) { | if (op && (prop = RNA_struct_find_property(op->ptr, "use_proportional_edit"))) { | ||||
| if (RNA_property_is_set(op->ptr, prop)) { | if (RNA_property_is_set(op->ptr, prop)) { | ||||
| int proportional = PROP_EDIT_USE; | int proportional = 0; | ||||
| if (RNA_boolean_get(op->ptr, "use_proportional_edit")) { | |||||
| proportional |= PROP_EDIT_USE; | |||||
| if (RNA_boolean_get(op->ptr, "use_proportional_connected")) { | if (RNA_boolean_get(op->ptr, "use_proportional_connected")) { | ||||
| proportional |= PROP_EDIT_CONNECTED; | proportional |= PROP_EDIT_CONNECTED; | ||||
| } | } | ||||
| if (RNA_boolean_get(op->ptr, "use_proportional_projected")) { | if (RNA_boolean_get(op->ptr, "use_proportional_projected")) { | ||||
| proportional |= PROP_EDIT_PROJECTED; | proportional |= PROP_EDIT_PROJECTED; | ||||
| } | } | ||||
| } | |||||
| t->flag |= initTransInfo_edit_pet_to_flag(proportional); | t->flag |= initTransInfo_edit_pet_to_flag(proportional); | ||||
| } | } | ||||
| else { | else { | ||||
| /* use settings from scene only if modal */ | /* use settings from scene only if modal */ | ||||
| if (t->flag & T_MODAL) { | if (t->flag & T_MODAL) { | ||||
| if ((t->options & CTX_NO_PET) == 0) { | if ((t->options & CTX_NO_PET) == 0) { | ||||
| if (t->spacetype == SPACE_GRAPH) { | if (t->spacetype == SPACE_GRAPH) { | ||||
| t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_fcurve); | t->flag |= initTransInfo_edit_pet_to_flag(ts->proportional_fcurve); | ||||
| ▲ Show 20 Lines • Show All 819 Lines • Show Last 20 Lines | |||||