Results 1 to 6 of 6
  1. #1

    *Major Release 2.0* Join or group objects by wildcard or regex!

    Hey blenderartists,
    this is my first add-on, it's for blender 2.64+ but should work for 2.5+ and be quite easy to maintain in future.

    It's all about joining or grouping all those objects which match a certain pattern.
    It's been developed for the Direct-AutoCAD-IntelliCAD-To-Blender-Exporter-Using-LISP of 1D_inc but it may be used for any kind of stuff. If there is already such a functionality in blender, please tell us.

    Now, have fun.

    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    . RELEASES
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Here are the releases (newest uppermost):
    Version 2.0: object_265_join_or_group_by_pattern_v2.zip
    I've used 1D_inc's detection of the broken version 1.1, fixed all those bugs which seemed to be Windows related as I didn't get any of those on GNU systems, and added a lot new and fancy functionality.
    Now you can use:
    • Influence constraints (join or group within selected objects only)
    • Full RegEx support! (as I realized that my for 1D_inc predefined Wildcards did result in 2 instead of 1 objects) This option will be default since this major release 2.0.


    Version 1.1: Attachment 204026 (not possible to activate the addon *fixed*, don't use v1.1.py as ending ... took some time to figure that out :/, some minor improvements as automatic settings integrity maintaining, debug mode turned off per default to increase performance and as this v11 is a production release - and last but not least: auto-detection of when to stop, i.e. the script is now capable of seeing that there will be no more to join in expand mode and terminates itself far before(!) the e.g. default end of 999 loops is reached - which boosts speed incredibly)

    Version 1: Attachment 203986 (joining, grouping, auto-tidyup-refactoring, auto-expansion, a-e-influence)

    Version Beta: Attachment 203725 (joining/auto-tidyup-refactoring only)

    blender_python_object_264_addon_join_or_group_by_pattern_panel.jpg


    Where to find the settings?
    Once installed, you should find the settings under Tool-shelf (T) of the 3DView above the last operator panel. Scroll way down (it's probably the lowest panel).



    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    . FEATURES
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Features:
    • Joining multiple element matching your selection pattern (wildcards/regular expression).
    • Grouping is now fully supported.
    • Auto-Expansion for joining/grouping multiple objects in parallel. Just place a '#' where you want to expand.
      For example: to join PREFIX_LAYER0_SUBCRITERIA.xxx (notice the 0, x any numbers) and PREFIX_LAYER1_SUBCRITERIA.yyy (notice the 1, y any numbers, 000 - 999) simultaneously to two seperate resulting objects, just use the pattern "PREFIX_LAYER#_SUBCRITERIA([.][0-9]*)?$" (without the quote chars, notice the #, it expands the regex pattern at this point to 1, 2, 3, 4, ... just as far as you specify in the "Max value").]
    • This (Auto-Expansion) is the most powerful feature and is exactly what 1D_inc and all blenderartists that use his addon need. It tidies up your scene, makes it easier to handle.
    • You can even specify the range of the expansion. Hence you can join half the objects (from LAY000 to LAY500) and group the other half (LAY501 to LAY999) if desired.
    • Tidyup names (kind of collapse to the base/prefix, working to 99 percent).
    • Choose between Wildcards or Regular Expression as pattern type. (note, the syntax is slightly different)
    • Specify an influence constraint. In other words, limit the operation to selected objects only.

    The auto-expansion was most of the work as I realized lateron - finally the addon now has reached around 1000 lines. However one can produce such a big program for such a simple task - I don't know.




    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    . HOW TO USE
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Usage:
    • Choose whether to join or[i] group[i].
    • Change the default pattern to whatever objects you wish to select.
    • Use "*" without the quote chars for joining all objects in the current Scene blindly.
    • You can use all unix wildcards or real regular expressions you can think of.
    • Now decide whether to tidy up the resulting names a bit. (cutting a possible tailing-number .001, .002, .003, ... off)
    • And make it happen according to your settings. : -)




    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    . EXAMPLES
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Example of usage:
    You have one thousand and one faeries (objects) floating in your scene. You duplicated them all individually or by an array modifier which you applied.
    The name of the originally created object mesh was "faerie".
    Thus you now have faerie, faerie.001, faerie.002, faerie.003, ... faerie.999. Eventual you even have another faerie.000 in your scene, too.
    Now you wish to join them to one single faerie cloud object called faerie and not faerie.313 or any other longer name repectively. (Therefore keep tidyup names enabled.)
    So you use the addon as follows:
    • Choose join. (already chosen by default)
    • Type in the pattern "faerie[.][0-9]*" or "faerie\.[0-9]*".
    • Keep Tidy-up enabled.
    • Get it done by running the script ("Join ...").
    joingroupbypattern_present_faieries.png


    Currently under investigation:
    How to deal with mesh and curve objects wildly mixed. Convert others to mesh. *done*
    How to offer constraints to affect only selected objects. *done*
    Possibility to select join or group by real regular expressions. *done*



    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    . LIMITATIONS
    +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
    Limitations
    If a group already exists, it is not checked if the content of newly created one will be the same.




    Thank you very much for making blender what it is ... brilliant.
    Hope this add-on helps someone and you like it.

    Jon Ardaron
    Last edited by faerietree; 20-Feb-13 at 20:48.



  2. #2
    Minor Update Review

    Approximately one month before the western countries' new year, this can be seen as finished. It's now been tested extensively. It feels like hundreds of major functionality bugs were resolved and as much as possible so far was automated.

    The newest addition is that now you can activate the addon/app as usual via CTRL+ALT+U (Settings) -> ADD-ONs -> Searching for e.g. "join" or "group" or "pattern", whatever you can type more quickly. (-:

    These are two sites that might help with unix wildcards:
    http://docstore.mik.ua/orelly/unix/upt/ch15_02.htm
    http://linux.about.com/od/lts_guide/a/gdelts66t00.htm
    Just experiment a bit with it - once you are familiar with it you will see how mighty this is for tidying up your scene.

    Hope, you like it and it's useful.
    Feel free to ask any upcoming questions.

    Jon Ardaron
    Last edited by faerietree; 24-Nov-12 at 20:57.



  3. #3
    Member 1D_Inc's Avatar
    Join Date
    Mar 2012
    Location
    Russia
    Posts
    774
    Oh, hello there =)
    I'm so sorry about that awful delay, but it were a very hard kind of work done.
    http://blenderartists.org/forum/show...July-18/page30

    As I've understood - your tool is universal layer merger... That's so great!
    But I can't to get how does it works, can you help me to clean up file like this?
    Thank you very much! And once again - sorry..
    Attached Files Attached Files



  4. #4
    Hey, no problem. The result of your Barock modeling is outstanding - and so is your effort to share and explain how to create something like this .. Thanks for that. Unfortunately this is left for talented people like you. All the nice ornamentations ... god bless you.

    Thought the site was off, but now I managed to download the .blend. Will have a look at it. Could take some time. Have to setup some things, have almost missed the latest blender release ... am taken up more by a thought-to-be-easy new robotic system than I like. Feels like the time needed being remapped like in blender 1:5. ^_^ thinking in blender terms ... dreaming of blender ... should use it in the robot, but that's another topic ...

    blender is worth more than a gem. I like our community. (btw spider script - like the name : ) Keep up all the good artwork. It's so beautiful!


    EDIT: SCRIPT WAS BROKEN IN 2.65! (Or did I upload a broken version? Will investigate it ...) I found a bug that could not be in the final release so I believe there is something wrong with the versioning. Another hint to that is that debug seemed to be turned on - impossible because I am sure I turned it off. Have to look for the development files. Okay it can't be the final release version! Version v11 is somewhat not v11, my fault - and a really annoying one too.


    @1D_inc: It's really simple in your case, just keep the default values - choose join and the LAYers should be arranged properly. (because I wrote the script for you, the pattern is already set up according to your spec - the only value to adopt for a speed up was the Expand-End: 999 --> 10 or how many LAYers you have. but it's optional, it's already quick enough and more flexible with 999 I think.)
    Last edited by faerietree; 20-Feb-13 at 20:50.
    Repositories -- Build the enterprise, World development aid, Educational time machine
    Gather, link all addons -- Ext: Render2Print, Ext: Selection2BOM, Ext: Wildcard Join/group, Ext: Fastener Generator



  5. #5
    Major Update

    Version 2.0 now offers true regular expressions for much more powerful joining grouping or selecting.
    Also new is the constraint, kind of an influence restriction to affect initially selected objects only. So first select the objects to affect (for example with a regex). Then type in a pattern and let the add-on join or group within the selection.


    Bug Issues
    Okay, we discovered a windows related Bug in Blender, which I still did not get around to report. Anyway, thanks 1D_inc and RickyBlender for your hints to make me get behind the strange behaviour of selection in Blender for Windows. Thank you again.

    What I mean is the bug that an active object gets not unselected after reselecting (it's on windows only as I realized after seeing that some code seemed to work for bashi, but the same did give an error to RickyBlender - the same error I faced in the v1.1 release of this add-on). In addition 1D_inc uses AutoCAD, hence Windows, thus that's the reason for his posting (see above) from which I see that it did not work for him, too.

    What do you think, can you validate this bug? (Open a .blend, select an object, type A and see what happens. At least for un-selecting via python the active object gets not reset.)


    Happy Joining and Grouping,
    tell me if you need a further guide or if you discover bugs.

    Jon Ardaron
    Last edited by faerietree; 11-Jan-13 at 23:22.
    Repositories -- Build the enterprise, World development aid, Educational time machine
    Gather, link all addons -- Ext: Render2Print, Ext: Selection2BOM, Ext: Wildcard Join/group, Ext: Fastener Generator



  6. #6
    Just discovered this project who seems to be useful for me. I will take a deeper look at it ASAP.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •