Age | Commit message (Collapse) | Author |
|
Issue was caused by couple of circumstances:
- Normal Map node requires tesselated faces to compute tangent space
- All temporary meshes needed for Cycles export were adding to G.main
- Undo pushes would temporary set meshes tessfaces to NULL
- Moving node will cause undo push and tree re-evaluate fr preview
All this leads to threading conflict between preview render and undo
system.
Solved it in way that all temporary meshes are adding to that exact
Main which was passed to Cycles via BlendData. This required couple
of mechanic changes like adding extra parameter to *_add() functions
and adding some *_ex() functions to make it possible RNA adds objects
to Main passed to new() RNA function.
This was tricky to pass Main to RNA function and IMO that's not so
nice to pass main to function, so ended up with such decision:
- Object.to_mesh() will add temp mesh to G.main
- Added Main.meshes.new_from_object() which does the same as to_mesh,
but adds temporary mesh to specified Main.
So now all temporary meshes needed for preview render would be added
to preview_main which does not conflict with undo pushes.
Viewport render shall not be an issue because object sync happens from
main thread in this case.
It could be some issues with final render, but that's not so much
likely to happen, so shall be fine.
Thanks to Brecht for review!
|
|
It was caused by own mistake by not noticing externtex is used not
only by render engine. Now this function uses pool passed as argument
rather than using R.pool.
|
|
to draw with procedural textures on surface of object. 2D painting will
still paint as if tiled.
When we unify the paint systems, the texture sampling functions will
need to be changed. Sculpt uses a slightly different system that passes
both screen and 3d coordinates to the sampling function. This commit
however is not too disrupting for that however so it can go in now.
|
|
Separate 2D painting functions away from brush.c, which should implement
the brush API and into its own file, paint_2D.c.
Ideally projective texturing and 2D painting should be totally separate,
however functionality is still interleaved mostly in the
BKE_brush_painter_paint function. The functionality of this function can
possibly be done using the brush stroke functions instead.
|
|
|
|
|
|
version check.
Fix #31209: weight paint sample & fill not using correct brush/unified value.
|
|
Patch from Jaggz H, thanks!
[#31096] Weight-painting: Brush-specific weights
http://projects.blender.org/tracker/?func=detail&atid=127&aid=31096&group_id=9
Each brush's weight can now be set individually, can also enable
unified setting (same as size and strength have.)
Added readfile code to the patch: subversion bumped to 1, brushes get
default weight of 0.5, unified weight enabled by default and value
from old vgroup_weight field.
|
|
added some missing functions too - which are not used yep but should be there for api completeness.
* CDDM_set_mloop
* CDDM_set_mpoly
* BLI_mempool_count
|
|
where the values are unchanged.
|
|
without the underscores these clogged up the namespace for autocompleation which was annoying.
|
|
Things like brush size and strength accessors now take a scene
parameter rather than guessing about which Scene's unified paint
settings to use.
Setting the size/strength through RNA can now be done separately for
the brush or the UnifiedPaintSettings.
The UI python code required updating to check whether the
size/strength controls should use brush or UnifiedPaintSettings RNA.
Radial control also required some updates to switch between the two
RNA sources.
|
|
brushes were doing curve lookups within this macro for example.
|
|
Added RNA for the unified paint setting flags that matches the Brush
RNA. Fixed the getter/setter functions to avoid guessing which Scene's
UnifiedPaintSetting to use. The getter functions take a Scene pointer
now, the setter functions are removed in favor of a more explicit
approach through RNA:
Rather than RNA choosing whether a property's value is in the Brush or
in the UnifiedPaintSettings, there are now explicit properties for
both. The UI code has been modified accordingly to switch the toggle
buttons between affecting the Brush and the UnifiedPaintSettings.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
This fix also allows for partial update of the image, speeding up painting.
The different code path implemented will be used to upload high resolution images to OpenGL when onion branch is merged.
Due to conversion of float textures to/from sRGB, corrections made to brush color sampling to take account of the image profile. This is not 100% correct yet as texture images used for projection painting strokes are not converted to/from sRGB yet(This has been decided due to loss of precision for 8-bit formats). It will have to do for now, though.
last-minute update, exr image loading is broken, will fix asap
|
|
Patch to make the radial control more generic with RNA. Patch was
reviewed here: http://codereview.appspot.com/4280080/
Prior to this update, the radial control code in trunk had generic
parts of the radial control implemented as an incomplete operator
within WM. Then each different user of the radial control had to
implement a separate operator to actually pass in specific brush data
-- e.g. sculpt's brush size, vpaint's brush size, etc.
This patch removes all the extra operators and makes the WM operator
do everything. It now takes several RNA path strings as its properties
-- the only required property is data_path, which specifies the data
to be modified by the radial control. The other paths affect display
in various ways, e.g. rotation, color, etc.
In addition to decreasing some duplicate paint brush code, these
updates make it pretty easy to enable radial control for other
purposes (and it can be set up entirely though python or keymaps, no
extra C code needed.)
|
|
|
|
- rename rna collection structs Main prefix to BlendData: eg, MainObjects --> BlendDataObjects
- printing python collection now prints its type (when available)
- renamed shadowed vars in bpy_rna.c.
- when making functions static I also made debugging/test functions static, reverse and add definitions to headers instead.
|
|
More cleanups: moved a function declaration to the correct module,
removed old/incorrect comments, marked more things with TODO where
appropriate, refactored copy-pasted function, de-duplicated code.
|
|
|
|
also changed displace modifier not to link object depgraph when not using object texturespace.
|
|
- remove brush array for each Paint struct, just use a single brush pointer.
- removed rna function based template filtering.
- filter brushes using a flag on the brush and the pointer poll function.
- set the brushes using a new operator WM_OT_context_set_id().
TODO
- remake startup.blend, currently brush groupings are lost.
- rewrite WM_OT_context_set_id() to use rna introspection.
|
|
Added a brush reset operator so that a user won't need to reload the default blend to get back default brush settings
* New brush.reset operator, resets a brush based on the currently-selected tool
* Added UI button in the tools panel
TODO:
* Only resets sculpt brushes right now, other paint modes should be added
* Sculpt polish tool exists only as a Brush, not as a tool; I'd suggest we make it a tool so it can be reset to defaults too
|
|
* Fix: unify strength and size did work consistently with other paint modes
* Fix: If [ and ] keys were used to resize a brush it was not possible to increase the size of the brush if it went under 10 pixels
* Fix: Made interpretation of brush size consistent across all modes, Texture/Image paint interpreted brush size as the diameter while all the other modes interpret it as radius
* Fix: The default spacing for vertex paint brushes was 3%, should be 10%
* Fix: due to fixes to unified strength, re-enabled 'Unify Size' by default
* Fix: Unified size and strength were stored in UserPrefs, moved this to ToolSettings
* Fix: The setting of pressure sensitivity was not unified when strength or size were unified. Now the appropriate pressure sensitivity setting is also unified across all brushes when corresponding unification option is selected
* Fix: When using [ and ] to resize the brush it didn't immediately redraw
* Fix: fkey resizing/"re-strength-ing" was not working consistently accross all paint modes due to only sculpt mode having full support for unified size and strength, now it works properly.
* Fix: other paint modes did expose the ability to have a custom brush colors, so I added the small bit of code to allow it. Note: I made all of the other paint mode brushes white. Note2: Actually, probably want to make the paint modes use the selected color for painting instead of a constant brush color.
* I had removed OPTYPE_REGISTER from some Sculpt/Paint operators but in this commit I add them back. I'm not completely sure what this option does so I don't want to disturb it for now.
|
|
* Default icons can be selected from a menu
* Option to make a custom icon from a file is present but the UI is disabled because of a mysterious crash
* New startup.blend that has the appropriate icons selected
|
|
external file
* First, try to load the file from the given filename. This is either absolute or relative to the current .blend
* If file is found using the given filename directly then look for the file in the datafiles/brushicons directory (local, user, or system).
* Note: This commit does not update the .blend to reference the default icons
* Note: This commit does not make sure that the build system copies the default icons to the 2.52/datafiles/brushicons directory
|
|
https://svn.blender.org/svnroot/bf-blender/branches/soc-2010-jwilkins
See log of that branch for details.
|
|
|
|
It is now possible to make Grease Pencil Layers to keep displaying and editing the current sketch-frame with this option. This allows to draw a frame which contains markings made for different times (i.e. a spacing/timing chart that you can keep adding to as you scrub to different points on the timeline).
Use the clipboard/camera toggle (the one beside the visibility toggle) to enable. This should get an icon of its own at some point...
|
|
also moved brush curve presets code into curvemapping code.
|
|
can have positive and negative values.
|
|
|
|
gave ugly center area of 100% opacity)
|
|
* Converted vertex paint and weight paint to use the new Paint type
|
|
* Added a new Paint type in scene DNA. This is now the base struct for Sculpt.
* The Paint type contains a list of Brushes, you can add or remove these much like material and texture slots.
* Modified the UI for the new Paint type, now shows the list of brushes active for this mode
* Added a New Brush operator, shows in the UI as a list of brush tool types to add
* Made the sculpt tool property UI smaller and not expanded, expectation is that we will have a number of preset brushes that will cover the basic sculpt brush types
TODO:
* Vertex paint, weight paint, texture paint need to be converted to this system next
* Add brush presets to the default blend
|
|
they too work with the brush panel.
Note: these modes are only using color/alpha/size from Brush, so there's more integration work todo yet.
|
|
* bugfix: for older files, initialize the brush curve on file load
|
|
add to other modes.
|
|
* Removed texfade, wasn't a very useful option (same result can be created with the falloff curve)
* Removed CurveMapping from sculptdata, moved instead to Brush
* Removed rake field from sculptdata, moved to Brush.flag
* Moved Anchored flag from sculpt to Brush, same for direction field
* Removed BrushData, replaced usages with the regular Brush type
* Removed hardcoded brushes and brush_type from sculptdata, replaced with a pointer to the current Brush
* Made sculpt tool type settable in Brush
* Changed symmetry and axis lock fields to flags
|
|
-r17434:HEAD
|
|
blocks that were previously missed; and b) greatly increase my
ohloh stats!
|
|
button, while it should be.
|
|
falloff and spacing. Click the button labeled "P" next to the sliders.
Works best for opacity, other options can give poor quality strokes in
some cases. Also performance needs to be improved.
Remember, works only on X11 and Mac, no Windows support for tablets yet.
|
|
exception of the clone tool.
One level undo for image- and texturepaint, only storing those tiles
that changed.
Test to improve texturepaint performance using glTexSubImage2D, only
enabled with 2^n sized textures and mipmapping off. Painting a 2048x2048
texture is then pretty smooth here, as long as the geometry is not too
complex.
|
|
- ImagePaint now uses ImBuf directly, and the rect blending functions
were moved into the imbuf module.
- The brush spacing, timing and sampling was abstracted into brush.c, for
later reuse in other paint modes.
Float ImagePaint support.
Textured Brushes:
- Only the first texture channel is used now.
- Options for size and offset should be added, but need to find some space
in the panel, or add a second one ..
|
|
- Added a new Brush datablock, only used by image paint, but intended
to be used in texture paint, vertex paint, weight paint and sculpt
mode also.
- Being a datablock, these brushes can be saved, appended and linked.
They have a fake user by default, to make sure they are saved even if
not selected.
Image Painting:
- Replaced the img module with C code in imagepaint.c
- Airbrush is no longer a separate tool, but rather an option that can
be used for soften, smear and clone also.
- Blend modes mix, add, subtract, multiply, darken and lighten have been
added, code taken directly from vertex paint.
Note to project files maintainers:
- The img module was removed from SCons and Makefiles, and this should
be done in other build systems also. I'll wait to remove the module
from cvs, to not break compilation.
|