Age | Commit message (Collapse) | Author |
|
handling).
This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing
processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock
was pretty much impossible, except for a few special cases.
Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite
a few ID usages were missed or wrongly handled that way).
One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling
by using library_query utils to allow generic handling of those, which is now the case
(now, generic ID links handling is only "knwon" from readfile.c and library_query.c).
This commit also adds backends to allow live replacement and deletion of datablocks in Blender
(so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one,
or NULL one in case of unlinking).
This will allow nice new features, like ability to easily reload or relocate libraries, real immediate
deletion of datablocks in blender, replacement of one datablock by another, etc.
Some of those are for next commits.
A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core.
Though it was tested rather deeply, being totally impossible to check all possible ID usage cases,
it's likely there are some remaining issues and bugs in new code... Please report them! ;)
Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.
|
|
|
|
Support drag&drop objects to groups in the outliner.
D989 by @lichtwerk
|
|
Added a small menu with a few helper oerators next to each group panel:
* Remove group from all objects
* Select objects in group
More could be added possibly in the future.
Thanks to Campbell for the advice here.
|
|
before entering the recursion check.
Now use group tags instead of object tags, which could be a little more
efficient and was used before this patch too.
|
|
dupligroup objects to another group.
The new recursion check for groups duplicating themselves has to un-set the LIB_DOIT flag after each object, otherwise it will prevent duplicating a (non-recursive) group multiple times.
|
|
rB568f0c7 added a recursion check that is supposed to prevent cyclic
cases where a group includes itself via dupli instancing.
The check function was descending into all groups nested inside the
target group - which works for single level recursion like in the test
case, but does not handle generic recursion. Basically it asked:
"is object X in the group already or in any instanced dupligroup?"
The new check instead asks:
"is group G dupli'd by X or any instanced subgroup thereof?"
which is what we really need to know.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Add Selected to Active Group presented a menu with groups to choose from, while
this seemingly inverse operation did not and used all groups of the active
object.
Now both operators present a menu, with as first option "All Groups".
|
|
update some descriptions, others were removed and operators tagged as internal.
add a script to detect duplicate operator descriptions.
|
|
correctly
when the group contained two objects duplicating the same group. Also added the
dependency check to the "add to active group" operator now for consistency.
|
|
Couple of issues here:
- User shouldn't be able to run into dupligroup recursion.
It was checking already when setting a group for dupli.
Added check to operator which adds object to group.
- It's still possible files with recursion are hanging around,
so made simplify function robust to such kind of crap.
|
|
also change dump_rna2xml.py to dump bpy.data by default.
|
|
besides performance in some cases.
* DAG_scene_sort is now removed and replaced by DAG_relations_tag_update in
most cases. This will clear the dependency graph, and only rebuild it right
before it's needed again when the scene is re-evaluated.
This is done because DAG_scene_sort is slow when called many times from
python operators. Further the scene argument is not needed because most
operations can potentially affect more than the current scene.
* DAG_scene_relations_update will now rebuild the dependency graph if it's not
there yet, and DAG_scene_relations_rebuild will force a rebuild for the rare
cases that need it.
* Remove various places where ob->recalc was set manually. This should go
through DAG_id_tag_update() in nearly all cases instead since this is now
a fast operation. Also removed DAG_ids_flush_update that goes along with
such manual tagging of ob->recalc.
|
|
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!
|
|
"Add Group" was excluding linked library objects.
|
|
few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()...
|
|
|
|
selected
Some group operators were missing poll() callbacks
|
|
recent commit which made cyclic report not show
|
|
groups to the active more easily.
|
|
|
|
|
|
fault)
|
|
|
|
|
|
About 30 undocumented ops remaining...
|
|
http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros
|
|
|
|
to BLI_array macros.
|
|
for this object
when using "Add Selected to Active Group" operator,
|
|
else if's
|
|
|
|
already used a lot and part of proposed style guide).
|
|
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.
All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.
All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.
Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.
Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
|
|
CTX_data_pointer_get_type(C, "object", &RNA_Object).data
with api call:
ED_object_context(C)
... since getting the context object is such a common operation.
|
|
http://markmail.org/message/fp7ozcywxum3ar7n
|
|
|
|
|
|
|
|
MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
|
|
Fixed old annoyance in Search menu, with a load of object-mode
operators showing up in editmode.
It's much cleaner now, but it will take further work and
investigation to have context & polls work satisfying for all cases.
|
|
|
|
- remove MEM_guardedalloc.h from header files (include directly)
|
|
|