Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/paint_image_proj.c
| Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_context.h" | #include "BKE_context.h" | ||||
| #include "BKE_colortools.h" | #include "BKE_colortools.h" | ||||
| #include "BKE_depsgraph.h" | #include "BKE_depsgraph.h" | ||||
| #include "BKE_DerivedMesh.h" | #include "BKE_DerivedMesh.h" | ||||
| #include "BKE_idprop.h" | #include "BKE_idprop.h" | ||||
| #include "BKE_brush.h" | #include "BKE_brush.h" | ||||
| #include "BKE_image.h" | #include "BKE_image.h" | ||||
| #include "BKE_library.h" | #include "BKE_library.h" | ||||
| #include "BKE_localview.h" | |||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_material.h" | #include "BKE_material.h" | ||||
| #include "BKE_mesh.h" | #include "BKE_mesh.h" | ||||
| #include "BKE_mesh_mapping.h" | #include "BKE_mesh_mapping.h" | ||||
| #include "BKE_node.h" | #include "BKE_node.h" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| ▲ Show 20 Lines • Show All 5,088 Lines • ▼ Show 20 Lines | if (ps_handle->symmetry_flags) { | ||||
| BLI_assert(index == ps_handle->ps_views_tot); | BLI_assert(index == ps_handle->ps_views_tot); | ||||
| } | } | ||||
| for (i = 0; i < ps_handle->ps_views_tot; i++) { | for (i = 0; i < ps_handle->ps_views_tot; i++) { | ||||
| ProjPaintState *ps = ps_handle->ps_views[i]; | ProjPaintState *ps = ps_handle->ps_views[i]; | ||||
| project_state_init(C, ob, ps, mode); | project_state_init(C, ob, ps, mode); | ||||
| if (ps->ob == NULL || !(ps->ob->lay & ps->v3d->lay)) { | if ((ps->ob == NULL) || | ||||
| !(ps->ob->lay & ps->v3d->lay) || | |||||
| !BKE_localview_is_object_visible(ps->v3d, ps->ob)) | |||||
| { | |||||
brecht: Convention is to not put `{` on a new line as far as I know, multiple places in the patch do… | |||||
Not Done Inline ActionsThis is actually correct style, we put { on next line in case of multi-line if/for/etc. statement (https://wiki.blender.org/index.php/Dev:Doc/Code_Style#Exceptions_to_Braces_on_Same_Line). mont29: This is actually correct style, we put `{` on next line in case of multi-line if/for/etc. | |||||
| ps_handle->ps_views_tot = i + 1; | ps_handle->ps_views_tot = i + 1; | ||||
| goto fail; | goto fail; | ||||
| } | } | ||||
| } | } | ||||
| /* Don't allow brush size below 2 */ | /* Don't allow brush size below 2 */ | ||||
| if (BKE_brush_size_get(scene, ps_handle->brush) < 2) | if (BKE_brush_size_get(scene, ps_handle->brush) < 2) | ||||
| BKE_brush_size_set(scene, ps_handle->brush, 2 * U.pixelsize); | BKE_brush_size_set(scene, ps_handle->brush, 2 * U.pixelsize); | ||||
| ▲ Show 20 Lines • Show All 733 Lines • Show Last 20 Lines | |||||
Convention is to not put { on a new line as far as I know, multiple places in the patch do not do this.