Update Crackit addon for Blender 2.8 #61901

Closed
opened 2019-02-24 06:25:40 +01:00 by Brendon Murphy · 40 comments
Member

Cell fracture has been updated.


hi this task is for the updating of the Cell Fracture Object and Cell Fracture addons from 2.79 to 2.8 series.
After discussion with @Gappy1 in irc he said he was available in March to update both addons.
One consideration we talked about was to add both scripts into one folder and have both available in the UI.
This is not decided yet and will depend on development schedule and usability.
@ideasman42 I'm adding you as a subscriber so you can follow.
Thanks.

*Cell fracture has been updated.* ---- hi this task is for the updating of the Cell Fracture Object and Cell Fracture addons from 2.79 to 2.8 series. After discussion with @Gappy1 in irc he said he was available in March to update both addons. One consideration we talked about was to add both scripts into one folder and have both available in the UI. This is not decided yet and will depend on development schedule and usability. @ideasman42 I'm adding you as a subscriber so you can follow. Thanks.
Nobuyuki Hirakata was assigned by Brendon Murphy 2019-02-24 06:25:40 +01:00
Author
Member

Added subscribers: @Gappy1, @ideasman42, @BrendonMurphy

Added subscribers: @Gappy1, @ideasman42, @BrendonMurphy
Contributor

Added subscriber: @Walles

Added subscriber: @Walles

Sorry late to complete the task.
I am trying to complete the task hastily.

Sorry late to complete the task. I am trying to complete the task hastily.

Added subscriber: @Harvester

Added subscriber: @Harvester

Added subscriber: @CMC

Added subscriber: @CMC

Added subscriber: @Insertzs

Added subscriber: @Insertzs

I updated 2.7 functionalities to 2.8 of cell fracture addon.
Now adding new features for cell fracture, then I will integrate cell fracture addon with crack it addon.
I think it can be achieved in a week, if it goes without unexpected bugs.

I updated 2.7 functionalities to 2.8 of cell fracture addon. Now adding new features for cell fracture, then I will integrate cell fracture addon with crack it addon. I think it can be achieved in a week, if it goes without unexpected bugs.
Author
Member

thanks for touching base in irc. I'm looking forward to the update.

thanks for touching base in irc. I'm looking forward to the update.

I uploaded the independent Fracture cell addon on https://github.com/squarednob/fracture_cell
fracture_cell_new_features1.png

Although It is temporary update, it has full features of fracture cell, and works fine in my testing.

Updated features :
New feature:
You can choose multiple fracture source,s like own verts and annotation.
Added random for fracture source.

Changing in 2.8:
Using annotation pencil , instead of grease pencil.
Mass value for BGE changed into custom property.
Adding fractures in collection, instead of layer.


Now I'm merging some "fracture crackit" functions in the process of "fracture cell".
And integrating UI of "fracture crackit" and "fracture cell".
So I mean, I think crackit's functions can be merge into fracture cell. As a additional operator. And put the execute button below cell fracture button.

If you have time to wait for 4-5 days, I think I can..
Is That OK?
fracture_cell_makecrack1.png

I uploaded the independent Fracture cell addon on https://github.com/squarednob/fracture_cell ![fracture_cell_new_features1.png](https://archive.blender.org/developer/F7106341/fracture_cell_new_features1.png) Although It is temporary update, it has full features of fracture cell, and works fine in my testing. Updated features : New feature: You can choose multiple fracture source,s like own verts and annotation. Added random for fracture source. Changing in 2.8: Using annotation pencil , instead of grease pencil. Mass value for BGE changed into custom property. Adding fractures in collection, instead of layer. ------------------------- Now I'm merging some "fracture crackit" functions in the process of "fracture cell". And integrating UI of "fracture crackit" and "fracture cell". So I mean, I think crackit's functions can be merge into fracture cell. As a additional operator. And put the execute button below cell fracture button. If you have time to wait for 4-5 days, I think I can.. Is That OK? ![fracture_cell_makecrack1.png](https://archive.blender.org/developer/F7106376/fracture_cell_makecrack1.png)
Author
Member

@Gappy1 thanks, it sounds like your doing a wonderful job, of course some more time to finalize will be fine. :)

@Gappy1 thanks, it sounds like your doing a wonderful job, of course some more time to finalize will be fine. :)

https://github.com/squarednob/fracture_cell

Now, Updating fracture cell and integrating crackit is almost finished.

Only one big issue is inconsistency of result, when cell operator or crack operator is used several time.
Reverting also changes mesh from first mesh, even if setting is the same.
I can't understand why, perhaps it happens based on depsgraph?

Anyway, besides the problem, I think this version can be released for 2.8.

I put the latest code in the github link.
Please review and tell me what to do.
I can paste .diff on the page if you need.

New features:
I added crack operator and material operator.
Crack operator should be used after fracture cell.
fracture_cell_crack_new1.png

Also I added "hide original", "move beside original object", and "simplify base mesh" in Cell fracture panel.
"Apply edge split" was changed into "edge split modifier", because it caused bug a lot. And it is hide in default, until "mark sharp edges" is turned on.
fracture_cell_cell_new2.png

https://github.com/squarednob/fracture_cell Now, Updating fracture cell and integrating crackit is almost finished. Only one big issue is inconsistency of result, when cell operator or crack operator is used several time. Reverting also changes mesh from first mesh, even if setting is the same. I can't understand why, perhaps it happens based on depsgraph? Anyway, besides the problem, I think this version can be released for 2.8. I put the latest code in the github link. Please review and tell me what to do. I can paste .diff on the page if you need. **New features**: I added crack operator and material operator. Crack operator should be used after fracture cell. ![fracture_cell_crack_new1.png](https://archive.blender.org/developer/F7553441/fracture_cell_crack_new1.png) Also I added "hide original", "move beside original object", and "simplify base mesh" in Cell fracture panel. "Apply edge split" was changed into "edge split modifier", because it caused bug a lot. And it is hide in default, until "mark sharp edges" is turned on. ![fracture_cell_cell_new2.png](https://archive.blender.org/developer/F7553443/fracture_cell_cell_new2.png)
Author
Member

hi, @Gappy1
Thanks very much for the update.
From here I'll do the initial commits. Currently both addons are in contrib and I'll clean up there adding your version in. We will get a good diff from the commit.
After which, I'll add to release. I need to add tags so we have a traceable history.
Once it's back in release, it's all yours again. I've put the instructions for you to gain access to the Blender addons repo below.
It will be important to check regularly leading up to 2.8 release. RC1 would be a good aim for stable. After there will be feedback and bug reports where you can fix and prepare for release.

The following is a template for new devs
hi, if you can join this mailing list: bf-committers@blender.org and mail:
Subject:

Re: Commit Access to Addons Repository: ATT: @ideasman42

Content:

Hi my name is: "your name"
My user name on developer.blender.org is: "your user name here"
I would like commit access to the addons repository.
I am the maintainer of/my addon is:
New to Blender and it's task is here: "inset addon name and task name".
or I'm the Author of an addon in Blender and I wish to update the addon: "inset addon name and task name if applicable".
or I'm a new maintainer of an addon in Blender and I wish to update the addon/s "inset addon/s name/s and task name/s if applicable".

I'm familiar with git usage and my repo is here: "your git hub" *not needed but why not if you have one. It's important to know git usage before committing to the Blender addons repo.

It's also useful to join this mailing list: bf-extensions-cvs@blender.org as this list mails out the commits.
https://wiki.blender.org/wiki/Developer_Intro/Overview is a good read.
https:*blender.chat/channel/python and https:*blender.chat/channel/blender-coders provide a good place to discuss your addon or issues if needed. It's good also to drop in and say hi and meet other developers and provides a good communication platform.
Final note: Addons in the Blender repository are updated by addons devs and Blender core devs help with api updates/fixes. As there's multiple people committing it's important to make sure your local folders are updated to current before committing your self.

Any issues please let us know.
Thanks for your support.

hi, @Gappy1 Thanks very much for the update. From here I'll do the initial commits. Currently both addons are in contrib and I'll clean up there adding your version in. We will get a good diff from the commit. After which, I'll add to release. I need to add tags so we have a traceable history. Once it's back in release, it's all yours again. I've put the instructions for you to gain access to the Blender addons repo below. It will be important to check regularly leading up to 2.8 release. RC1 would be a good aim for stable. After there will be feedback and bug reports where you can fix and prepare for release. The following is a template for new devs hi, if you can join this mailing list: bf-committers@blender.org and mail: Subject: > Re: Commit Access to Addons Repository: ATT: @ideasman42 Content: > Hi my name is: "your name" > My user name on developer.blender.org is: "your user name here" > I would like commit access to the addons repository. > I am the maintainer of/my addon is: > New to Blender and it's task is here: "inset addon name and task name". > or I'm the Author of an addon in Blender and I wish to update the addon: "inset addon name and task name if applicable". > or I'm a new maintainer of an addon in Blender and I wish to update the addon/s "inset addon/s name/s and task name/s if applicable". > I'm familiar with git usage and my repo is here: "your git hub" *not needed but why not if you have one. It's important to know git usage before committing to the Blender addons repo. It's also useful to join this mailing list: bf-extensions-cvs@blender.org as this list mails out the commits. https://wiki.blender.org/wiki/Developer_Intro/Overview is a good read. https:*blender.chat/channel/python and https:*blender.chat/channel/blender-coders provide a good place to discuss your addon or issues if needed. It's good also to drop in and say hi and meet other developers and provides a good communication platform. Final note: Addons in the Blender repository are updated by addons devs and Blender core devs help with api updates/fixes. As there's multiple people committing it's important to make sure your local folders are updated to current before committing your self. Any issues please let us know. Thanks for your support.

Meta-androcto, Thanks for nice instruction.
I'll be keep watching and trying to fix issues.

Meta-androcto, Thanks for nice instruction. I'll be keep watching and trying to fix issues.
Author
Member

hi @Gappy1, I'm lowering the priority to normal, I've committed to release and added a warning.
There's some bugs and issues to iron out.

Traceback (most recent call last):
  File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\operator.py", line 35, in execute
    cell_main.main(context, original, **cell_keywords)
  File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\process\cell_main.py", line 173, in main
    cells += main_object(context, original, 0, **kw_copy)
  File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\process\cell_main.py", line 72, in main_object
    level=level,
  File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\process\cell_functions.py", line 378, in cell_boolean
    bpy.ops.btool.boolean_inters()
  File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\modules\bpy\ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
AttributeError: Calling operator "bpy.ops.btool.boolean_inters" error, could not be found

location: <unknown location>:-1

This would be the first to address I think.

Then, append material does not append to all the created fractures but does to the crackit fractures.
I'm not sure if it's possible to make the materials menu show up only if the object is crackit?
Maybe pressing the fracture button could bring up the crackit and the materials ui?
The way it looks now it's like 1, 2, 3, obvious order but easy to fail materials if it's 1, 3 and not using 2.
Speed seems to be an issue also. we can look at that after usability errors are solved.
Thanks again.

hi @Gappy1, I'm lowering the priority to normal, I've committed to release and added a warning. There's some bugs and issues to iron out. ``` Traceback (most recent call last): File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\operator.py", line 35, in execute cell_main.main(context, original, **cell_keywords) File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\process\cell_main.py", line 173, in main cells += main_object(context, original, 0, **kw_copy) File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\process\cell_main.py", line 72, in main_object level=level, File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\addons_contrib\object_fracture_cell\process\cell_functions.py", line 378, in cell_boolean bpy.ops.btool.boolean_inters() File "C:\Users\Dell\Downloads\blender-2.80-29_06_19-win64\2.80\scripts\modules\bpy\ops.py", line 201, in __call__ ret = op_call(self.idname_py(), None, kw) AttributeError: Calling operator "bpy.ops.btool.boolean_inters" error, could not be found location: <unknown location>:-1 ``` This would be the first to address I think. Then, append material does not append to all the created fractures but does to the crackit fractures. I'm not sure if it's possible to make the materials menu show up only if the object is crackit? Maybe pressing the fracture button could bring up the crackit and the materials ui? The way it looks now it's like 1, 2, 3, obvious order but easy to fail materials if it's 1, 3 and not using 2. Speed seems to be an issue also. we can look at that after usability errors are solved. Thanks again.

That bug issue about "bpy.ops.btool.boolean_inters" was occurred because the code in this part uses btool addon's modifier. I forgot that I activated the addon, and that the btool modifier is based on an addon, not a default functionality of Blender.

I fix it by using boolean modifier instead.
4 lines were changed to fix it.
So it should work with no other dependency of other addon activated.

I don't have commit access yet.
So if the fix must be hurried, please commit the fixed code.

Link:
Diff: https://developer.blender.org/differential/diff/16148/
Uploaded github page: https://github.com/squarednob/fracture_cell/tree/master/object_fracture_cell/process

That bug issue about "bpy.ops.btool.boolean_inters" was occurred because the code in this part uses btool addon's modifier. I forgot that I activated the addon, and that the btool modifier is based on an addon, not a default functionality of Blender. I fix it by using boolean modifier instead. 4 lines were changed to fix it. So it should work with no other dependency of other addon activated. I don't have commit access yet. So if the fix must be hurried, please commit the fixed code. **Link**: Diff: https://developer.blender.org/differential/diff/16148/ Uploaded github page: https://github.com/squarednob/fracture_cell/tree/master/object_fracture_cell/process

I mailed to bf-committers@blender.org with "Re: Commit Access to Addons Repository: ATT: @ideasman42" template.
After I have commit access, I will commit the code by myself.

I mailed to bf-committers@blender.org with "Re: Commit Access to Addons Repository: ATT: @ideasman42" template. After I have commit access, I will commit the code by myself.

Hi, I've been looking over the commits to: https://github.com/squarednob/fracture_cell

I find it hard to follow whats going on:

  • Commit messages don't explain why changes are made.
  • Comments that aren't in English.
  • It's not clear which commits are resolving 2.8x compatibility, changing existing features or adding new features.

For example:

  • 40c52f1297 is this going to be added back, does something work now that used to fail?
  • d6dcf903ec Why is relocation needed?
  • 45979c3d67 Adds a lot of new code without any explanation.

Could you make a small patch that makes this add-on work with 2.8?

New features and large changes aren't the purpose of updating the add-on.

Hi, I've been looking over the commits to: https://github.com/squarednob/fracture_cell I find it hard to follow whats going on: - Commit messages don't explain why changes are made. - Comments that aren't in English. - It's not clear which commits are resolving 2.8x compatibility, changing existing features or adding new features. For example: - https://github.com/squarednob/fracture_cell/commit/40c52f1297cf05a4e8218944e5f25e61db9d762d is this going to be added back, does something work now that used to fail? - https://github.com/squarednob/fracture_cell/commit/d6dcf903ecae585f1bbb79d598f933677105902d Why is relocation needed? - https://github.com/squarednob/fracture_cell/commit/45979c3d67d5ff55ae02be8c0d837f0d570f56f5 Adds a lot of new code without any explanation. Could you make a small patch that makes this add-on work with 2.8? New features and large changes aren't the purpose of updating the add-on.

@ideasman42

minimum change version:
First, I have minimum change version for 2.8. I uploaded it on Github to show you.
https://github.com/squarednob/fracture_cell_minimum

And if I make a branch in main repository (https://github.com/squarednob/fracture_cell), I think I can restart develop with minimum changing code.

I talked to meta-androcto on IRC chat, and whether merge or separation of cell and crack addon seems to be still pending.
I'm willing to comply your team's decision (remain minimum version, or adding new feature, merging two addon, etc)

Unclearness of commit message:
Firstly I intended to use the github page for underdevelopment process, not so official. At that time I didn't have commit access, and I didn't know commit process of Blender's internal addon.
So some commit has big change without purpose-explanation, and some comments in the code were used for remainder, and not in English.

Still, you pointed out flaw of the commits that I didn't care so much.
I should make more small changes and explain reasons in commit massage.

Why it has big code change:
After making minimum version, I took on integration task of cell and crack, and I was allowed to add new features (with testing purpose, not all needed to be adapted). So I started developing with comment at Mon, Jun 10, 6:50 PM in this task.
I should have provide diff of the minimum version to someone and request to commit for the starting point, before adding features, though....

The main big changes:

  1. Some features like relocation or hide object was added to avoid overlapping position and visibility using collection to organize objects, instead of deprecated layer.
  2. In the for loop, first 1 or 2 object somehow can't be properly dealt, So make a "bait" box object inserted list, and in the loop, deleted this quickly.
  3. extension of functionality, such as multiple point source method, and random point source.
  4. To integrate with crack addon, some processes are changed or relocated.
  5. UI menu was changed to categorize features well.
  6. To organize and for consistency of crack feature, I change file structure, and names of function and variables.
@ideasman42 **minimum change version**: First, I have minimum change version for 2.8. I uploaded it on Github to show you. https://github.com/squarednob/fracture_cell_minimum And if I make a branch in main repository (https://github.com/squarednob/fracture_cell), I think I can restart develop with minimum changing code. I talked to meta-androcto on IRC chat, and whether merge or separation of cell and crack addon seems to be still pending. I'm willing to comply your team's decision (remain minimum version, or adding new feature, merging two addon, etc) **Unclearness of commit message**: Firstly I intended to use the github page for underdevelopment process, not so official. At that time I didn't have commit access, and I didn't know commit process of Blender's internal addon. So some commit has big change without purpose-explanation, and some comments in the code were used for remainder, and not in English. Still, you pointed out flaw of the commits that I didn't care so much. I should make more small changes and explain reasons in commit massage. **Why it has big code change**: After making minimum version, I took on integration task of cell and crack, and I was allowed to add new features (with testing purpose, not all needed to be adapted). So I started developing with comment at Mon, Jun 10, 6:50 PM in this task. I should have provide diff of the minimum version to someone and request to commit for the starting point, before adding features, though.... The main big changes: 1. Some features like relocation or hide object was added to avoid overlapping position and visibility using collection to organize objects, instead of deprecated layer. 2. In the for loop, first 1 or 2 object somehow can't be properly dealt, So make a "bait" box object inserted list, and in the loop, deleted this quickly. 3. extension of functionality, such as multiple point source method, and random point source. 4. To integrate with crack addon, some processes are changed or relocated. 5. UI menu was changed to categorize features well. 6. To organize and for consistency of crack feature, I change file structure, and names of function and variables.

Checked the minimum version but it still change more things than necessary (reference to crack it, removed group/collection feature, remove asserts).

I've committed minimal changes to this add-on to make it work, based on 07ec645862 (2.7x with minor API updates).

Applied a change from your patch:


@Gappy1, are there any changes I've missed that fix issues in 2.8x?

Your patch includes grease pencil changes but a quick test for annotations seems to be working properly.

Other improvements could be made later but aren't priority for 2.8 release.

Checked the minimum version but it still change more things than necessary (reference to crack it, removed group/collection feature, remove asserts). I've committed minimal changes to this add-on to make it work, based on 07ec645862 (2.7x with minor API updates). - f1176bd276 & d269e6b9f2. Applied a change from your patch: - Use evaluated particles 9bc7dad463 - Cleanup/comments 3471f0a161 ---- @Gappy1, are there any changes I've missed that fix issues in 2.8x? Your patch includes grease pencil changes but a quick test for annotations seems to be working properly. Other improvements could be made later but aren't priority for 2.8 release.
Author
Member

@ideasman42 hi, I think we could have handled this better. I had been discussing with @Gappy1 some ui fixes, and various needed changes the night before your reversions were made. we were looking to resolve any issues and present a superior tool for 2.8.
Update to 2.8 was maybe the wrong term here? I've found that during the update process, often things can change and updates become upgrades, features get added, usability get's improved, it provides a time to update to the new api and take a look at an addon in general. 2.8 is a new Blender series and huge changes have been made across all areas. All I was doing here was to try to provide the best functionality for the end user.
I only had the best intentions here. To provide Blender users with a working valid addon with improved usability and functionality.
Thanks. Sorry for the noise.

@Gappy1 We still should update your Crackit addon, it really is a great accompaniment to the cell fracture addon.
Your welcome to update when your ready. I would still include this in 2.8. If your still having trouble with git, let me know and I'll try to help you through it.

@ideasman42 hi, I think we could have handled this better. I had been discussing with @Gappy1 some ui fixes, and various needed changes the night before your reversions were made. we were looking to resolve any issues and present a superior tool for 2.8. Update to 2.8 was maybe the wrong term here? I've found that during the update process, often things can change and updates become upgrades, features get added, usability get's improved, it provides a time to update to the new api and take a look at an addon in general. 2.8 is a new Blender series and huge changes have been made across all areas. All I was doing here was to try to provide the best functionality for the end user. I only had the best intentions here. To provide Blender users with a working valid addon with improved usability and functionality. Thanks. Sorry for the noise. @Gappy1 We still should update your Crackit addon, it really is a great accompaniment to the cell fracture addon. Your welcome to update when your ready. I would still include this in 2.8. If your still having trouble with git, let me know and I'll try to help you through it.
Author
Member

object_fracture_crack.zip
Uploaded working alternate stand alone. This addon is the version reverted from release and based on work from @Gappy1 .
It no longer needs to use the Fracture addon as it includes the old code. As it stands this addon serves as an update to the "Crackit".
Given the work involved in this design, I beleive we should make an exception here and add back to release.

[object_fracture_crack.zip](https://archive.blender.org/developer/F7604443/object_fracture_crack.zip) Uploaded working alternate stand alone. This addon is the version reverted from release and based on work from @Gappy1 . It no longer needs to use the Fracture addon as it includes the old code. As it stands this addon serves as an update to the "Crackit". Given the work involved in this design, I beleive we should make an exception here and add back to release.

@Gappy1, are there any changes I've missed that fix issues in 2.8x?

Your patch includes grease pencil changes but a quick test for annotations seems to be working properly.

Other improvements could be made later but aren't priority for 2.8 release.

@ideasman42, I found the bugs in fracture cell addon in RC1.
I also fixed the bugs. The bugs are fixed from fracture cell in RC1.
Strict minimum branch : https://github.com/squarednob/fracture_cell_minimum/tree/strict_minimum
diff: https://developer.blender.org/differential/diff/16374/

The way to fix the bugs directly came from in my first minimum version.
So, if there are alternative good solutions, please ignore my way of fixing.

I listed bugs below.

Boolean modifier is not applied:
The resulted cells still remain fractures of bounding box.
The bug seems come from bpy.data.meshes.new_from_object(). They don't apply modifier in 2.8, at least the same way in 2.7.
If bpy.data.meshes.new_from_object() can apply modifier somehow, or if there is an alternative function, it should be used.
But the simplest solution here is to add a process of applying boolean modifier:

bpy.context.view_layer.objects.active = obj_cell
bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean")                       
#obj_cell.modifiers.remove(mod)

Interior VGroup and Sharp Edges are not applied:
The bug is related with applying modifier problem above.
As you know, to distinguish interior meshes from exterior meshes, this addon uses "hide" or not "hide" of meshes. To do that, all of meshes are hidden before boolean modifier is applied. And after the modifier is applied, new meshes made by boolean modifier are not hidden.

To do this in 2.8, I applied Boolean modifier before bpy.data.meshes.new_from_object(), to preserve data for "hide" or not "hide".
If the order is reversed, all of the meshes are not hidden. So interior meshes are not distinguished.
fracture_cell_setup.py 337-349 are changed to this:

            if use_interior_hide:
                obj_cell.data.polygons.foreach_set("hide", [True] * len(obj_cell.data.polygons))
                    
            mesh_old = obj_cell.data
            
            # New meshes by boolean modifier are not hidden.
            bpy.context.view_layer.objects.active = obj_cell
            bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean")                       
            
            obj_cell_eval = obj_cell.evaluated_get(depsgraph)
            mesh_new = bpy.data.meshes.new_from_object(obj_cell_eval)
            
            obj_cell.data = mesh_new

Collection doesn't appear in outliner:
Collection don't appear in outliner tree, because the collection is not linked to master collection.
After a new collection is linked on master collection, the new collection appears.
Also, I unlinked cells from other collection to prevent duplication in outliner.

Recursion with cursor error:
It's simple reference error. I added "context".

c = scene.cursor.location.copy()

to

c = context.scene.cursor.location.copy()
> @Gappy1, are there any changes I've missed that fix issues in 2.8x? > > Your patch includes grease pencil changes but a quick test for annotations seems to be working properly. > > Other improvements could be made later but aren't priority for 2.8 release. @ideasman42, I found the bugs in fracture cell addon in RC1. I also fixed the bugs. The bugs are fixed from fracture cell in RC1. Strict minimum branch : https://github.com/squarednob/fracture_cell_minimum/tree/strict_minimum diff: https://developer.blender.org/differential/diff/16374/ The way to fix the bugs directly came from in my first minimum version. So, if there are alternative good solutions, please ignore my way of fixing. I listed bugs below. **Boolean modifier is not applied:** The resulted cells still remain fractures of bounding box. The bug seems come from *bpy.data.meshes.new_from_object()*. They don't apply modifier in 2.8, at least the same way in 2.7. If *bpy.data.meshes.new_from_object()* can apply modifier somehow, or if there is an alternative function, it should be used. But the simplest solution here is to add a process of applying boolean modifier: ``` bpy.context.view_layer.objects.active = obj_cell bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean") #obj_cell.modifiers.remove(mod) ``` **Interior VGroup and Sharp Edges are not applied:** The bug is related with applying modifier problem above. As you know, to distinguish interior meshes from exterior meshes, this addon uses "hide" or not "hide" of meshes. To do that, all of meshes are hidden before boolean modifier is applied. And after the modifier is applied, new meshes made by boolean modifier are not hidden. To do this in 2.8, I applied Boolean modifier before bpy.data.meshes.new_from_object(), to preserve data for "hide" or not "hide". If the order is reversed, all of the meshes are not hidden. So interior meshes are not distinguished. fracture_cell_setup.py 337-349 are changed to this: ``` if use_interior_hide: obj_cell.data.polygons.foreach_set("hide", [True] * len(obj_cell.data.polygons)) mesh_old = obj_cell.data # New meshes by boolean modifier are not hidden. bpy.context.view_layer.objects.active = obj_cell bpy.ops.object.modifier_apply(apply_as='DATA', modifier="Boolean") obj_cell_eval = obj_cell.evaluated_get(depsgraph) mesh_new = bpy.data.meshes.new_from_object(obj_cell_eval) obj_cell.data = mesh_new ``` **Collection doesn't appear in outliner:** Collection don't appear in outliner tree, because the collection is not linked to master collection. After a new collection is linked on master collection, the new collection appears. Also, I unlinked cells from other collection to prevent duplication in outliner. **Recursion with cursor error:** It's simple reference error. I added "context". ``` c = scene.cursor.location.copy() ``` to ``` c = context.scene.cursor.location.copy() ```

@BrendonMurphy
I'm updating crack it addon from RC1 version, using the fracture cell that I uploaded above.
I try to update it with minimum changes, although many things can be more useful.

@BrendonMurphy I'm updating crack it addon from RC1 version, using the fracture cell that I uploaded above. I try to update it with minimum changes, although many things can be more useful.

@BrendonMurphy
I updated crackit addon with minimum changes for Blender2.8.
Although I should commit and push to blender repository by myself, I have trouble with SSH key things. It seams to take a little more time to solve this.
So if the updating is needed in a hurry, please use the github or diff below.
Sorry for bothering you.

Github official_2.8 branch: https://github.com/squarednob/crack_it/tree/official_2.8
diff with binary (for materials in .blend file): https://developer.blender.org/differential/diff/16386/

@BrendonMurphy I updated crackit addon with minimum changes for Blender2.8. Although I should commit and push to blender repository by myself, I have trouble with SSH key things. It seams to take a little more time to solve this. So if the updating is needed in a hurry, please use the github or diff below. Sorry for bothering you. Github official_2.8 branch: https://github.com/squarednob/crack_it/tree/official_2.8 diff with binary (for materials in .blend file): https://developer.blender.org/differential/diff/16386/
Author
Member

hi @Gappy1 I seem to be having trouble here. could you test with a nightly build from here please.
https://builder.blender.org/download/

hi @Gappy1 I seem to be having trouble here. could you test with a nightly build from here please. https://builder.blender.org/download/

@BrendonMurphy
I downloaded the "blender-2.80rc1-windows64" from the link.
Crack it addon seems not to be updated yet here.
And after I changed the files in "object_fracture_crack" to the updated files from https://github.com/squarednob/crack_it/tree/official_2.8, it worked.

I could test more specific, if I know what kind of trouble there.

@BrendonMurphy I downloaded the "blender-2.80rc1-windows64" from the link. Crack it addon seems not to be updated yet here. And after I changed the files in "object_fracture_crack" to the updated files from https://github.com/squarednob/crack_it/tree/official_2.8, it worked. I could test more specific, if I know what kind of trouble there.
Author
Member

hi, it's only working on 1 selected object here, not the whole fractured object. There were recent updates to cell fracture, maybe they are the cause.

hi, it's only working on 1 selected object here, not the whole fractured object. There were recent updates to cell fracture, maybe they are the cause.
Contributor

Removed subscriber: @Walles

Removed subscriber: @Walles

@BrendonMurphy
Is it a confusion of execution process of crackit of the minimum change version? It is not the same as integrated version.
This crackit (https://github.com/squarednob/crack_it/tree/official_2.8) doesn't need execution of cell fracture as the first one step, not like integrated version of crack it.

Users only need to select an object (not fractured) and click "crack it" button. The crackit addon executes cell fracture and crack functions together automatically.
That's why the crackit addon can only select one object. The selected object should be a "raw" object which is not fractured yet.

If this interpretation is wrong, please let me know.

@BrendonMurphy Is it a confusion of execution process of crackit of the minimum change version? It is not the same as integrated version. This crackit (https://github.com/squarednob/crack_it/tree/official_2.8) doesn't need execution of cell fracture as the first one step, not like integrated version of crack it. Users only need to select an object (not fractured) and click "crack it" button. The crackit addon executes cell fracture and crack functions together automatically. That's why the crackit addon can only select one object. The selected object should be a "raw" object which is not fractured yet. If this interpretation is wrong, please let me know.

Added subscriber: @Gunses

Added subscriber: @Gunses
Author
Member

hi, I'll check again. I was using your minimum version of crackit with the version of cell fracture provided with Blender . Also using a nightly build not rc release. I see now where my confusion arises. I was looking for the behavior you added in the full new version which is much more desired. A fix if there is one would be to have the minimum version of crackit for 2.8 work on all selected objects?

hi, I'll check again. I was using your minimum version of crackit with the version of cell fracture provided with Blender . Also using a nightly build not rc release. I see now where my confusion arises. I was looking for the behavior you added in the full new version which is much more desired. A fix if there is one would be to have the minimum version of crackit for 2.8 work on all selected objects?
Author
Member

note, I've put up the full version you made with all my ui fixes here: https://github.com/meta-androcto/blenderpython

note, I've put up the full version you made with all my ui fixes here: https://github.com/meta-androcto/blenderpython

@BrendonMurphy
Thank you for the full version link.
I will try to implement multiple selection and try to added useful function and UI, also try to update it by myself.

@BrendonMurphy Thank you for the full version link. I will try to implement multiple selection and try to added useful function and UI, also try to update it by myself.
Author
Member

hi @Gappy1 I think we need to hold off now until 2.81, I'm going to move the non working version into contrib and you may update there for the moment. I also think to close this task soon and create a new task. If we create a new task we can offer the full version that you wrote as a new standalone addon.. It will give us more flexibility. I hope you understand that I had thought things would have gone much smoother and I will work towards a smooth transition into 2.81. Thanks for your patience here.

hi @Gappy1 I think we need to hold off now until 2.81, I'm going to move the non working version into contrib and you may update there for the moment. I also think to close this task soon and create a new task. If we create a new task we can offer the full version that you wrote as a new standalone addon.. It will give us more flexibility. I hope you understand that I had thought things would have gone much smoother and I will work towards a smooth transition into 2.81. Thanks for your patience here.
Campbell Barton changed title from Update Cell Fracture and cell fracture crackit addons Blender 2.8 to Update Crackit addons Blender 2.8 2019-07-24 04:00:12 +02:00
Campbell Barton changed title from Update Crackit addons Blender 2.8 to Update Crackit addon for Blender 2.8 2019-07-24 04:00:25 +02:00
Author
Member

hi, I'm not happy with this addon in it's current form. I'm going to give the full update a run in contrib as it's by far an improvement on the current minimal version.
This update includes code duplicated and rewritten from cell fracture addon from 2.79 and the update for crack it as a new standalone addon.
Benefits of this addon: Ease of use, operator panel for adjusting "After Fractures or Crack it" which gives the user full control over adjusting the fractured object immediately after the fracture if they make a mistake or need to adjust.
Image shows the panel, fracture operator and crack it operator.
fracture_cracked.jpg

hi, I'm not happy with this addon in it's current form. I'm going to give the full update a run in contrib as it's by far an improvement on the current minimal version. This update includes code duplicated and rewritten from cell fracture addon from 2.79 and the update for crack it as a new standalone addon. Benefits of this addon: Ease of use, operator panel for adjusting "After Fractures or Crack it" which gives the user full control over adjusting the fractured object immediately after the fracture if they make a mistake or need to adjust. Image shows the panel, fracture operator and crack it operator. ![fracture_cracked.jpg](https://archive.blender.org/developer/F7713634/fracture_cracked.jpg)
Author
Member

@Gappy1 hi, here we are again, I've made some changes to the Margin property, just basic restrict min/max: 0.5 is max as above this is not usable and returns float 0 errors if set too high. I made some changes to the ui, just some basic usability changes. I'm still on the fence with the pop up menu's on execute from the panel. The buttons in the panel could be the execute button but are still useful for users more familiar with the techniques used and may not need the 2nd operator so I decised to keep it for now. We can wait for user feedback on this.
@ideasman42 hi, here we are again, this addon is now standalone and not entwined with Cell Fracture. It may have duplicated some code but class names appear to be all good. Load Reload reports no errors. The usability and menu changes are really very nice from a user perspective.
I think the options here are to:
1/ Add the full contrib version to release as both an update to crackit/return to release and partly a new addon/extended version.
2/ Leave the current version in contrib as is. :( not a great option really.
The original and minimal update version is/was not near the usability of this version. Especially for those new to Blender unfamiliar with fracturing and younger users.
Please let me know your answer on this. I'm trying to solve this in a constructive way.
Thanks

@Gappy1 hi, here we are again, I've made some changes to the Margin property, just basic restrict min/max: 0.5 is max as above this is not usable and returns float 0 errors if set too high. I made some changes to the ui, just some basic usability changes. I'm still on the fence with the pop up menu's on execute from the panel. The buttons in the panel could be the execute button but are still useful for users more familiar with the techniques used and may not need the 2nd operator so I decised to keep it for now. We can wait for user feedback on this. @ideasman42 hi, here we are again, this addon is now standalone and not entwined with Cell Fracture. It may have duplicated some code but class names appear to be all good. Load Reload reports no errors. The usability and menu changes are really very nice from a user perspective. I think the options here are to: 1/ Add the full contrib version to release as both an update to crackit/return to release and partly a new addon/extended version. 2/ Leave the current version in contrib as is. :( not a great option really. The original and minimal update version is/was not near the usability of this version. Especially for those new to Blender unfamiliar with fracturing and younger users. Please let me know your answer on this. I'm trying to solve this in a constructive way. Thanks
Author
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Author
Member

closing as resolved. maybe revisit the idea of release at a later stage.

closing as resolved. maybe revisit the idea of release at a later stage.

Added subscriber: @cmngsun

Added subscriber: @cmngsun

Added subscriber: @Mattrside

Added subscriber: @Mattrside
Sign in to join this conversation.
No Milestone
No project
No Assignees
10 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#61901
No description provided.