Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1060)

Issue 5529077: Small cleanup of unified paint settings (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by nicholasbishop
Modified:
12 years, 1 month ago
Reviewers:
brechtvl, bf-codereview
Base URL:
https://svn.blender.org/svnroot/bf-blender/trunk/blender/
Visibility:
Public.

Description

Small cleanup of unified paint settings This patch moves the sculpt/paint unified fields out of ToolSettings and into their own struct, UnifiedPaintSettings. This adds a bit of extra readfile code and such, but its cleaner elsewhere, and avoids cluttering ToolSettings further if more unified paint settings are added. This change is supposed to be backwards-compatible, but I could use some review to make sure I'm doing that correctly. In particular: * File subversion is bumped, and readfile.c gets a new block to move the data over to the new struct. I moved code from the "put here until next version bump" block into the same subversion check. * Added RNA for the new struct, and added get/set functions for the old unified flag properties so that they still work. Also marked the old unified flag properties' UI text/description with "Deprecated"... not sure if this is correct procedure though. As already noted in brush.c by Campbell, many of the brush getter/setter functions are doing an ugly (and incorrect) thing with looping through scenes, rather than directly passing a scene in -- I intend to address that next in a separate patch, wanted to get this cleanup out of the way first.

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+166 lines, -41 lines) Patch
release/scripts/startup/bl_ui/space_view3d_toolbar.py View 7 chunks +13 lines, -14 lines 0 comments Download
source/blender/blenkernel/BKE_blender.h View 1 chunk +1 line, -1 line 0 comments Download
source/blender/blenkernel/intern/brush.c View 8 chunks +9 lines, -9 lines 0 comments Download
source/blender/blenloader/intern/readfile.c View 2 chunks +19 lines, -1 line 0 comments Download
source/blender/makesdna/DNA_scene_types.h View 3 chunks +41 lines, -11 lines 0 comments Download
source/blender/makesrna/intern/rna_scene.c View 4 chunks +83 lines, -5 lines 1 comment Download

Messages

Total messages: 3
nicholasbishop
12 years, 3 months ago (2012-01-12 09:13:34 UTC) #1
brechtvl
Looks ok, one comment. http://codereview.appspot.com/5529077/diff/1/source/blender/makesrna/intern/rna_scene.c File source/blender/makesrna/intern/rna_scene.c (right): http://codereview.appspot.com/5529077/diff/1/source/blender/makesrna/intern/rna_scene.c#newcode1656 source/blender/makesrna/intern/rna_scene.c:1656: RNA_def_property_ui_text(prop, "Sculpt/Paint Use Unified Radius ...
12 years, 3 months ago (2012-01-12 15:00:57 UTC) #2
nicholasbishop
12 years, 3 months ago (2012-01-12 17:23:37 UTC) #3
Thanks, committed sans deprecated RNA props.

On 2012/01/12 15:00:57, brechtvl wrote:
> Looks ok, one comment.
> 
>
http://codereview.appspot.com/5529077/diff/1/source/blender/makesrna/intern/r...
> File source/blender/makesrna/intern/rna_scene.c (right):
> 
>
http://codereview.appspot.com/5529077/diff/1/source/blender/makesrna/intern/r...
> source/blender/makesrna/intern/rna_scene.c:1656:
RNA_def_property_ui_text(prop,
> "Sculpt/Paint Use Unified Radius (Deprecated)",
> The manual get/set functions aren't really needed, passing
> "unified_paint_settings.flag" to RNA should work.
> 
> However I don't think deprecated RNA properties need to be kept around this
way,
> especially ones that are unlikely to be used much in scripts, can just remove
> them.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b