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>2018-06-04 10:31:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-04 10:31:30 +0300
commit44505b38df557a5711703613685a1dec9fc2c3d9 (patch)
tree3f05bebcc7bfadf56569f2dcca7f95fc56b1b0d0 /source/blender/editors/screen/screen_context.c
parent6654e109df952be3a3128fae2508a02c196ae593 (diff)
Cleanup: strip trailing space in editors
Diffstat (limited to 'source/blender/editors/screen/screen_context.c')
-rw-r--r--source/blender/editors/screen/screen_context.c64
1 files changed, 32 insertions, 32 deletions
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index fed8449d9a2..b90430f27e2 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -86,7 +86,7 @@ const char *screen_context_dir[] = {
"sequences", "selected_sequences", "selected_editable_sequences", /* sequencer */
"gpencil_data", "gpencil_data_owner", /* grease pencil data */
"visible_gpencil_layers", "editable_gpencil_layers", "editable_gpencil_strokes",
- "active_gpencil_layer", "active_gpencil_frame", "active_gpencil_palette",
+ "active_gpencil_layer", "active_gpencil_frame", "active_gpencil_palette",
"active_gpencil_palettecolor", "active_gpencil_brush",
"active_operator", "selected_editable_fcurves",
NULL};
@@ -185,7 +185,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "editable_objects") || CTX_data_equals(member, "editable_bases")) {
const unsigned int lay = context_layers(sc, scene, sa);
const bool editable_objects = CTX_data_equals(member, "editable_objects");
-
+
/* Visible + Editable, but not necessarily selected */
for (base = scene->base.first; base; base = base->next) {
if (((base->object->restrictflag & OB_RESTRICT_VIEW) == 0) && (base->lay & lay)) {
@@ -204,7 +204,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
bArmature *arm = (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
EditBone *ebone, *flipbone = NULL;
const bool editable_bones = CTX_data_equals(member, "editable_bones");
-
+
if (arm && arm->edbo) {
/* Attention: X-Axis Mirroring is also handled here... */
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
@@ -212,19 +212,19 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
if (EBONE_VISIBLE(arm, ebone)) {
/* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled
* so that most users of this data don't need to explicitly check for it themselves.
- *
+ *
* We need to make sure that these mirrored copies are not selected, otherwise some
* bones will be operated on twice.
*/
if (arm->flag & ARM_MIRROR_EDIT)
flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
-
+
/* if we're filtering for editable too, use the check for that instead, as it has selection check too */
if (editable_bones) {
/* only selected + editable */
if (EBONE_EDITABLE(ebone)) {
CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone);
-
+
if ((flipbone) && !(flipbone->flag & BONE_SELECTED))
CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone);
}
@@ -232,7 +232,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else {
/* only include bones if visible */
CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone);
-
+
if ((flipbone) && EBONE_VISIBLE(arm, flipbone) == 0)
CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone);
}
@@ -246,7 +246,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
bArmature *arm = (obedit && obedit->type == OB_ARMATURE) ? obedit->data : NULL;
EditBone *ebone, *flipbone = NULL;
const bool selected_editable_bones = CTX_data_equals(member, "selected_editable_bones");
-
+
if (arm && arm->edbo) {
/* Attention: X-Axis Mirroring is also handled here... */
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
@@ -254,19 +254,19 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
if (EBONE_VISIBLE(arm, ebone) && (ebone->flag & BONE_SELECTED)) {
/* Get 'x-axis mirror equivalent' bone if the X-Axis Mirroring option is enabled
* so that most users of this data don't need to explicitly check for it themselves.
- *
+ *
* We need to make sure that these mirrored copies are not selected, otherwise some
* bones will be operated on twice.
*/
if (arm->flag & ARM_MIRROR_EDIT)
flipbone = ED_armature_ebone_get_mirrored(arm->edbo, ebone);
-
+
/* if we're filtering for editable too, use the check for that instead, as it has selection check too */
if (selected_editable_bones) {
/* only selected + editable */
if (EBONE_EDITABLE(ebone)) {
CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone);
-
+
if ((flipbone) && !(flipbone->flag & BONE_SELECTED))
CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone);
}
@@ -274,7 +274,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else {
/* only include bones if selected */
CTX_data_list_add(result, &arm->id, &RNA_EditBone, ebone);
-
+
if ((flipbone) && !(flipbone->flag & BONE_SELECTED))
CTX_data_list_add(result, &arm->id, &RNA_EditBone, flipbone);
}
@@ -288,7 +288,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
Object *obpose = BKE_object_pose_armature_get(obact);
bArmature *arm = (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
-
+
if (obpose && obpose->pose && arm) {
for (pchan = obpose->pose->chanbase.first; pchan; pchan = pchan->next) {
/* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */
@@ -304,7 +304,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
Object *obpose = BKE_object_pose_armature_get(obact);
bArmature *arm = (obpose) ? obpose->data : NULL;
bPoseChannel *pchan;
-
+
if (obpose && obpose->pose && arm) {
for (pchan = obpose->pose->chanbase.first; pchan; pchan = pchan->next) {
/* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */
@@ -337,7 +337,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "active_pose_bone")) {
bPoseChannel *pchan;
Object *obpose = BKE_object_pose_armature_get(obact);
-
+
pchan = BKE_pose_channel_active(obpose);
if (pchan) {
CTX_data_pointer_set(result, &obpose->id, &RNA_PoseBone, pchan);
@@ -366,7 +366,7 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
/* convenience for now, 1 object per scene in editmode */
if (obedit)
CTX_data_id_pointer_set(result, &obedit->id);
-
+
return 1;
}
else if (CTX_data_equals(member, "sculpt_object")) {
@@ -438,11 +438,11 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
else if (CTX_data_equals(member, "gpencil_data")) {
/* FIXME: for some reason, CTX_data_active_object(C) returns NULL when called from these situations
- * (as outlined above - see Campbell's #ifdefs). That causes the get_active function to fail when
+ * (as outlined above - see Campbell's #ifdefs). That causes the get_active function to fail when
* called from context. For that reason, we end up using an alternative where we pass everything in!
*/
bGPdata *gpd = ED_gpencil_data_get_active_direct((ID *)sc, scene, sa, obact);
-
+
if (gpd) {
CTX_data_id_pointer_set(result, &gpd->id);
return 1;
@@ -450,14 +450,14 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
}
else if (CTX_data_equals(member, "gpencil_data_owner")) {
/* pointer to which data/datablock owns the reference to the Grease Pencil data being used (as gpencil_data)
- * XXX: see comment for gpencil_data case...
+ * XXX: see comment for gpencil_data case...
*/
bGPdata **gpd_ptr = NULL;
PointerRNA ptr;
-
+
/* get pointer to Grease Pencil Data */
gpd_ptr = ED_gpencil_data_get_pointers_direct((ID *)sc, scene, sa, obact, &ptr);
-
+
if (gpd_ptr) {
CTX_data_pointer_set(result, ptr.id.data, ptr.type, ptr.data);
return 1;
@@ -466,10 +466,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "active_gpencil_layer")) {
/* XXX: see comment for gpencil_data case... */
bGPdata *gpd = ED_gpencil_data_get_active_direct((ID *)sc, scene, sa, obact);
-
+
if (gpd) {
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
-
+
if (gpl) {
CTX_data_pointer_set(result, &gpd->id, &RNA_GPencilLayer, gpl);
return 1;
@@ -517,10 +517,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "active_gpencil_frame")) {
/* XXX: see comment for gpencil_data case... */
bGPdata *gpd = ED_gpencil_data_get_active_direct((ID *)sc, scene, sa, obact);
-
+
if (gpd) {
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
-
+
if (gpl) {
CTX_data_pointer_set(result, &gpd->id, &RNA_GPencilLayer, gpl->actframe);
return 1;
@@ -530,10 +530,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "visible_gpencil_layers")) {
/* XXX: see comment for gpencil_data case... */
bGPdata *gpd = ED_gpencil_data_get_active_direct((ID *)sc, scene, sa, obact);
-
+
if (gpd) {
bGPDlayer *gpl;
-
+
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
if ((gpl->flag & GP_LAYER_HIDE) == 0) {
CTX_data_list_add(result, &gpd->id, &RNA_GPencilLayer, gpl);
@@ -546,10 +546,10 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "editable_gpencil_layers")) {
/* XXX: see comment for gpencil_data case... */
bGPdata *gpd = ED_gpencil_data_get_active_direct((ID *)sc, scene, sa, obact);
-
+
if (gpd) {
bGPDlayer *gpl;
-
+
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
if (gpencil_layer_is_editable(gpl)) {
CTX_data_list_add(result, &gpd->id, &RNA_GPencilLayer, gpl);
@@ -562,15 +562,15 @@ int ed_screen_context(const bContext *C, const char *member, bContextDataResult
else if (CTX_data_equals(member, "editable_gpencil_strokes")) {
/* XXX: see comment for gpencil_data case... */
bGPdata *gpd = ED_gpencil_data_get_active_direct((ID *)sc, scene, sa, obact);
-
+
if (gpd) {
bGPDlayer *gpl;
-
+
for (gpl = gpd->layers.first; gpl; gpl = gpl->next) {
if (gpencil_layer_is_editable(gpl) && (gpl->actframe)) {
bGPDframe *gpf = gpl->actframe;
bGPDstroke *gps;
-
+
for (gps = gpf->strokes.first; gps; gps = gps->next) {
if (ED_gpencil_stroke_can_use_direct(sa, gps)) {
/* check if the color is editable */