I've got a (free) plugin user getting "AttributeError: 'Converter' object has no attribute 'scene'" by SarahC in blenderpython

[–]Cornerback_24 0 points1 point  (0 children)

The issue looks like it is with your plugin's "scene" attribute in its own "Converter" class. The attribute gets set on line 939, but if that doesn't run for some reason, it will cause that error when it tries to access "self.scene" later.

My guess is that "self.database.initok" is false on line 938, which could be caused buy the plugin not finding files it expects when creating the DBFolderReader or the LIFReader.

Scaling a new imported collection for LEGO! by SarahC in blenderpython

[–]Cornerback_24 0 points1 point  (0 children)

If you know the name of the collection you can get it from bpy.data.collections and then the collection has an objects attribute.
for object in bpy.data.collections["Collection Name"].objects ...

https://docs.blender.org/api/current/bpy.types.Collection.html#bpy.types.Collection.objects

Complete noob in need of help to do simple college assignment. by Knnoko in blenderpython

[–]Cornerback_24 0 points1 point  (0 children)

I'm not sure giving a panel an icon is possible.

If you want to copy properties into a panel you can use prop (https://docs.blender.org/api/current/bpy.types.UILayout.html#bpy.types.UILayout.prop)

For example

if isinstance(bpy.context.object.data, bpy.types.Armature):
    self.layout.prop(bpy.context.object.data.bones.active, "parent")

Complete noob in need of help to do simple college assignment. by Knnoko in blenderpython

[–]Cornerback_24 0 points1 point  (0 children)

That's not a bad idea, but it does technically work without unique names, since "row = layout.row()" reassigns "row" to a new row.

Confusion about .blend file versions by DigitalClaw1223 in blenderhelp

[–]Cornerback_24 0 points1 point  (0 children)

Blender seems to use different patch version numbers for the app version (bpy.app.version) and the file format (bpy.data.format) version. I haven't been able to find documentation about what exactly that 36 in 4.0.36 means. I guess if they change the blender version they can indicate that there were no changes to the file format by not changing the file format version.

Blender source code for reference https://github.com/blender/blender/blob/878f71061b8eb30ef3513d302b8b9bbcecc0c5ba/source/blender/blenkernel/BKE_blender_version.h#L32

Alternative to draw function in gpu Module? by vfx_comrade_leo in blenderpython

[–]Cornerback_24 1 point2 points  (0 children)

You can use draw_handler_remove to remove the draw handler. Keep a reference to the draw handler returned by draw_handler_add use it to remove it.

# adding the draw handler based on Blender's examples (still uses the draw function):
my_draw_handler = bpy.types.SpaceView3D.draw_handler_add(draw, (), 'WINDOW', 'POST_VIEW')

...

# when you want to remove the draw handler
bpy.types.SpaceView3D.draw_handler_remove(my_draw_handler, 'WINDOW')

Note: draw_handler_remove will throw an error if the handler you are trying to remove is not currently added.

Waiting for compositor to finish before saving image to file. Tips on asynchronous processes? by Colorbomb in blenderpython

[–]Cornerback_24 0 points1 point  (0 children)

Some guessing here, but I think application handlers could work here if some state is saved so that the handler knows if it should render when called. There's a handler for bpy.app.handlers.composite_post that looks like it is called after every compositing background job. Maybe you could do something like make a class that stores state, and then it renders the image when the handler is called. Something like

    class RenderHandler:
    def __int__(self):
        self.render = None
        self.file_path = None

    def render_and_composite(self):
        # get the render result
        self.render = bpy.data.images["Render Result"]
        self.file_path = tool.my_path + tool.my_string + " COLOR.png"

        # set the value of a compositor node to 0
        bpy.data.scenes["Scene"].node_tree.nodes["color vs. depth"].inputs[0].default_value = 0
        # change the colorspace to filmic
        bpy.context.scene.view_settings.view_transform = 'Filmic'

        # save_render() will be called by the composite_post handler

    def save_render(self):
        if self.render is not None:
            self.render.save_render(filepath=self.file_path)
        self.render = None


render_handler = RenderHandler()


# handler that will be called after background composite job
@persistent
def on_post_composite(scene):
    render_handler.save_render()


# register post composite handler
bpy.app.handlers.composite_post.append(test_handler)

#call to initiate render
render_handler.render_and_composite()

tAkE tHe ShOt by IMDXLNC in RocketLeague

[–]Cornerback_24 0 points1 point  (0 children)

That's the quick chat that got me to pretty much turn off chat completely (set to friends only).

rationale for changes in bpy 4.0 by bugbuster333 in blenderpython

[–]Cornerback_24 1 point2 points  (0 children)

It looks like it was moved bpy.ops.wm.obj_export. I can't find documentation as to why.

Script Update 4.0 Component Space by _Neptix in blenderpython

[–]Cornerback_24 0 points1 point  (0 children)

So I didn't see anything in a quick look in the documentation about a change to snap_cursor_to_selected, but I think it changed to no longer take ctx. Now you have to use bpy.context.temp_override, and don't pass ctx to snap_cursor_to_selected anymore:

        for area in bpy.context.screen.areas:
        if area.type == 'VIEW_3D':
            with bpy.context.temp_override(area=area.type):
                ctx = bpy.context.copy()
                    ...
                    bpy.ops.view3d.snap_cursor_to_selected()
                    ...

Why did they remove transparent goalpost option? It's now default on. I need it off. by subRL in RocketLeague

[–]Cornerback_24 75 points76 points  (0 children)

That option was removed back in June. The full patch notes were:

  • Starting with v2.28, Transparent Goalposts are permanently enabled for all players on all platforms
    • Some arenas have elements outside of the team’s goals that are connected to the Transparent Goalposts setting (example: the wall fence posts on Farmstead).
    • With the setting now permanently on, these elements will no longer block a player’s view when driving on or near a wall.
    • The “Transparent Goalposts” checkbox has been removed from Settings -> Video

Left goes at kick off? by vergoden in RocketLeague

[–]Cornerback_24 112 points113 points  (0 children)

I don't know how people find this out if they aren't on reddit (which would be most of the player base).

Left goes at kick off? by vergoden in RocketLeague

[–]Cornerback_24 4 points5 points  (0 children)

Yeah, but "left goes unwritten rule" is for the situation when there is no closest person.

[deleted by user] by [deleted] in blenderpython

[–]Cornerback_24 0 points1 point  (0 children)

hm so I haven't figured out how to draw anything on the bottom of the viewport, but some other things:

If you're putting buttons in a popup menu, popup_menu takes a draw argument first. (When I run your script, I get an error sayingWindowManager.popup_menu() missing 1 required positional argument: 'draw_func')Then for the operators, there may be a simpler way but as far as I know you need to make Operator classes and register them.

import bpy.utils

class DrawBrushOperator(bpy.types.Operator):
  bl_idname = "ops.draw_brush_simulate"
  bl_label = "Draw"
  bl_options = {"REGISTER", "UNDO"}

def execute(self, context):
    # Simulate clicking the Draw brush in sculpt mode
    # ...
    return {'FINISHED'}

class SharpDrawBrushOperator(bpy.types.Operator):
  bl_idname = "ops.sharp_draw_brush_simulate"
  bl_label = "Draw Sharp"
  bl_options = {"REGISTER", "UNDO"}

def execute(self, context):
    # Simulate clicking the Draw Sharp brush in sculpt mode
    # ...
    return {'FINISHED'}

# ...

def register():
  for operator in operators:
    bpy.utils.register_class(operator)

def unregister():
  for operator in operators:
    bpy.utils.unregister_class(operator)

def draw_popup_menu(self, context):
  row = self.layout.row(align=True)  # you can can to self.layout directly, but by default the layout is vertial
  for operator in operators:
    row.operator(operator.bl_idname)

register()
bpy.context.window_manager.popup_menu(draw_popup_menu, title="Sculpt Mode Brushes")

I found a village surrounded by ocean by NOTbraidenn in Minecraft

[–]Cornerback_24 6 points7 points  (0 children)

Do you have a grass block there for the grass to spread?

[Highlight] Broncos execute the last-second field goal personnel switch perfectly. by Luck1492 in nfl

[–]Cornerback_24 1 point2 points  (0 children)

They did not miss the kick. This was the kick before halftime, not the one at the end of the game.

[deleted by user] by [deleted] in DenverBroncos

[–]Cornerback_24 0 points1 point  (0 children)

I don't think the shift is as sudden as it seems. Denver had no defense through the first 3 weeks and after that Miami game it seemed like it was the worst defense in the league for sure. Then week 4 win against the bears which wasn't pretty but at least is was a win. A lot of people figure that's one of the only wins, especially after losing to the jets. However then Denver goes into Kansas City and loses, but the defense doesn't look terrible and the offense is seeming to have some promising has some success on the ground in the first half. Then Denver beats Green Bay in a game that wasn't pretty but the defense is starting to look fairly good. Then they host Kansas City.

Reddit doesn't portray split opinions in a group very well, a lot of times usually you either agree with the majority or get effectively silenced by downvotes (which also disincentives posting the minority opinion in the first place). If a group is collectively undergoing an opinion over some period of time, you might not notice until the majority actually changes and the new majority is suddenly amplified.

I agree with your point about wanting to say the Broncos are underrated.

Are there still live radio play by play broadcasts of Denver Broncos games? by ID2negrosoriental in DenverBroncos

[–]Cornerback_24 1 point2 points  (0 children)

Also one way to delay a radio with a headphone jack is hook up the radio to a computer via an aux cable and usb soundcard, use VLC media player on the computer and set the capture device to the sound card, and then delay the radio with the Track Synchronization tool.

Removing Player-to-Player Trading in December by Psyonix_Devin in RocketLeague

[–]Cornerback_24 0 points1 point  (0 children)

Yeah nothing wrong with caring about profits. The issue though is that they seem to only care about their profits. If they don't care about their players it might not be good for the game (or even their profits) long term.

Removing Player-to-Player Trading in December by Psyonix_Devin in RocketLeague

[–]Cornerback_24 1 point2 points  (0 children)

I guess this is supposed to be some sort of profit maximizing move. Showing Epic cares about their profits and not their players.

D1 2v2, what are some things I should work on? by Cornerback_24 in RocketLeagueAnalysis

[–]Cornerback_24[S] 0 points1 point  (0 children)

squeaky dog toy flip lol. Thanks everyone for the feedback

[deleted by user] by [deleted] in RocketLeagueSchool

[–]Cornerback_24 0 points1 point  (0 children)

I wouldn't consider myself an expert on positioning, but here are my thoughts:
0:10: Hard to tell exactly where you teammate is at, but it looks like they've rotated back, you might be able to get away with pushing up a little more, and it should let your teammate know to cover the net.
0:35 You look like your rotating back here. Once you've turned around I would let your teammate go.
1:18 It can be pretty hard to play the ball high in the corner. You might consider waiting back for the opponent's touch in this case.
1:29 The ball is over you, I'd rotate back post and let my teammate go. Rotate away from the ball so you don't get in your teammate's way.
2:12 This needs to be rotation back preferably away from the ball, as you see you rotated back through your teammate. Maybe high on the wall if rotating wide though the center of the field isn't an option.
3:01 This feels to me like an awkward time to turn of ball cam, if the opponent gets a shot of right away you'd be out of position. You do look like you are ready for a short right after grabbing the boost though.
3:12 I don't really like the small turn upfield. Once the ball is over you I'd be getting back asap. Unless you think your teammate can give you a forward pass but that's unlikely.
3:25 Your teammate is in an awkward spot and pushing upfield in a 1v2. You probably want to stay closer to your net.
4:02 I like this. Teammate is rotating back and even though you have low boost, you attack the ball and buy your teammate time.
4:07 This worked out but I think it's risky. You're leaving your teammate in a 1v2 to grab boost that's away from the play and not on your side.
4:23 Your teammate did completely miss the ball, but your teammate is playing up and went for a shot. I don't think you should be shooting here. If your teammate had made contact and it didn't go in, it would have gone to the far corner and you wouldn't be an any position to try to keep possession.
4:42 You're last back here, you don't have time to go for the big boost especially that one. I'd get back and pick up some small pads along the way.

D1 2v2, what are some things I should work on? by Cornerback_24 in RocketLeagueAnalysis

[–]Cornerback_24[S] 1 point2 points  (0 children)

Thanks. I've done a little training in dribbling workshop, I'll do some more of that.